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" 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 data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
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 # The Parsoid team disagrees with the PHP parser's seemingly-random
4336 # rules regarding dd/dt on the next two tests. Parsoid is more
4337 # consistent, and recognizes the shared nesting and keeps the
4338 # still-open tags around until the nesting is complete.
4339 # (And tidy again converts <dt> to <dd> before 'bar'.)
4342 Definition Lists: Mixed Lists: Test 11
4347 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4348 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4349 <dl><dt>boo </dt>
4350 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4405 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4406 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4410 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4411 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4420 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4422 # * The test is wrong, there are two colons where there should be :;
4423 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4425 Definition Lists: Weird Ones: Test 1
4427 *#;*::;; foo : bar (who uses this?)
4429 <ul><li><ol><li><dl><dt> foo </dt>
4430 <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>
4449 <dt>bar (who uses this?)</dt>
4481 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4482 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4494 Definition Lists: colons occurring in tags
4512 <dt><span>a:b</span></dt>
4539 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4541 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4542 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4543 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4544 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4546 <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>
4547 <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>
4548 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4552 Definition Lists: colons and tables 1
4564 </td></tr></table></dd></dl>
4568 </td></tr></table></dd></dl>
4572 # Parsoid's output (as documented below) differs from php's in this case.
4573 # This is probably a bug. If we fixup parsoid to match php's output, the
4574 # above test should pass and the below test case can be removed. It is
4575 # unclear which output is more desirable.
4578 Definition Lists: colons and tables 2
4590 </td></tr></table></dd>
4594 </td></tr></table></dd></dl>
4598 Definition Lists: template interaction
4600 ::{{definition_list}}
4603 ::{{definition_list}}
4608 <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">
4609 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4611 <dl><dd data-parsoid='{}'>one
4612 <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">
4613 </span><dd about="#mwt2">two
4615 <dd>three</dd></dl></dd>
4616 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4624 External links: non-bracketed
4626 Non-bracketed: http://example.com
4628 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4632 # parsoid doesn't explicitly mark autonumbered links, see T55505
4634 External links: numbered
4636 Numbered: [http://example.com]
4637 Numbered: [http://example.net]
4638 Numbered: [http://example.com]
4640 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4641 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4642 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4645 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4646 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4647 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4651 External links: specified text
4653 Specified text: [http://example.com link]
4655 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4660 External links: trail
4662 Linktrails should not work for external links: [http://example.com link]s
4664 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4669 External links: dollar sign in URL
4671 http://example.com/1$2345
4673 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4677 # parsoid doesn't explicitly mark autonumbered links, see T55505
4679 External links: dollar sign in URL (autonumber)
4681 [http://example.com/1$2345]
4683 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4686 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4690 External links: open square bracket forbidden in URL (T6377)
4692 parsoid=wt2html,wt2wt,html2html
4694 http://example.com/1[2345
4696 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4699 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4703 External links: open square bracket forbidden in URL (named) (T6377)
4705 parsoid=wt2html,html2html
4707 [http://example.com/1[2345]
4709 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4712 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4715 # parsoid adds a space before the link name
4717 External links: open square bracket forbidden in URL (named) (T6377)
4720 [http://example.com/1 [2345]
4722 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4727 External links: nowiki in URL link text (T8230)
4729 [http://example.com/ <nowiki>''example site''</nowiki>]
4731 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4736 External links: newline forbidden in text (T8230 regression check)
4738 [http://example.com/ first
4741 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4747 External links: Pipe char between url and text
4749 [http://example.com | link]
4751 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4756 External links: protocol-relative URL in brackets
4758 [//example.com/ Test]
4760 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4764 # parsoid doesn't explicitly mark autonumbered links, see T55505
4766 External links: protocol-relative URL in brackets without text
4770 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4773 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4777 External links: protocol-relative URL in free text is left alone
4781 <p>//example.com/Foo
4786 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4788 foo//example.com/Foo
4790 <p>foo//example.com/Foo
4795 External links: with no contents
4797 [http://en.wikipedia.org/wiki/Foo]
4799 [[wikipedia:Foo|Bar]]
4801 [[wikipedia:Foo|<span>Bar</span>]]
4803 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4804 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4805 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4808 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4809 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4810 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4814 External links: Free with trailing punctuation
4824 http://example.com/url_with_(brackets)
4825 (http://example.com/url_without_brackets)
4826 http://example.com/url_with_entity&
4827 http://example.com/url_with_entity&
4828 http://example.com/url_with_entity&
4829 http://example.com/url_with_entity
4830 http://example.com/url_with_entity 
4831 http://example.com/url_with_entity 
4832 http://example.com/url_with_entity<
4833 http://example.com/url_with_entity<
4834 http://example.com/url_with_entity<
4836 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4837 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4838 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4839 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4840 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4841 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4842 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4843 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4844 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4845 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4846 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4847 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4848 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4849 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4850 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4851 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4852 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4853 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4854 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4857 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4858 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4859 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4860 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4861 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4862 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4863 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4864 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4865 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4866 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4867 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4868 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4869 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4870 <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>
4871 <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>
4872 <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>
4873 <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>
4874 <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>
4875 <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>
4879 External links: tricky Parsoid html2html case
4881 parsoid=wt2html,wt2wt,html2html
4883 http://example.com/url_with_entity&amp;
4885 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4888 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4892 External links: Free with trailing quotes (T113666)
4894 '''News:''' Stuff here
4898 <p><b>News:</b> Stuff here
4899 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4902 <p><b>News:</b> Stuff here</p>
4903 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4907 External links: with entity
4909 [http:// www.librarieswithoutborders.org Libraries without borders]
4911 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4914 <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>
4918 External links: Lone protocols are never linked (T105697)
4937 External links: No preceding word characters allowed (T67278)
4939 NOPEhttp://example.com
4940 N0http://example.com
4941 ok:http://example.com
4942 ok-http://example.com
4944 <p>NOPEhttp://example.com
4945 N0http://example.com
4946 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4947 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4952 External links: nofollow domain exception
4954 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4956 <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>.
4963 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4965 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4970 External image from https
4972 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4974 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4979 External image (when not allowed)
4981 wgAllowExternalImages=0
4983 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4985 <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>
4990 Link to non-http image, no img tag
4992 Link to non-http image, no img tag: ftp://example.com/test.jpg
4994 <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>
4999 External links: terminating separator
5001 Terminating separator: http://example.com/thing,
5003 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5008 External links: intervening separator
5010 Intervening separator: http://example.com/1,2,3
5012 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5017 External links: old bug with URL in query
5019 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5021 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5026 External links: old URL-in-URL bug, mixed protocols
5028 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5030 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5034 # Since Parsoid is starting to emit canonical wikitext for links,
5035 # [http://example.com http://example.com] will not RT back to that
5038 External links: URL in text
5042 URL in text: [http://example.com http://example.com]
5044 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5047 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5051 External links: Clickable images
5053 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5055 <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>
5058 <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>
5062 External links: raw ampersand
5064 Old & use: http://x&y
5066 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5071 External links: encoded ampersand
5073 Old & use: http://x&y
5075 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5078 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
5082 External links: encoded equals (T8102)
5084 http://example.com/?foo=bar
5086 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5089 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5093 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5094 ## does it number them. As discussed in T55505, we can identify
5095 ## autonumbered links via CSS.
5099 External links: [raw ampersand]
5101 Old & use: [http://x&y]
5103 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5106 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5109 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5110 # mode will return the [raw ampersand] wikitext
5112 External links: [encoded ampersand]
5114 parsoid=wt2html,wt2wt,html2html
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>
5125 External links: [raw equals]
5127 [http://example.com/?foo=bar]
5129 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5132 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5135 # note that parsoid html is identical to [raw equals] case; so html2wt
5136 # mode will return the [raw equals] wikitext
5138 External links: [encoded equals] (T8102)
5140 parsoid=wt2html,wt2wt,html2html
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 # xxx parsoid strips the IDN character, so the round-trip tests will
5151 # obviously fail and are disabled. --cscott
5153 External links: [IDN ignored character reference in hostname; strip it right off]
5155 parsoid=wt2html,wt2wt,html2html
5157 [http://e‌xample.com/]
5159 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5162 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5165 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5166 # Where an external link could easily circumvent the sanitization of the text of
5167 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5168 # test demands a higher standard. That's a bit strange.
5172 # http://example.com -> [http://example.com|http://example.com]
5173 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5175 # The first example is sanitized, but the second is not. Any security benefits
5176 # from this production are trivial to circumvent. Either remove this test and
5177 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5178 # the test accordingly.
5182 # xxx parsoid strips the IDN character, so the round-trip tests will
5183 # obviously fail and are disabled. --cscott
5185 External links: IDN ignored character reference in hostname; strip it right off
5187 parsoid=wt2html,html2html
5189 http://e‌xample.com/
5191 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5194 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5198 External links: www.jpeg.org (T2554)
5202 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5206 # parsoid doesn't explicitly mark autonumbered links, see T55505
5208 External links: URL within URL (T2002)
5210 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5212 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5215 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5219 T2361: URL inside bracketed URL
5221 [http://www.example.com/foo http://www.example.com/bar]
5223 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5228 T2361: URL within URL, not bracketed
5230 http://www.example.com/foo?=http://www.example.com/bar
5232 <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>
5237 T2289: ">"-token in URL-tail
5239 http://www.example.com/<hello>
5241 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5246 T2289: literal ">"-token in URL-tail
5248 http://www.example.com/<b>html</b>
5250 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5253 <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>
5257 T2289: ">"-token in bracketed URL
5259 [http://www.example.com/<hello> stuff]
5261 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5266 T2289: literal ">"-token in bracketed URL
5268 [http://www.example.com/<b>html</b> stuff]
5270 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5275 T2289: literal double quote at end of URL
5277 http://www.example.com/"hello"
5279 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5284 T2289: literal double quote in bracketed URL
5286 [http://www.example.com/"hello" stuff]
5288 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5293 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5295 [http://www.example.com test]
5297 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5302 External links: link text with spaces
5304 [http://www.example.com a b c]
5305 [http://www.example.com ''a'' ''b'']
5307 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5308 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5313 External links: wiki links within external link (T5695)
5315 parsoid=wt2html,html2html
5317 [http://example.com [[wikilink]] embedded in ext link]
5319 <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>
5322 <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>
5326 T2787: Links with one slash after the url protocol are invalid
5330 [http:/example.com title]
5332 <p>http:/example.com
5333 </p><p>[http:/example.com title]
5338 Bracketed external links with template-generated invalid target
5340 [{{echo|http:/example.com}} title]
5342 <p>[http:/example.com title]
5346 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5348 Broken wikilinks (but not external links) prevent templates from closing
5352 [http://example.com x
5354 {{echo|[http://example.com x}}
5360 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5361 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5363 </p><p>{{echo|[[Foo}}
5366 <p>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
5367 <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>
5369 <p>{{echo|[[Foo}}</p>
5373 Wikilinks with embedded newlines are not broken
5384 <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>
5396 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5400 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5401 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5405 T4702: Mismatched <i>, <b> and <a> tags are invalid
5407 ''[http://example.com text'']
5408 [http://example.com '''text]'''
5409 ''Something [http://example.com in italic'']
5410 ''Something [http://example.com mixed''''', even bold]'''
5411 '''''Now [http://example.com both''''']
5413 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5414 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5415 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5416 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5417 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5425 http://www.example.com/?title=AT%26T
5427 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5430 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5433 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5434 # % is actually legal in HTML5. Any change in output would need testing though.
5436 T6781, T7267: %25 in URL
5438 http://www.example.com/?title=100%25_Bran
5440 <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>
5443 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5447 T6781, T7267: %28, %29 in URL
5449 http://www.example.com/?title=Ben-Hur_%281959_film%29
5451 <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>
5454 <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>
5459 T6781: %26 in autonumber URL
5461 [http://www.example.com/?title=AT%26T]
5463 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5466 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5470 T6781, T7267: %26 in autonumber URL
5472 [http://www.example.com/?title=100%25_Bran]
5474 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5477 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5481 T6781, T7267: %28, %29 in autonumber URL
5483 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5485 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5488 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5493 T6781: %26 in bracketed URL
5495 [http://www.example.com/?title=AT%26T link]
5497 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5500 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5504 T6781, T7267: %25 in bracketed URL
5506 [http://www.example.com/?title=100%25_Bran link]
5508 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5513 T6781, T7267: %28, %29 in bracketed URL
5515 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5517 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5520 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5524 External link containing a period in the anchor. (T65947)
5526 [//foo.org/bar#baz. bang]
5528 [//foo.org/bar. bang]
5530 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5531 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5534 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5535 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5539 External link containing a single quote. (T65947)
5543 [//foo.org/bar'baz bang]
5545 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5546 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5549 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5550 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5554 External link containing double-single-quotes in text '' (T6598 sanity check)
5556 Some [http://example.com/ pretty ''italics'' and stuff]!
5558 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5563 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5565 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5567 <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>
5572 External link containing double-single-quotes with no space separating the url from text in italics
5574 [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]].]
5576 <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>
5579 <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>
5581 <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>
5585 External link with comments in link text
5587 [http://www.google.com Google <!-- comment -->]
5589 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5592 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5596 External link to bare IPv4 address
5598 [http://192.168.0.1 Link]
5600 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5603 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5607 URL-encoding in URL functions (single parameter)
5609 {{localurl:Some page|amp=&}}
5611 <p>/index.php?title=Some_page&amp=&
5616 URL-encoding in URL functions (multiple parameters)
5618 {{localurl:Some page|q=?&=&}}
5620 <p>/index.php?title=Some_page&q=?&amp=&
5627 http://example.com/index.php?foozoid%5B%5D=bar
5629 http://example.com/index.php?foozoid[]=bar
5631 <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>
5632 </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>
5635 <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>
5637 <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>
5641 IPv6 urls, autolink format (T23261)
5643 http://[2404:130:0:1000::187:2]/index.php
5645 Examples from RFC 2373, section 2.2:
5646 * http://[1080::8:800:200C:417A]/unicast
5647 * http://[FF01::101]/multicast
5648 * http://[::1]/loopback
5649 * http://[::]/unspecified
5650 * http://[::13.1.68.3]/ipv4compat
5651 * http://[::FFFF:129.144.52.38]/ipv4compat
5653 Examples from RFC 2732, section 2:
5654 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5655 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5656 * http://[3ffe:2a00:100:7031::1]
5657 * http://[1080::8:800:200C:417A]/foo
5658 * http://[::192.9.5.5]/ipng
5659 * http://[::FFFF:129.144.52.38]:80/index.html
5660 * http://[2010:836B:4179::836B:4179]
5663 <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>
5664 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5666 <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>
5667 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5668 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5669 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5670 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5671 <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>
5672 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5674 <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>
5675 <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>
5676 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5677 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5678 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5679 <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>
5680 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5683 <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>
5685 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5686 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5687 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5688 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5689 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5690 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5691 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5693 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5694 <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>
5695 <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>
5696 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5697 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5698 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5699 <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>
5700 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5704 IPv6 urls, bracketed format (T23261)
5706 [http://[2404:130:0:1000::187:2]/index.php test]
5708 Examples from RFC 2373, section 2.2:
5709 * [http://[1080::8:800:200C:417A] unicast]
5710 * [http://[FF01::101] multicast]
5711 * [http://[::1]/ loopback]
5712 * [http://[::] unspecified]
5713 * [http://[::13.1.68.3] ipv4compat]
5714 * [http://[::FFFF:129.144.52.38] ipv4compat]
5716 Examples from RFC 2732, section 2:
5717 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5718 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5719 * [http://[3ffe:2a00:100:7031::1] 3]
5720 * [http://[1080::8:800:200C:417A]/foo 4]
5721 * [http://[::192.9.5.5]/ipng 5]
5722 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5723 * [http://[2010:836B:4179::836B:4179] 7]
5726 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5727 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5729 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5730 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5731 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5732 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5733 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5734 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5735 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5737 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5738 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5739 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5740 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5741 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5742 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5743 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5746 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5748 <p>Examples from <a href="//tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5749 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5750 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5751 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5752 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5753 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5754 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5756 <p>Examples from <a href="//tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5757 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5758 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5759 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5760 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5761 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5762 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5763 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5767 Non-extlinks in brackets
5776 [{{echo|foo}} ''bar'']
5777 [{{echo|foo}}l's] errand
5778 [{{echo|foo}}l's errand]
5780 [url=http://example.com]
5781 [http:// bare protocols don't count]
5794 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5795 [http:// bare protocols don't count]
5803 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5804 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5805 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5806 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5807 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5808 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5809 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5810 [http:// bare protocols don't count]</p>
5814 Percent encoding in external links
5816 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5818 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5821 <p><a rel="mw:ExtLink"
5822 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5826 Use url link syntax for links where the content is equal the link target
5830 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5833 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5837 Parenthesis in external links, especially URL links
5841 http://example.com/test)
5843 http://example.com/(test)
5845 http://example.com/((test)
5847 (http://example.com/(test))
5849 (http://example.com/(test)))))
5851 http://example.com/a)b
5853 [http://example.com) foo]
5855 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5856 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5857 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5858 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5859 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5860 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5861 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5862 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5865 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5866 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5867 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5868 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5869 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5870 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5871 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5872 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5876 Parenthesis in external links, w/ transclusion or comment
5878 (http://example.com/{{echo|hi}})
5880 (http://example.com<!-- hi -->)
5882 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5883 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5886 <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>
5888 <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>
5892 Serialize <a> tags with invalid link targets as plain text
5894 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5896 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5897 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5898 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5899 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5902 <nowiki>*</nowiki>text
5903 <nowiki>[[foo]]</nowiki>
5904 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5908 mw:ExtLink -vs- mw:WikiLink (T94723)
5912 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5913 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5914 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5915 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5917 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5918 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5923 [[wikipedia:Foo|Bar]]
5924 [[wikipedia:Foo|Bar]]
5926 [[wikipedia:European_Robin|European Robin]]
5927 [[wikipedia:European_Robin|European Robin]]
5931 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5935 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5937 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5948 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5950 Normal text. '''''Bold italic text.''''' Normal text.
5952 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5953 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5958 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5959 # parser strips. The wikitext contains just the first half of the bold
5962 Unclosed and unmatched quotes
5964 '''''Bold italic text '''with bold deactivated''' in between.'''''
5966 '''''Bold italic text ''with italic deactivated'' in between.'''''
5970 ..spanning two paragraphs (should not work).'''
5972 '''Bold tag left open
5974 ''Italic tag left open
5978 <!-- Unmatching number of opening, closing tags: -->
5979 '''This year''''s election ''should'' beat '''last year''''s.
5981 ''Tom'''s car is bigger than ''Susan'''s.
5983 Plain ''italic'''s plain
5985 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5986 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5987 </p><p><b>Bold text..</b>
5988 </p><p>..spanning two paragraphs (should not work).
5989 </p><p><b>Bold tag left open</b>
5990 </p><p><i>Italic tag left open</i>
5992 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5993 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5994 </p><p>Plain <i>italic'</i>s plain
5997 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5998 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5999 </p><p><b>Bold text..</b>
6000 </p><p>..spanning two paragraphs (should not work).<b></b>
6001 </p><p><b>Bold tag left open</b>
6002 </p><p><i>Italic tag left open</i>
6005 <!-- Unmatching number of opening, closing tags: -->
6006 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6007 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6008 </p><p>Plain <i>italic'</i>s plain
6015 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6018 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6019 # is the bare minimum required by the spec, see:
6020 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6021 # Parsoid team replies: empty table tags are legal in HTML5
6023 A table with no data.
6036 A table with stray table end tags on start tag line (wt2html)
6040 {|style="color: red;"|}
6042 {|style="color: red;" |}
6046 {|style="color: red;"|} id="foo"
6050 {|style="color: red;" |} id="foo"
6054 <table style="color: red;"></table>
6056 <table style="color: red;">
6062 <table style="color: red;" id="foo">
6068 <table style="color: red;" id="foo">
6077 A table with no data (take 2)
6085 # A table with nothing but a caption is invalid XHTML, we might want to render
6086 # this as <p>caption</p>
6087 # Parsoid team replies: table with only a caption is legal in HTML5
6089 A table with nothing but a caption
6097 </caption><tr><td></td></tr></table>
6100 <table><caption> caption</caption></table>
6104 A table with caption with default-spaced attributes and a table row
6107 |+ style="color: red;" | caption1
6113 <caption style="color: red;"> caption1
6122 A table with captions with non-default spaced attributes and a table row
6125 |+style="color: red;"|caption2
6126 |+ style="color: red;"| caption3
6132 <caption style="color: red;">caption2
6134 <caption style="color: red;"> caption3
6143 Table td-cell syntax variations
6147 | foo bar foo || baz
6148 | style='color:red;' | baz
6149 | style='color:red;' || baz
6156 <td> foo bar foo </td>
6159 <td style="color:red;"> baz
6161 <td> style='color:red;' </td>
6189 Simple table but with multiple dashes for row wikitext
6208 Multiplication table
6210 {| border="1" cellpadding="2"
6211 |+Multiplication table
6213 ! × !! 1 !! 2 !! 3
6231 <table border="1" cellpadding="2">
6232 <caption>Multiplication table
6279 Accept "||" in table headings
6294 Accept "!!" in table data
6308 <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>
6313 Accept "||" in indented table headings
6323 </th></tr></table></dd></dl>
6328 Accept "!!" in templates
6342 <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>
6346 Accept "!!" in table headings after newline
6363 <p>b!!c</p></th></tr>
6368 Accept "!!" in table data of mixed wikitext / html syntax
6372 <tr><td>b!!c</td></tr>
6385 <tbody><tr><th>a</th></tr>
6386 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6391 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6408 Accept "| !" at start of line in tables (ignore !-attribute)
6412 | !style="color:red" | bar
6424 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 +/-
6428 |style='color:red;'|+1
6429 |style='color:blue;'|-1
6441 <td style="color:red;">+1
6443 <td style="color:blue;">-1
6467 |rowspan=2| Cell 2, row 1 (and 2)
6478 <td rowspan="2"> Cell 2, row 1 (and 2)
6496 {| bgcolor=#ABCDEF border=2
6501 |the original table again
6509 <table bgcolor="#ABCDEF" border="2">
6517 <td>the original table again
6523 Invalid attributes in table cell (T3830)
6537 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6541 | title="foo<nowiki>|</nowiki>" |bar
6542 | title="foo<nowiki>|</nowiki>" bar
6549 <td title="foo|">bar
6551 <td> title="foo|" bar
6556 <tbody><tr><td title="foo">bar</td>
6557 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6558 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6562 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6563 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6564 # *2wt modes will fail.
6566 Table security: embedded pipes
6568 parsoid=wt2html,html2html
6571 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6575 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6576 <td>]" onmouseover="alert(document.cookie)">test
6584 <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>
6588 Element attributes with double ! should not be broken up by <th>
6591 ! hi <div class="!!">ha</div> ho
6596 <th> hi <div class="!!">ha</div> ho
6601 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6606 ! and || in element attributes should not be parsed as <th>/<td>
6609 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6614 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6619 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6623 # FIXME: The output seems broken. Filed as T110268.
6625 ! and || in td attributes should not be parsed as <th>/<td>
6630 | style="color: red !important;" data-contrived="put this here ||" | foo
6635 <td> style="color: red !important;" data-contrived="put this here </td>
6641 <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>
6646 Break on | in element attribute in template
6648 parsoid=wt2html,html2html
6650 {{echo|1=<div class="hi|ho">ha</div>}}
6652 <p>ho">ha</div>
6655 <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>
6659 Break on | in element attribute name in template
6661 {{echo|<div cla|ss="hiho">ha</div>}}
6663 <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>
6667 Don't break on | in extension attribute in template
6669 {{echo|<ref name="hi|ho">ha</ref>}}
6673 <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>
6675 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi.7Cho-1" id="cite_note-hi.7Cho-1"><a href="./Main_Page#cite_ref-hi.7Cho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi.7Cho-1" class="mw-reference-text">ha</span></li></ol>
6678 ## We don't support roundtripping of these attributes in Parsoid.
6679 ## Selective serialization takes care of preventing dirty diffs.
6680 ## But, on edits, we dirty-diff the invalid attribute text.
6682 Invalid text in table attributes should be discarded
6686 {| <span>boo</span> style='border:1px solid black'
6687 | <span>boo</span> style='color:blue' | 1
6688 |<span>boo</span> style='color:blue'| 2
6691 <table style="border:1px solid black">
6693 <td style="color:blue"> 1
6695 <td style="color:blue"> 2
6699 <table style="border:1px solid black">
6701 <td style="color:blue"> 1</td>
6702 <td style="color:blue"> 2</td>
6708 Invalid text in table attributes should be preserved by selective serializer
6711 "modes": ["selser"],
6713 ["td:first-child", "text", "abc"],
6714 ["td + td", "text", "xyz"]
6718 {| <span>boo</span> style='border:1px solid black'
6719 | <span>boo</span> style='color:blue' | 1
6720 |<span>boo</span> style='color:blue'| 2
6723 {| <span>boo</span> style='border:1px solid black'
6724 | <span>boo</span> style='color:blue' |abc
6725 |<span>boo</span> style='color:blue'|xyz
6730 1. Template-generated table cell attributes and cell content
6735 || {{table_attribs_5}}
6736 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6737 |align=center {{table_attribs}}
6738 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6743 <td style="color:red;">Foo
6745 <td style="color:red;">Foo
6747 <td> style="color:red;"</td>
6750 <td style="color:red;">Foo
6752 <td align="center" style="color:red;">Foo
6754 <td align="center" style="color:red;">Foo
6760 2. Template-generated table cell attributes and cell content
6763 |{{table_attribs_2}}
6768 <td style="color:red;">Foo
6776 <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>
6777 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6782 3. Template-generated table cell attributes and cell content
6785 !align=center {{table_header_cells}}
6787 |align=center {{table_cells}}
6792 <th align="center" style="color:red;">Foo</th>
6793 <th style="color:red;"><i>Bar</i></th>
6794 <th style="color:brown;"><i>Foo</i> and Baz
6797 <td align="center" style="color:red;">Foo</td>
6798 <td style="color:red;"><i>Bar</i></td>
6799 <td style="color:brown;"><i>Foo</i> and Baz
6804 <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>
6805 <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>
6810 4. Template-generated table cell attributes and cell content inside a templated table
6813 !align=center {{table_header_cells}}
6815 |align=center {{table_cells}}
6820 <th align="center" style="color:red;">Foo</th>
6821 <th style="color:red;"><i>Bar</i></th>
6822 <th style="color:brown;"><i>Foo</i> and Baz
6825 <td align="center" style="color:red;">Foo</td>
6826 <td style="color:red;"><i>Bar</i></td>
6827 <td style="color:brown;"><i>Foo</i> and Baz
6831 <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}}]}'>
6832 <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>
6834 <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>
6838 ## Edge case fix to prevent future regressions
6840 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6843 |{{table_attribs_7}}
6848 <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>
6850 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
6854 Table with row followed by newlines and table heading
6856 parsoid=wt2html,html2html
6874 Table with empty line following the start tag
6876 parsoid=wt2html,html2html
6894 Table attributes with empty value
6896 parsoid=wt2html,html2html
6909 <tbody><tr><td style=""> hello</td></tr>
6914 Wikitext table with a lot of comments
6937 Wikitext table comments represented in parsoid dom
6939 {|<!--c1--><!--c2-->
6950 <table><!--c1--><!--c2-->
6951 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6952 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
6957 Wikitext table with double-line table cell
6974 Table cell with a single comment
6991 Table-cell after a comment-only-empty-line
7008 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7010 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
7016 Build table with {{!}}
7018 {{{!}} class="wikitable"
7021 {{!}}- style="color:red;"
7022 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
7025 <table class="wikitable">
7031 <tr style="color:red;">
7033 <td style="color:red;"> second data
7039 Build table with pipe as data
7041 {| class="wikitable"
7044 |- style="color:red;"
7045 | data || style="color:red;" | second data
7047 | style="color:red;" | data with | || style="color:red;" | second data with |
7049 || data with | ||| second data with |
7052 <table class="wikitable">
7058 <tr style="color:red;">
7060 <td style="color:red;"> second data
7063 <td style="color:red;"> data with | </td>
7064 <td style="color:red;"> second data with |
7067 <td> data with | </td>
7068 <td> second data with |
7074 Build table with wikilink
7076 {| class="wikitable"
7077 ! header || second header
7078 |- style="color:red;"
7079 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
7081 | data || second data [[Main Page|link|text with pipe]]
7084 <table class="wikitable">
7089 <tr style="color:red;">
7090 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
7091 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7095 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7100 # The expected HTML structure in this test is debatable. The PHP parser does
7101 # not parse this kind of table at all. The main focus for Parsoid is on
7102 # round-tripping, so this output is ok for now. TODO: revisit!
7104 Wikitext table with html-syntax row
7114 <td>foo</td></tr></tbody></table>
7118 Implicit <td> after a |-
7120 parsoid=wt2html,html2html
7135 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7136 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7138 </tr></tbody></table>
7142 Lists should be recognized in an implicit <td> context
7144 parsoid=wt2html,html2html
7161 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7162 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7164 </tr></tbody></table>
7168 Table cells not properly parsed in an implicit-td context
7172 {{table_attribs_4}} || a || b
7177 <td style="background-color:#DC241f;" width="10px"></td>
7184 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7185 <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>
7189 Parsoid: Round-trip tables directly followed by content (T53219)
7191 parsoid=wt2html,wt2wt
7216 Parsoid: Default to a newline after tables in new content (T53219)
7221 <tr><td>foo</td></tr></tbody></table> bar
7223 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7228 <nowiki> </nowiki>bar
7236 Parsoid: newline inducing block nodes don't suppress <nowiki>
7248 Parsoid: Row-syntax table headings followed by comment & table cells
7250 parsoid=wt2html,wt2wt
7254 <!-- foo --> || baz || quux
7268 <tbody><tr><th> foo </th><th> bar
7269 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7274 Parsoid: Recover better from broken table attributes
7294 <p>foo</p></td></tr>
7299 Tables: Digest broken attributes on table and tr tag
7315 # T137406: Whitespace in the HTML
7317 1. Generate correct wikitext for tables with thead/tbody/tfoot
7322 <caption>Test</caption>
7363 <caption>Test</caption>
7383 # T137406: No whitespace in the HTML
7385 2. Generate correct wikitext for tables with thead/tbody/tfoot
7389 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7399 Testing serialization after deletion in references
7408 hi <ref><div id="x">ho</div></ref>
7418 Testing serialization after deletion of table cells
7421 "modes": ["wt2wt", "selser"],
7429 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7439 Testing selser after addition of new row before first row (T125419)
7442 "modes": ["wt2wt", "selser"],
7444 [ "tr", "before", "<tr><td>X</td></tr>" ]
7460 Serialize new table rows in a HTML table using HTML tags
7463 "modes": ["wt2wt", "selser"],
7465 [ "tr", "before", "<tr><td>X</td></tr>" ]
7469 <table><tr><td>a</td></tr></table>
7471 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7475 Serialize new table cells in a HTML row using HTML tags
7478 "modes": ["wt2wt", "selser"],
7480 [ "td", "before", "<td>X</td>" ]
7484 <table><tr><td>a</td></tr></table>
7486 <table><tr><td>X</td><td>a</td></tr></table>
7490 Wikitext tables can be nested inside HTML tables
7494 <table data-parsoid='{"stx":"html"}'>
7497 <tr><td>foo</td></tr>
7512 Serialize wikitext list items as HTML list items when embedded in a HTML list
7516 <ul data-parsoid='{"stx": "html"}'>
7517 <li data-parsoid='{}'>a</li>
7527 # SSS FIXME: Is this actually a good thing given the
7528 # odd nested list output that is generated by MW?
7529 # <ul><li>foo<ul>..</ul></li></ul> instead of
7530 # <ul><li>foo</li><ul>..</ul></ul>
7532 Wikitext lists can be nested inside HTML lists
7536 <ul data-parsoid='{"stx": "html"}'>
7537 <li data-parsoid='{"stx": "html"}'>a
7542 <ul data-parsoid='{"stx": "html"}'>
7565 Plain link, capitalized
7569 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7574 Plain link, uncapitalized
7578 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7585 [[Main Page|The Main Page]]
7587 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7592 Piped link with comment in link text
7594 [[Main Page|The Main<!--front--> Page]]
7596 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7601 Piped link with multiple pipe characters in link text
7603 [[Main Page||The|Main|Page|]]
7605 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7608 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7612 Piped link with no link text
7614 [[Thomas Bek (bishop of St David's)|]]
7616 <p>[[Thomas Bek (bishop of St David's)|]]
7619 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7623 Piped link with empty link text
7625 [[Main Page|<nowiki/>]] - empty nowiki
7626 [[Main Page| ]] - empty space
7627 [[Main Page| ]] - empty non breaking space
7629 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7630 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7631 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7634 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7635 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7636 <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>
7644 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7649 Broken link with fragment
7651 [[Zigzagzogzagzig#zug]]
7653 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7658 Special page link with fragment
7660 [[Special:Version#anchor]]
7662 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7667 Nonexistent special page link with fragment
7669 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7671 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7678 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7680 <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>
7687 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7689 <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>!!!
7700 T45661: Piped links with identical prefixes
7702 [[prefixed article|prefixed articles with spaces]]
7704 [[prefixed article|prefixed articlesaoeu]]
7706 [[Main Page|Main Page test]]
7708 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7709 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7710 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7716 Link with HTML entity in suffix / tail
7718 [[Main Page]]", [[Main Page]]a
7720 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7723 <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>
7727 Link with 3 brackets
7738 Link with 4 brackets
7742 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7747 Piped link with 3 brackets
7749 [[[main page|the main page]]]
7751 <p>[[[main page|the main page]]]
7756 Piped link with extlink-like text
7759 [[Main Page|This is a [bar]]]
7762 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7763 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7764 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7767 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7768 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7769 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7773 Link with multiple pipes
7775 [[Main Page|The|Main|Page]]
7777 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7782 Anchor containing a #. (T65430)
7784 [[Main Page#And#Link]]
7786 <p><a href="/wiki/Main_Page#And.23Link" title="Main Page">Main Page#And#Link</a>
7789 <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>
7795 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7797 <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>
7802 Link with space in namespace
7804 [[User talk:Foo bar]]
7806 <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>
7811 MemoryAlpha:AlphaTest
7813 This is an article in the MemoryAlpha namespace
7814 (which shadows the memoryalpha interwiki link).
7818 Namespace takes precedence over interwiki link (T53680)
7820 [[MemoryAlpha:AlphaTest]]
7822 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7826 # The previous test doesn't work correctly in html2*, due to not recognizing the
7827 # link as an internal one. This one checks for the correct behavior.
7829 Link to namespace preferred over interwiki with correct rel attribute
7831 parsoid=html2wt,html2html
7833 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7835 [[MemoryAlpha:AlphaTest]]
7839 Piped link to namespace
7841 [[Meta:Disclaimers|The disclaimers]]
7843 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7850 [[Usually caused by a typo (oops}]]
7852 <p>[[Usually caused by a typo (oops}]]
7859 Just a test of an article title containing a percent.
7863 Link containing % (not as a hex sequence)
7866 [[7% Solution|7%25 Solution]]
7868 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7869 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7872 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7873 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7876 # note that the parsoid HTML is identical to the previous test output,
7877 # so the previous test ensures that the html2wt mode will generate the
7878 # "not as a hex sequence" wikitext.
7880 Link containing % as a single hex sequence interpreted to char
7882 parsoid=wt2wt,wt2html,html2html
7885 [[7%25 Solution|7%25 Solution]]
7887 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7888 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7891 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7892 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7896 Link containing % as a double hex sequence interpreted to hex sequence
7900 <p>[[7%2525 Solution]]
7904 ## Example for such a section: == < ==
7906 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7908 [[%23%3c]][[%23%3e]]
7910 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7913 <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>
7917 Link containing "<#" and ">#" as a hex sequences
7919 [[%3c%23]][[%3e%23]]
7921 <p>[[%3c%23]][[%3e%23]]
7926 Link containing an equals sign
7928 [[Special:BookSources/isbn=4-00-026157-6]]
7930 <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>
7933 <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>
7939 Just a test of an article title containing a tilde.
7942 # note that links containing signatures, like [[Foo~~~~]], are
7943 # massaged by the pre-save transform (PST) and so the tildes are never
7944 # seen by the parser.
7946 Link containing a tilde
7950 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7953 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7957 Link containing double-single-quotes '' (T6598)
7959 [[Lista d''e paise d''o munno]]
7961 <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>
7964 <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>
7968 Link containing double quotes and spaces
7972 <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>
7975 <p><a rel="mw:WikiLink" href="./Cool_%22Gator%22" title='Cool "Gator"'>Cool "Gator"</a></p>
7979 File containing double quotes and spaces
7981 [[File:Cool "Gator".png]]
7983 <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>
7987 Redirect containing double quotes and spaces
7989 #REDIRECT [[Cool "Gator"]]
7991 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7995 Link containing double-single-quotes '' in text (T6598 sanity check)
7997 Some [[Link|pretty ''italics'' and stuff]]!
7999 <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>!
8002 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8006 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8008 ''Some [[Link|pretty ''italics'' and stuff]]!''
8010 <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>
8015 Link with double quotes in title part (literal) and alternate part (interpreted)
8017 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8021 [[''Pentecoste''|Pentecoste]]
8023 [[''Pentecoste''|''Pentecoste'']]
8025 <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>
8026 </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>
8027 </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>
8028 </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>
8031 <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>
8032 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8033 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8034 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8038 Broken image links with HTML captions (T41700)
8040 [[File:Nonexistent|<script></script>]]
8041 [[File:Nonexistent|100x100px|<script></script>]]
8042 [[File:Nonexistent|<]]
8043 [[File:Nonexistent|a<i>b</i>c]]
8045 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8046 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8047 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8048 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8051 <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>
8052 <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>
8053 <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>
8054 <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>
8060 [[http://www.example.com]]
8062 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8065 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
8069 Plain link to URL with link text
8071 [[http://www.example.com Link text]]
8073 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8078 Plain link to protocol-relative URL
8080 [[//www.example.com]]
8082 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8085 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
8089 Plain link to protocol-relative URL with link text
8091 [[//www.example.com Link text]]
8093 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8098 Plain link to page with question mark in title
8104 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8105 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8109 # I'm fairly sure the expected result here is wrong.
8110 # We want these to be URL links, not pseudo-pages with URLs for titles....
8111 # However the current output is also pretty screwy.
8114 # I'm changing it to match the current output--it arguably makes more
8115 # sense in the light of the test above. Old expected result was:
8116 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8118 # But I think this test is bordering on "garbage in, garbage out" anyway.
8123 Piped link to URL: [[http://www.example.com|an example URL]]
8125 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8128 <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>
8132 Plain link in template argument
8136 {{echo|[http://www.example.com |123]}}
8138 {{echo|[[http://www.example.com |123]]}}
8140 {{echo|[[http://www.example.com |123]}}
8142 {{echo|[http://www.example.com |123]]}}
8144 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8145 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8146 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8147 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8150 <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>
8152 <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>
8154 <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>
8156 <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>
8160 T2002: [[page|http://url/]] should link to page, not http://url/
8162 [[Main Page|http://url/]]
8164 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8167 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8170 # Parsoid does not mark self-links, by design.
8172 T2337: Escaped self-links should be bold
8176 [[Bug462]] [[Bug462]]
8178 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8181 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></p>
8183 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8187 Self-link to section should not be bold
8191 [[Main Page#section]]
8193 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8204 Self-link to numeric title
8210 <p><a class="mw-selflink selflink">0</a>
8215 Link to numeric-equivalent title
8221 <p><a href="/wiki/00" title="00">00</a>
8226 <nowiki> inside a link
8228 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8230 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8235 Non-breaking spaces in title
8237 [[ Main Page ]]
8239 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8243 # Add new article for the test below so that it doesn't red-link
8251 Multiple spaces in titles should normalize to a single underscore
8253 parsoid=wt2html,wt2wt
8259 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8260 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8261 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8264 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8265 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8266 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8271 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8277 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8282 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8288 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8293 Internal link with en linktrail: no apostrophes (T29473)
8299 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8304 Internal link with ca linktrail with apostrophes (T29473)
8310 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8315 Internal link with kaa linktrail with apostrophes (T29473)
8321 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8326 Link with multiple ":" in a subpage-supporting namespace (T65636)
8328 [[User:Foo/Test/63636:Bar|Test]]
8330 <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>
8333 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8336 ## Mainly a sanity check for Parsoid
8338 Handle title parsing for subpages
8358 Link to a subpage from a namespace other than main
8365 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8368 <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>
8372 Ensure that transclusion titles are not url-decoded
8374 subpage title=[[Test]]
8377 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8379 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8382 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8386 Purely hash wikilink
8388 title=[[User:Test/123]]
8393 <p><a href="#a">b</a>
8396 <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>
8400 Serialization of purely hash wikilink
8402 title=[[User:Test/123]]
8406 <p><a href="#a">[[</a></p>
8408 [[#a|<nowiki>[[</nowiki>]]
8410 <p><a href="#a">[[</a>
8415 1. Interaction of linktrail and template encapsulation
8419 <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>
8423 2. Interaction of linktrail and template encapsulation
8427 {{echo|Some [[Fool]]}}s
8429 <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>
8433 3. Interaction of linktrail and template encapsulation
8437 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8439 <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>
8449 Internal link with is link prefix
8453 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8455 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8466 Internal link with is link trail and link prefix
8470 [[mótmælendatrú|xxx]]ar
8472 mótmælenda[[söfnuður]]
8473 mótmælenda[[söfnuður|söfnuðir]]
8474 mótmælenda[[söfnuður|söfnuðir]]xxx
8476 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8477 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8478 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8479 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8480 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8485 Parsoid link trail escaping
8487 parsoid=html2wt,html2html
8489 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8495 Parsoid link prefix escaping
8498 parsoid=html2wt,html2html
8500 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8502 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8506 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8514 [http://wp.org ''foo'']
8516 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8517 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8518 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8519 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8524 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8526 [[Foo|{{echo|a}} b {{echo|c}}]]
8528 <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>
8532 Link with angle bracket after anchor
8536 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8539 <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>
8543 ### Interwiki links (see maintenance/interwiki.sql)
8547 Inline interwiki link
8549 parsoid=wt2html,wt2wt,html2html
8551 [[MeatBall:SoftSecurity]]
8553 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8556 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8560 Inline interwiki link with empty title (T4372)
8562 parsoid=wt2html,wt2wt,html2html
8566 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8569 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8573 Interwiki link encoding conversion (T3636)
8575 *[[Wikipedia:ro:Olteniţa]]
8576 *[[Wikipedia:ro:Olteniţa]]
8578 <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>
8579 <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>
8583 <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>
8584 <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>
8589 Interwiki link with fragment (T4130)
8591 [[MeatBall:SoftSecurity#foo]]
8593 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8598 Link scenarios with escaped fragments
8601 [[Foo#Is this great?]]
8602 [[meatball:Foo#Is this great?]]
8604 <p><a href="#Is_this_great.3F">#Is this great?</a>
8605 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8606 <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>
8609 <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>
8610 <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>
8611 <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>
8614 # Ideally the wikipedia: prefix here should be proto-relative too
8615 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8616 # define the 'en' prefix, and originally the test used 'wikipedia',
8617 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8620 Different interwiki prefixes mapping to the same URL
8628 [[:wikipedia:Foo|Foo]]
8630 [[wikipedia:en:Foo]]
8632 [[:wikipedia:en:Foo]]
8636 <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>
8638 <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>
8640 <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>
8642 <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>
8644 <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>
8646 <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>
8648 <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>
8652 Interwiki links that cannot be represented in wiki syntax
8655 [[meatball:ok#foo|ok with fragment]]
8656 [[meatball:ok_as_well?|ok ending with ? mark]]
8657 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8658 [http://de.wikipedia.org/wiki/#foo is just fragment]
8661 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8662 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8663 <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>
8664 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8665 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8668 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8669 <a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8670 <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>
8671 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8672 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8676 Interwiki links: trail
8678 [[wikipedia:Foo|Ba]]r
8680 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8683 <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>
8687 Local interwiki link
8689 parsoid=wt2html,wt2wt,html2html
8691 [[local:Template:Foo]]
8693 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8696 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8699 # Parsoid does not mark self-links, by design.
8701 Local interwiki link: self-link to current page
8704 parsoid=wt2html,wt2wt,html2html
8708 <p><a class="mw-selflink selflink">local:Main Page</a>
8711 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8715 Local interwiki link: prefix only (T66167)
8717 parsoid=wt2html,wt2wt,html2html
8721 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8724 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8728 Local interwiki link: with additional interwiki prefix (T63357)
8730 parsoid=wt2html,wt2wt,html2html
8732 [[local:meatball:Hello]]
8734 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8737 <p><a rel="mw:ExtLink" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8741 Multiple local interwiki link prefixes
8743 [[local:local:local:local:mi:local:Foo]]
8745 parsoid=wt2html,wt2wt,html2html
8747 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8750 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8754 ### Interlanguage links
8755 ### Language links (so that searching for '### language' matches..)
8767 <p>Blah blah blah</p>
8768 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8771 ## parsoid html2wt will lose the space variations
8773 Interlanguage link with spacing
8775 parsoid=wt2html,wt2wt,html2html
8783 <p>Blah blah blah</p>
8784 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8788 Double interlanguage link
8797 <p>Blah blah blah</p>
8798 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8799 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8802 ## parsoid html2wt will lose the space variations
8804 Interlanguage link variations
8806 parsoid=wt2html,wt2wt,html2html
8816 <p>Blah blah blah</p>
8817 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8818 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8819 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8823 Escaping of interlanguage links (T129218, T156308)
8827 [[ : zh : Chinese ]]
8830 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8831 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8835 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8836 <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8840 Multiple colons escaping interlanguage links
8848 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8853 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8855 [[:::es:Spanish]]</p>
8858 ## parsoid html2wt will normalize the space to _
8860 Space and question mark encoding in interlanguage links (T95473)
8862 parsoid=wt2html,wt2wt,html2html
8870 <p>Blah blah blah</p>
8871 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8875 Interlanguage link, with prefix links
8885 <p>Blah blah blah</p>
8886 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8890 Double interlanguage link, with prefix links (T10897)
8901 <p>Blah blah blah</p>
8902 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8903 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8907 "Extra" interlanguage links (T34189 / gerrit 111390)
8915 <p>Blah blah blah</p>
8916 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8919 ## PHP parser tests script needs an update
8920 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8922 Language links render as inline links if $wgInterwikiMagic=false
8924 wgInterwikiMagic=false
8925 parsoid=wt2html,wt2wt,html2html
8930 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8933 ## PHP parser tests script needs an update
8934 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8936 Language links render as inline links in the Talk namespace
8939 parsoid=wt2html,wt2wt,html2html
8944 <p>Blah blah blah <a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8948 Parsoid-specific test: Wikilinks with should RT properly
8954 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8959 Parsoid T55221: Wikilinks should be properly entity-escaped
8961 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8963 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8964 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8966 He&nbsp;llo [[Foo|He&nbsp;llo]]
8968 He&nbsp;llo He&nbsp;llo
8970 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8971 </p><p>He&nbsp;llo He&nbsp;llo
8975 # html2wt will fail because of title normalization without data-parsoid
8977 Parsoid: handle constructor well
8979 parsoid=wt2html,wt2wt
8985 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8986 </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>
8989 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8991 <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>
9000 # Note that `ko` isn't a known interlanguage prefix
9002 Parsoid: recognize interlanguage links without a target page
9012 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9014 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9017 # Note that `ko` isn't a known interwiki prefix
9019 Parsoid: recognize interwiki links without a target page
9021 parsoid=wt2html,wt2wt,html2html
9027 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9028 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9031 <p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9032 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9036 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9040 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9043 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9047 Interlanguage link with preceding local interwiki link (T70085)
9049 parsoid=wt2html,wt2wt,html2html
9052 [[local:es:Spanish]]
9055 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9059 <a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9063 Looks like an interlanguage link, but is actually a local interwiki
9065 parsoid=wt2html,wt2wt,html2html
9071 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9075 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9079 ### Redirects, Parsoid-only
9083 1. Simple redirect to page
9085 #REDIRECT [[Main Page]]
9087 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9091 2. Other redirect variants
9093 #REDIRECT [[Main_Page]]
9095 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9098 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9099 # This tests the Parsoid bail-out code.
9101 3. Other redirect variants
9103 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9105 <ol><li data-parsoid>REDIRECT [[[[Bar]]]]</li></ol>
9109 4. Redirect to a templated destination
9111 #REDIRECT [[{{echo|Foo}}bar]]
9113 <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"}]]}'/>
9119 parsoid=wt2html,wt2wt
9124 <li>REDIRECT [[]]</li></ol>
9128 Optional colon in #REDIRECT
9130 # the colon is archaic syntax. we support it for wt2html, but we
9131 # don't care that it roundtrips back to the modern syntax.
9132 parsoid=wt2html,html2html
9134 #REDIRECT:[[Main Page]]
9136 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9140 Whitespace in #REDIRECT with optional colon
9142 # the colon and gratuitous whitespace is archaic syntax. we support
9143 # it for wt2html, but we don't care that it roundtrips back to the
9144 # modern syntax (without extra whitespace)
9145 parsoid=wt2html,html2html
9152 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9156 Piped link in #REDIRECT
9158 # content after piped link is ignored. we support this syntax,
9159 # but don't care that the piped link is lost when we roundtrip this.
9162 #REDIRECT [[Main Page|bar]]
9164 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9168 Redirect to category (T104502)
9170 parsoid=wt2html,wt2wt
9172 #REDIRECT [[Category:Foo]]
9174 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9178 Redirect to category with URL encoding (T104502)
9182 #REDIRECT [[Category%3AFoo]]
9184 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9188 Redirect to category page
9190 #REDIRECT [[:Category:Foo]]
9192 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9196 Redirect to image page (1)
9198 #REDIRECT [[File:Wiki.png]]
9200 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9204 Redirect to image page (2)
9206 #REDIRECT [[Image:Wiki.png]]
9208 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9211 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9212 # Next test confirms this.
9214 Redirect to language (1) (T104918)
9216 parsoid=wt2html,wt2wt,html2html
9218 #REDIRECT [[en:File:Wiki.png]]
9220 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9224 Redirect to language (2) (T104918)
9226 #REDIRECT [[:en:File:Wiki.png]]
9228 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9232 Redirect to interwiki (T104918)
9234 #REDIRECT [[meatball:File:Wiki.png]]
9236 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9240 Non-English #REDIRECT
9244 #TILVÍSUN [[Main Page]]
9246 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9250 Redirect syntax under text isn't considered a redirect
9253 #redirect [[Main Page]]
9256 <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>
9264 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9271 Redirect followed by block on the same line
9275 #REDIRECT [[Main Page]]<!-- haha -->== hi ==
9277 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi"> hi </h2>
9281 Redirect followed by a newline
9283 #REDIRECT [[Main Page]]
9286 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9291 Redirect followed by multiple newlines
9293 #REDIRECT [[Main Page]]
9298 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9305 Drop duplicate redirects
9309 <link rel="mw:PageProp/redirect" href="./Foo"/>
9310 <link rel="mw:PageProp/redirect" href="./Bar"/>
9311 <link rel="mw:PageProp/redirect" href="./Baz"/>
9330 Broken br tag sanitization
9338 # TODO: Fix html2html mode (T53055)!
9340 Parsoid: Broken br tag recognition
9353 Incorrecly removing closing slashes from correctly formed XHTML
9355 <br style="clear:both;" />
9357 <p><br style="clear:both;" />
9362 Failing to transform badly formed HTML into correct XHTML
9364 <br style="clear: left;">
9365 <br style="clear: right;">
9366 <br style="clear: both;">
9368 <p><br style="clear: left;" />
9369 <br style="clear: right;" />
9370 <br style="clear: both;" />
9374 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9375 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9377 Handling html with a div self-closing tag
9386 <p><div title />
9390 <p><div title=bar />
9391 <div title=bar/>
9393 <div title="bar/"></div>
9397 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9398 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9399 <div title="" data-parsoid='{"stx":"html","selfClose":true,"brokenHTMLTag":true}'></div>
9400 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9401 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9402 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9406 Handling html with a br self-closing tag
9433 Horizontal ruler (should it add that extra space?)
9448 Horizontal ruler -- 4+ dashes render hr
9457 Horizontal ruler -- eats additional dashes on the same line
9466 Horizontal ruler -- does not collapse dashes on consecutive lines
9477 Horizontal ruler -- <4 dashes render as plain text
9486 Horizontal ruler -- Supports content following dashes on same line
9498 ### Block-level elements
9507 <ul><li>Common list</li>
9509 <li>item 3</li></ul>
9520 <ol><li>Numbered list</li>
9522 <li> item 3</li></ol>
9536 ***#Number on level 4
9538 **#Number on level 3
9539 **#Number on level 3
9543 #** Level 3, but ordered
9546 <ol><li> with numbers</li></ol>
9547 <ul><li> and bullets</li></ul>
9548 <ol><li> and numbers</li></ol></li>
9550 <ul><li>bullet level 2
9551 <ul><li>bullet level 3
9552 <ol><li>Number on level 4</li></ol></li></ul></li>
9554 <ol><li>Number on level 3</li>
9555 <li>Number on level 3</li></ol></li></ul>
9556 <ol><li>number level 2</li></ol></li>
9558 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9559 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9564 1. Nested mixed wikitext and html list
9567 * <ul><li>ho</li></ul>
9572 <li> <ul><li>ho</li></ul></li>
9574 <ul><li> ho</li></ul></li></ul>
9578 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9580 <ul><li> ho</li></ul></li></ul>
9584 2. Nested mixed wikitext and html list (incompatible)
9587 : {{echo|<li>ho</li>}}
9590 <dd> <li>ho</li></dd></dl>
9594 <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>
9604 <ul><li>bar</li></ul></li></ul>
9614 <ul><li><ul><li>foo</li></ul></li>
9620 Nested lists 3 (first element empty)
9626 <ul><li>bar</li></ul></li></ul>
9631 Nested lists 4 (first element empty)
9636 <ul><li><ul><li></li></ul></li>
9642 Nested lists 5 (both elements empty)
9647 <ul><li><ul><li></li></ul></li>
9653 Nested lists 6 (both elements empty)
9659 <ul><li></li></ul></li></ul>
9664 Nested lists 7 (skip initial nesting levels)
9668 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9673 Nested lists 8 (multiple nesting transitions)
9681 <ul><li><ul><li> bar</li></ul></li>
9682 <li> baz</li></ul></li>
9688 Nested lists 9 (extension interaction)
9694 <ul><li data-parsoid='{}'><ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9698 1. Lists with start-of-line-transparent tokens before bullets: Comments
9711 2. Lists with start-of-line-transparent tokens before bullets: Template close
9716 <ul><li>foo bar</li>
9722 List items are not parsed correctly following a <pre> block (T2785)
9728 <ul><li> <pre>foo</pre></li>
9729 <li> <pre>bar</pre></li>
9733 <ul><li> <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9734 <li> <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9739 List items from template
9750 * notSOL{{inner list}}
9753 <ul><li> item 1</li>
9754 <li> item 2</li></ul>
9755 <ul><li> item 0</li>
9757 <li> item 2</li></ul>
9758 <ul><li> item 0</li>
9761 <li> item 2</li></ul>
9766 List interrupted by empty line or heading
9774 <ul><li> foo</li></ul>
9775 <ul><li><ul><li> bar</li></ul></li></ul>
9776 <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>
9777 <ul><li> Another list item</li></ul>
9782 Multiple list tags generated by templates
9803 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9806 <!--This line will NOT split the list-->
9808 <!--This line will NOT split the list either-->
9810 <!--foo--> <!----> <!--This line NOT split the list either-->
9821 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9824 <!--This line will NOT split the list-->
9826 <!--This line will NOT split the list either-->
9828 <!--foo--> <!----> <!--This line NOT split the list
9841 (The PHP parser relies on Tidy for the hack)
9843 parsoid=wt2html,wt2wt
9847 * {{echo|<li>templated li-hack}}
9848 * <!--foo--> <li> unsupported li-hack with preceding comments
9851 <li><li>not a li-hack
9858 <li>templated li-hack</li>
9859 <li>unsupported li-hack with preceding comments</li>
9862 <li>not a li-hack</li>
9867 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9894 Parsoid: Test of whitespace serialization with Templated bullets
9901 <li> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
9905 # ------------------------------------------------------------------------
9906 # The next set of tests are about Parsoid's ability to handle badly nested
9907 # tags (parse, minimize scope of fixup, and roundtrip back)
9908 # ------------------------------------------------------------------------
9911 Unbalanced closing block tags break a list
9912 (php parser relies on Tidy to fix up)
9930 # Parsoid fails this test, but it might be tricky to support properly.
9933 Unbalanced closing non-block tags don't break a list
9934 (php parser relies on Tidy to fix up)
9941 <li><span>a</span></li>
9942 <li><span>b</span></li>
9956 Unclosed formatting tags that straddle lists are closed and reopened
9957 (php parser relies on Tidy to fix up)
9959 parsoid=wt2html,wt2wt,html2html
9969 <ol><li> <s> a</s></li>
9970 <li><s> b </s></li></ol>
9975 1. List embedded in a formatting tag
9982 <li><small>foo</small></li>
9992 ## Ugly Parsoid output here
9993 ## Not sure what the right output is.
9995 2. List embedded in a formatting tag
10002 <li><small>a</small></li>
10003 <li><small>b</small></li>
10010 <li><small>b</small></li>
10014 # Ugly Parsoid and PHP parser output here
10015 # Not sure if we want to make this a test!
10018 ## 3. Unclosed formatting tags in list elements
10022 ## !! html/php+tidy
10024 ## <li><small>a</small></li>
10025 ## <li><small><small>b</small></small></li>
10029 ## <li><small>a</small></li>
10031 ## <li><small>b</small></li>
10035 # This is a bug in the PHP parser + tidy combination.
10036 # (The </tr> tag gets parsed as text and html-escaped by PHP,
10037 # and then fostered out of the table by tidy.)
10038 # We believe the Parsoid output to be correct.
10040 Table with missing opening <tr> tag
10042 parsoid=wt2html,wt2wt
10060 # Note that the current date is hard-coded as
10061 # 1970-01-01T00:02:03Z (a Thursday)
10062 # when running parser tests. The timezone is also fixed to GMT, so
10063 # local date will be identical to current date.
10066 Magic Word: {{CURRENTDAY}}
10075 Magic Word: {{CURRENTDAY2}}
10084 Magic Word: {{CURRENTDAYNAME}}
10093 Magic Word: {{CURRENTDOW}}
10102 Magic Word: {{CURRENTMONTH}}
10111 Magic Word: {{CURRENTMONTH1}}
10120 Magic Word: {{CURRENTMONTHABBREV}}
10122 {{CURRENTMONTHABBREV}}
10129 Magic Word: {{CURRENTMONTHNAME}}
10131 {{CURRENTMONTHNAME}}
10138 Magic Word: {{CURRENTMONTHNAMEGEN}}
10140 {{CURRENTMONTHNAMEGEN}}
10147 Magic Word: {{CURRENTTIME}}
10156 Magic Word: {{CURRENTHOUR}}
10165 Magic Word: {{CURRENTWEEK}} (T6594)
10174 Magic Word: {{CURRENTYEAR}}
10183 Magic Word: {{CURRENTTIMESTAMP}}
10185 {{CURRENTTIMESTAMP}}
10192 Magic Words LOCAL (UTC)
10196 * {{LOCALMONTHNAME}}
10197 * {{LOCALMONTHNAMEGEN}}
10198 * {{LOCALMONTHABBREV}}
10207 * {{LOCALTIMESTAMP}}
10222 <li> 19700101000203</li></ul>
10227 Magic Word: {{FULLPAGENAME}}
10229 title=[[User:Ævar Arnfjörð Bjarmason]]
10230 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10234 <p>User:Ævar Arnfjörð Bjarmason
10239 Magic Word: {{FULLPAGENAMEE}}
10241 title=[[User:Ævar Arnfjörð Bjarmason]]
10242 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10246 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10251 Magic Word: {{TALKSPACE}}
10253 title=[[User:Ævar Arnfjörð Bjarmason]]
10254 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10263 Magic Word: {{TALKSPACE}}, same namespace
10265 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10266 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10275 Magic Word: {{TALKSPACE}}, main namespace
10277 title=[[Parser Test]]
10278 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10287 Magic Word: {{TALKSPACEE}}
10289 title=[[User:Ævar Arnfjörð Bjarmason]]
10290 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10299 Magic Word: {{SUBJECTSPACE}}
10301 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10302 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10311 Magic Word: {{SUBJECTSPACE}}, same namespace
10313 title=[[User:Ævar Arnfjörð Bjarmason]]
10314 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10323 Magic Word: {{SUBJECTSPACE}}, main namespace
10325 title=[[Parser Test]]
10326 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10334 Magic Word: {{SUBJECTSPACEE}}
10336 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10337 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10346 Magic Word: {{NAMESPACE}}
10348 title=[[User:Ævar Arnfjörð Bjarmason]]
10349 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10358 Magic Word: {{NAMESPACEE}}
10360 title=[[User:Ævar Arnfjörð Bjarmason]]
10361 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10370 Magic Word: {{NAMESPACENUMBER}}
10372 title=[[User:Ævar Arnfjörð Bjarmason]]
10373 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10375 {{NAMESPACENUMBER}}
10382 Magic Word: {{SUBPAGENAME}}
10384 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10385 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10394 Magic Word: {{SUBPAGENAMEE}}
10396 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10397 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10406 Magic Word: {{ROOTPAGENAME}}
10408 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10409 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10413 <p>Ævar Arnfjörð Bjarmason
10418 Magic Word: {{ROOTPAGENAMEE}}
10420 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10421 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10425 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10430 Magic Word: {{BASEPAGENAME}}
10432 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10433 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10437 <p>Ævar Arnfjörð Bjarmason
10442 Magic Word: {{BASEPAGENAMEE}}
10444 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10445 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10449 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10454 Magic Word: {{TALKPAGENAME}}
10456 title=[[User:Ævar Arnfjörð Bjarmason]]
10457 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10461 <p>User talk:Ævar Arnfjörð Bjarmason
10466 Magic Word: {{TALKPAGENAMEE}}
10468 title=[[User:Ævar Arnfjörð Bjarmason]]
10469 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10473 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10478 Magic Word: {{SUBJECTPAGENAME}}
10480 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10481 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10483 {{SUBJECTPAGENAME}}
10485 <p>User:Ævar Arnfjörð Bjarmason
10490 Magic Word: {{SUBJECTPAGENAMEE}}
10492 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10493 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10495 {{SUBJECTPAGENAMEE}}
10497 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10502 Magic Word: {{NUMBEROFFILES}}
10504 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10513 Magic Word: {{PAGENAME}}
10515 title=[[User:Ævar Arnfjörð Bjarmason]]
10516 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10520 <p>Ævar Arnfjörð Bjarmason
10525 Magic Word: {{PAGENAME}} with metacharacters
10527 title=[['foo & bar = baz']]
10528 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10532 <p><i>'foo & bar = baz'</i>
10535 <p><i>'foo & bar = baz'</i></p>
10539 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10541 title=[[*RFC 1234 http://example.com/]]
10542 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10546 <p>*RFC 1234 http://example.com/
10549 <p>*RFC 1234 http://example.com/</p>
10553 Magic Word: {{PAGENAMEE}}
10555 title=[[User:Ævar Arnfjörð Bjarmason]]
10556 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10560 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10565 Magic Word: {{PAGENAMEE}} 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: {{REVISIONID}}
10581 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10588 flags=vary-revision-id
10592 Magic Word: {{SCRIPTPATH}}
10594 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10602 Magic Word: {{STYLEPATH}}
10604 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10613 Magic Word: {{SERVER}}
10615 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10619 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10624 Magic Word: {{SERVERNAME}}
10626 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10635 Magic Word: {{SITENAME}}
10637 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10646 Magic Word: {{PAGELANGUAGE}}
10649 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10658 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10660 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10669 Case-sensitive magic words, when cased differently, should just be template transclusions
10676 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10677 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10678 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10679 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10684 Case-insensitive magic words should still work with weird casing.
10694 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10698 # From plwiki:PLOS_ONE
10700 Parsoid: Page property magic word with magic word contents
10702 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10704 <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>"}]]}'/>
10707 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10708 # But, this is a limitation of our representation and is documented in
10709 # TemplateHandler.js in processSpecialMagicWord
10711 Parsoid: Template-generated DISPLAYTITLE
10713 {{{{echo|DISPLAYTITLE}}:Foo}}
10717 wgAllowDisplayTitle=true
10718 wgRestrictDisplayTitle=false
10723 <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"}]]}'/>
10727 Namespace 1 {{ns:1}}
10736 Namespace 1 {{ns:01}}
10745 Namespace 0 {{ns:0}} (T6783)
10753 Namespace 0 {{ns:00}} (T6783)
10761 Namespace -1 {{ns:-1}}
10770 Namespace User {{ns:User}}
10779 Namespace User talk {{ns:User_talk}}
10788 Namespace User talk {{ns:uSeR tAlK}}
10797 Namespace File {{ns:File}}
10806 Namespace File {{ns:Image}}
10815 Namespace (lang=de) Benutzer {{ns:User}}
10826 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10832 <p>Benutzer Diskussion
10839 {{urlencode:hi world?!}}
10840 {{urlencode:hi world?!|WIKI}}
10841 {{urlencode:hi world?!|PATH}}
10842 {{urlencode:hi world?!|QUERY}}
10852 Magic Word: prioritize type info over data-parsoid
10856 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10862 Magic Word: serialize on separate line (parsoid)
10864 parsoid=wt2wt,html2wt
10870 foo<meta property="mw:PageProp/notoc"/>bar
10874 Magic Word: rt non-english wikis
10881 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10885 __proto__ is treated as normal wikitext (T105997)
10897 Magic links: internal link to RFC (T2479)
10901 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10904 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10908 Magic links: RFC (T2479)
10912 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
10915 <p><a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
10919 Magic links: RFC (T67278)
10921 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10923 <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.
10926 <p>This is <a href="//tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10930 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10932 RFC      822
10936 <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 <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>
10947 Magic links: ISBN (T3937)
10951 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10954 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10958 Magic links: ISBN (T67278)
10960 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10962 <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.
10965 <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>
10969 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10971 ISBN      978 0 316 09811 3
10977 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10984 <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>
10992 Magic links: PMID incorrectly converts space to underscore
10996 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10999 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
11003 Magic links: PMID (T67278)
11005 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11007 <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.
11010 <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>
11014 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11016 PMID      1234
11020 <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 <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>
11030 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11031 # since these are ExtLinkText, not MagicLinkText
11033 Magic links: use appropriate serialization for "almost" magic links.
11035 X[[Special:BookSources/0978739256|foo]]
11037 X[//tools.ietf.org/html/rfc1234 foo]
11039 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11040 </p><p>X<a rel="nofollow" class="external text" href="//tools.ietf.org/html/rfc1234">foo</a>
11043 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11044 <p>X<a rel="mw:ExtLink" href="//tools.ietf.org/html/rfc1234">foo</a></p>
11048 Magic links: All disabled (T47942)
11050 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11056 <p>ISBN 0-306-40615-2
11067 Nonexistent template
11069 {{thistemplatedoesnotexist}}
11071 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11076 Template with invalid target containing tags
11078 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11080 <p>{{a<b>b</b>|foo|a=b|a = b}}
11085 Template with invalid target containing unclosed tag
11087 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11089 <p>{{a<b>|foo|a=b|a = b}}</b>
11094 Template with invalid target containing wikilink
11098 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11101 <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>
11105 Template with just whitespace in it, T70421
11109 <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>
11115 This is a test template
11123 <p>This is a test template
11128 Template with explicit namespace
11132 <p>This is a test template
11140 This is a test template with parameter {{{param}}}
11146 {{paramtest|param=foo}}
11148 <p>This is a test template with parameter foo
11153 Template:paramtestnum
11155 [[{{{1}}}|{{{2}}}]]
11159 Template unnamed parameter
11161 {{paramtestnum|Main Page|the main page}}
11163 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11168 Template:templatesimple
11174 Template:templateredirect
11176 #redirect [[Template:templatesimple]]
11180 Template:templateasargtestnum
11186 Template:templateasargtest
11188 {{template{{{templ}}}}}
11192 Template:templateasargtest2
11198 Template with template name as unnamed argument
11200 {{templateasargtestnum|templatesimple}}
11207 Template with template name as argument
11209 {{templateasargtest|templ=simple}}
11216 Template with template name as argument (2)
11218 {{templateasargtest2|templ=templatesimple}}
11225 Template:templateasargtestdefault
11227 {{{{{templ|templatesimple}}}}}
11237 Template with default value
11239 {{templateasargtestdefault}}
11246 Template with default value (value set)
11248 {{templateasargtestdefault|templ=templa}}
11257 {{templateredirect}}
11262 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11266 Template with argument in separate line
11268 {{ templateasargtest |
11276 Template with complex template as argument
11279 param ={{ templateasargtest |
11280 templ = simple }}}}
11282 <p>This is a test template with parameter (test)
11287 Templates with templated name
11289 {{{{echo|echo}}|foo}}
11290 {{{{echo|inner list}} }}
11294 <ul><li> item 1</li></ul>
11297 <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>
11298 <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>
11301 # Parsoid markup is deliberate "broken". This is an edge case.
11302 # See long comment in TemplateHandler.js:convertAttribsToString.
11304 Templates with invalid templated targets
11315 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11320 Template with thumb image (with link in description)
11322 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11324 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>
11327 <p>This is a test template with parameter</p>
11328 <div class="thumb tright">
11329 <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>
11330 <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>
11334 <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>
11338 Template:complextemplate
11340 {{{1}}} {{paramtest|
11341 param ={{{param}}}}}
11345 Template with complex arguments
11348 param ={{ templateasargtest |
11349 templ = simple }}|[[Template:complextemplate|link]]}}
11351 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11356 T2553: link with two variables in a piped link
11359 |[[{{{1}}}|{{{2}}}]]
11364 <td>[[{{{1}}}|{{{2}}}]]
11369 <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>
11375 Abort table cell attribute parsing on wikilink
11378 | testing [[one|two]] | three || four
11379 | testing one two | three || four
11380 | testing="[[one|two]]" | three || four
11385 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11391 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11397 <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>
11398 <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>
11399 <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>
11404 Don't abort table cell attribute parsing if wikilink is found in template arg
11407 | Test {{#tag:ref|One two "[[three]]" four}}
11411 <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>
11416 Magic variable as template parameter
11418 {{paramtest|param={{SITENAME}}}}
11420 <p>This is a test template with parameter MediaWiki
11427 [[{{{param}}}|link]]
11431 Template parameter as link source
11433 {{linktest|param=Main Page}}
11435 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11440 Template:paramtest2
11442 including another template, {{paramtest|param={{{arg}}}}}
11446 Template passing argument to another template
11448 {{paramtest2|arg='hmm'}}
11450 <p>including another template, This is a test template with parameter 'hmm'
11461 Template as link source
11465 [[{{linktest2}}|Main Page]]
11467 [[{{linktest2}}]]Page
11469 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11470 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11471 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11489 Template infinite loop
11493 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11498 Template from main namespace
11517 T2529: Template with table, not included at beginning of line
11536 T2523: Template shouldn't eat newline (or add an extra one before table)
11556 T2041: Template parameters shown as broken links
11565 Template with targets containing wikilinks
11571 {{[[{{echo|foo}}]]}}
11573 {{{{echo|[[foo}}]]}}
11575 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11576 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11580 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11581 <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>
11582 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11592 Templates: Double quotes as template target
11599 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11603 ## This test is about making sure Parsoid's data-mw is well formed in the
11604 ## face of multiple templates with intersecting and overlapping ranges. The
11605 ## wikitext itself is wretched.
11607 Templates with intersecting and overlapping ranges
11632 <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":""}]]}'>
11634 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11636 <tbody><tr><td>hi</td></tr>
11641 Template:MSGNW test
11643 ''None'' of '''this''' should be
11645 but rather passed unmodified
11653 # hmm, fix this or just deprecate msgnw and document its behavior?
11657 {{msgnw:MSGNW test}}
11659 <p>''None'' of '''this''' should be
11661  but rather passed unmodified
11662 {{test}}
11666 <!-- comment -->
11673 {{int:youhavenewmessages|lots of money|not!}}
11675 <p>You have lots of money (not!).
11680 int keyword - non-existing message
11691 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11695 <includeonly> and <noinclude> being included
11706 <onlyinclude>Foo</onlyinclude>bar
11710 <onlyinclude> being included
11722 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11726 <onlyinclude> and <includeonly> being included
11735 <includeonly> and <noinclude> on a page
11737 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11744 Un-closed <noinclude>
11751 <onlyinclude> on a page
11753 <onlyinclude>Foo</onlyinclude>bar
11760 Un-closed <onlyinclude>
11767 Self-closed noinclude, includeonly, onlyinclude tags
11778 Unbalanced includeonly and noinclude tags
11782 |b</noinclude></noinclude>
11783 |c</noinclude></includeonly>
11784 |d</includeonly></includeonly>
11793 <td>c</includeonly>
11795 <td>d</includeonly></includeonly>
11801 Template:Includeonly section
11804 ==Includeonly section==
11810 T8563: Edit link generation for section shown by <includeonly>
11812 {{includeonly section}}
11814 <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>
11815 <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>
11819 # Uses same input as the contents of [[Template:Includeonly section]]
11821 T8563: Section extraction for section shown by <includeonly>
11826 ==Includeonly section==
11834 T8563: Edit link generation for section suppressed by <includeonly>
11837 ==Includeonly section==
11841 <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>
11846 T8563: Section extraction for section suppressed by <includeonly>
11851 ==Includeonly section==
11859 Un-closed <includeonly>
11864 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11867 ## We used to, but no longer wt2wt this test since the default serializer
11868 ## will normalize the include directives to serialize on their own line.
11869 ## Selser will take care of preserving formatting in scenarios where they
11870 ## intermingled with other wikitext.
11872 Includes and comments at SOL
11874 parsoid=wt2html,html2html
11876 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
11880 </noinclude>* stuff
11883 <includeonly>can have stuff</includeonly>=== here ===
11886 <h2><span class="mw-headline" id="hu">hu</span></h2>
11889 <ul><li> stuff</li>
11890 <li> here</li></ul>
11891 <h3><span class="mw-headline" id="here">here</span></h3>
11894 <!-- 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>
11896 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11898 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
11899 <li> here</li></ul>
11901 <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>
11905 # TODO: test with DOM fragment reuse!
11907 Parsoid: DOM fragment reuse
11909 parsoid=wt2wt,wt2html
11911 a{{echo|b<table></table>c}}d
11923 <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>
11925 <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">
11926 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11927 </span><p about="#mwt2">cd</p>
11929 <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">
11931 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11933 </span><p about="#mwt3">b</p>
11937 Parsoid: Merge double tds (T52603)
11942 |{{echo|{{!}} foo}}
11946 <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>
11951 Parsoid: Merge double tds in nested transclusion content (T52603)
11957 |{{echo|{{!}} foo}}
11961 <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}}]}'>
11963 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11969 ### <includeonly> and <noinclude> in attributes
11972 0. includeonly around the entire attribute
11974 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11976 <p><span id="v2">bar</span>
11981 1. includeonly in html attr key
11983 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11985 <p><span id="foo">bar</span>
11990 2. includeonly in html attr value
11992 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11993 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11995 <p><span id="v1">bar</span>
11996 <span id="v1">bar</span>
12001 3. includeonly in part of an attr value
12003 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12005 <p><span style="color:red;">bar</span>
12010 4. includeonly in table attributes
12034 ### Preprocessor precedence tests
12035 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12037 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12039 Preprocessor precedence 1: link is rightmost opening
12045 But close-brace is not a valid character in a link title:
12048 However, we can still tell this was handled as a link in the preprocessor:
12049 {{echo|[[Foo}}|bar]]|bat}}
12051 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12052 </p><p>But close-brace is not a valid character in a link title:
12054 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12058 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12059 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12060 <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>
12064 Preprocessor precedence 2: template is rightmost opening
12073 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12077 Preprocessor precedence 3: language converter is rightmost opening
12093 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12094 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12095 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12099 Preprocessor precedence 4: left-most angle bracket
12110 Template:Precedence5
12116 Preprocessor precedence 5: tplarg takes precedence over template
12118 {{Precedence5|Bullet}}
12120 <ul><li> Bar</li></ul>
12123 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li> Bar</li></ul>
12127 Preprocessor precedence 6: broken link is rightmost opening
12133 {{echo|[[Foo|bar|bat=baz}}
12136 </p><p>{{echo|[[Foo|bar|bat=baz}}
12139 <p>{{echo|[[Foo}}</p>
12140 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12143 # This next test exposes a difference between PHP and Parsoid:
12144 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12145 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12146 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12147 # outer `[[Foo` extends until the `y]]`
12148 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12149 # intermediate result (after template expansion), and link processing
12150 # happens on this intermediate result, which moves the wikilink
12151 # boundary leftward to `[[Foo|Bar]]`
12152 # 2b) Parsoid works in a single step, so it's going to keep the
12153 # wikilink as extending to the `y]]`
12154 # 3a) Then PHP does linktrail processing which slurps up the trailing
12155 # `xy` inside the link.
12156 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12157 # `z` inside the link.
12158 # This is "correct" behavior. Parsoid's basic worldview is that the
12159 # `]]` inside the template shouldn't be allowed to leak out to affect
12160 # the surrounding wikilink. PHP may match Parsoid (in the future)
12161 # if you use {{#balance}} (T114445).
12164 Preprocessor precedence 7: broken template is rightmost opening
12170 [[Foo|{{echo|Bar]]-x}}-y]]-z
12172 Careful: linktrails can move the end of the wikilink:
12173 [[Foo|{{echo|y']]a}}l]]l
12175 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12176 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12177 </p><p>Careful: linktrails can move the end of the wikilink:
12178 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12181 <p>[[Foo|{{echo|Bar]]</p>
12182 <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>
12183 <p>Careful: linktrails can move the end of the wikilink:
12184 <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>
12188 Preprocessor precedence 8: broken language converter is rightmost opening
12199 Template:Preprocessor_precedence_9
12204 ;7: {{{{{{{4}}}}}}}
12208 Preprocessor precedence 9: groups of braces
12210 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12216 <ul><li> Bar</li></ul>
12220 <dd> {Bullet}</dd></dl>
12223 <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}}]}'>
12228 </dl><ul about="#mwt1">
12230 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12239 Template:Preprocessor_precedence_10
12246 ;6: -{{{{{{4}}}}}}-
12247 ;7: -{{{{{{{5}}}}}}}-
12251 Preprocessor precedence 10: groups of braces with leading dash
12255 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12261 <ul><li> Bar-</li></ul>
12268 <ul><li> Bar-</li></ul>
12272 <dd> raw2</dd></dl>
12275 <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}}]}'>
12277 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12280 </dl><ul about="#mwt1">
12282 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12286 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12289 </dl><ul about="#mwt1">
12291 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12295 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12300 Preprocessor precedence 11: found during visual diff testing
12302 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12304 {{echo|-{{echo|-{{echo|x}}}}}}
12306 {{echo|-{{echo|x}}}}
12308 <p><span>-<span>-x</span></span>
12313 <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>
12315 <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>
12317 <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>
12321 Preprocessor precedence 12: broken language converter closed by brace.
12325 This form breaks the template, which is unfortunate:
12326 * {{echo|foo-{bar}bat}}
12328 But if the broken language converter markup is inside an extension
12329 tag, nothing bad happens:
12330 * <nowiki>foo-{bar}bat</nowiki>
12331 * {{echo|<nowiki>foo-{bar}bat</nowiki>}}
12332 * <pre>foo-{bar}bat</pre>
12333 * {{echo|<pre>foo-{bar}bat</pre>}}
12335 <tag>foo-{bar}bat</tag>
12336 {{echo|<tag>foo-{bar}bat</tag>}}
12339 <p>This form breaks the template, which is unfortunate:</p>
12341 <li>{{echo|foo-{bar}bat}}</li>
12343 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12345 <li>foo-{bar}bat</li>
12346 <li>foo-{bar}bat</li>
12367 <p>This form breaks the template, which is unfortunate:</p>
12369 <li>{{echo|foo-{bar}bat}}</li>
12371 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12373 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12374 <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>
12375 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12376 <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>
12378 <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>
12382 Preprocessor precedence 13: broken language converter in external link
12386 * [http://example.com/-{foo Example in URL]
12387 * [http://example.com Example in -{link} description]
12388 * {{echo|[http://example.com/-{foo Breaks template, however]}}
12391 <li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12392 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12393 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12397 <li><a rel="mw:ExtLink" href="http://example.com/-{foo">Example in URL</a></li>
12398 <li><a rel="mw:ExtLink" href="http://example.com">Example in -{link} description</a></li>
12399 <li>{{echo|<a rel="mw:ExtLink" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12404 Preprocessor precedence 14: broken language converter in comment
12406 * <!--{{foo}}--> ...should be ok
12407 * <!---{{foo}}--> ...extra dashes
12408 * {{echo|foo<!-- -{bar} -->bat}} ...should be ok
12411 <li>...should be ok</li>
12412 <li>...extra dashes</li>
12413 <li>foobat ...should be ok</li>
12417 <li><!--{{foo}}--> ...should be ok</li>
12418 <li><!---{{foo}}--> ...extra dashes</li>
12419 <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>
12424 Preprocessor precedence 15: broken brace markup in headings
12428 __NOTOC__ __NOEDITSECTION__
12437 ===5 foo{{{bar 5===
12442 <h3><span class="mw-headline" id="1_foo.5Bbar_1">1 foo[bar 1</span></h3>
12444 <h3><span class="mw-headline" id="2_foo.5B.5Bbar_2">2 foo[[bar 2</span></h3>
12446 <h3><span class="mw-headline" id="3_foo.7Bbar_3">3 foo{bar 3</span></h3>
12448 <h3><span class="mw-headline" id="4_foo.7B.7Bbar_4">4 foo{{bar 4</span></h3>
12450 <h3><span class="mw-headline" id="5_foo.7B.7B.7Bbar_5">5 foo{{{bar 5</span></h3>
12452 <h3><span class="mw-headline" id="6_foo-.7Bbar_6">6 foo-{bar 6</span></h3>
12455 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/
12457 <h3>1 foo[bar 1</h3>
12459 <h3>2 foo[[bar 2</h3>
12461 <h3>3 foo{bar 3</h3>
12463 <h3>4 foo{{bar 4</h3>
12465 <h3>5 foo{{{bar 5</h3>
12467 <h3>6 foo-{bar 6</h3>
12472 Preprocessor precedence 16: matching closing braces to opening braces
12477 -{{{echo|foo}}bar}-
12482 <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>
12486 ### Token Stream Patcher tests
12488 ### These tests won't always pass wt2wt and other modes because
12489 ### on serialization, the table will be output on a new line.
12490 ### For now, we are blacklisting them, and using this to test selser.
12494 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12496 parsoid=wt2html,wt2wt
12498 {{echo|}}{| width = '100%'
12502 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12503 <tbody><tr><td>foo</td></tr>
12507 ## We used to, but no longer wt2wt this test since the default serializer
12508 ## will normalize the include directives to serialize on their own line.
12509 ## Selser will take care of preserving formatting in scenarios where they
12510 ## intermingled with other wikitext.
12512 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12516 <includeonly>a</includeonly>{| {{{b}}}
12520 <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":""}]]}'>
12521 <tbody><tr><td>c</td></tr>
12526 Table wikitext syntax outside wiki-tables
12530 ! not a table heading
12533 | class="foo bar" | baz
12541 ! not a table heading
12544 | class="foo bar" | baz
12553 ### Testing parsing of templates where a template arg
12554 ### has the same name as the template itself.
12560 {{{quote|{{{1}}}}}}
12564 Templates: Template Name/Arg clash: 1. Use of positional param
12573 Templates: Template Name/Arg clash: 2. Use of named param
12575 {{quote|quote=foo}}
12582 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12591 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12595 Templates: 1. Simple use
12604 Templates: 2. Inside a block tag
12606 <div>{{echo|Foo}}</div>
12607 <blockquote>{{echo|Foo}}</blockquote>
12610 <blockquote>Foo</blockquote>
12620 Templates: P-wrapping: 1a. Templates on consecutive lines
12631 Templates: P-wrapping: 1b. Templates on consecutive lines
12645 Templates: P-wrapping: 1c. Templates on consecutive lines
12648 {{echo|bar}} <div>baz</div>
12661 Templates: P-wrapping: 1d. Template preceded by comment-only line
12670 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12674 Templates: Inline Text: 1. Multiple template uses
12676 {{echo|Foo}}bar{{echo|baz}}
12683 Templates: Inline Text: 2. Back-to-back template uses
12685 {{echo|Foo}}{{echo|bar}}
12692 Templates: Block Tags: 1. Multiple template uses
12694 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12696 <div>Foo</div><div>bar</div><div>baz</div>
12701 Templates: Block Tags: 2. Back-to-back template uses
12703 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12705 <div>Foo</div><div>bar</div>
12709 # This is an edge case relating to paragraph wrapping.
12711 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12716 <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
12721 Templates: Links: 1. Simple example
12723 {{echo|[[Foo|bar]]}}
12725 <p><a href="/wiki/Foo" title="Foo">bar</a>
12730 Templates: Links: 2. Generation of link href
12732 [[{{echo|Foo}}|bar]]
12734 <p><a href="/wiki/Foo" title="Foo">bar</a>
12739 Templates: Links: 3. Generation of part of a link href
12741 [[Fo{{echo|o}}|bar]]
12743 [[Foo{{echo|bar}}]]
12745 [[Foo{{echo|bar}}baz]]
12747 [[Foo{{echo|bar}}|bar]]
12749 [[:Foo{{echo|bar}}]]
12751 [[:Foo{{echo|bar}}|bar]]
12753 <p><a href="/wiki/Foo" title="Foo">bar</a>
12754 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12755 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12756 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12757 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12758 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12763 Templates: Links: 4. Multiple templates generating link href
12765 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12767 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12772 Templates: Links: 5. Generation of link text
12774 [[Foo|{{echo|bar}}]]
12776 <p><a href="/wiki/Foo" title="Foo">bar</a>
12781 Templates: Links: 5. Nested templates (only outermost template should be marked)
12783 {{echo|[[{{echo|Foo}}|bar]]}}
12785 <p><a href="/wiki/Foo" title="Foo">bar</a>
12790 Templates: HTML Tag: 1. Generation of HTML attr. key
12792 <div {{echo|style}}="color:red;">foo</div>
12794 <div style="color:red;">foo</div>
12799 Templates: HTML Tag: 2. Generation of HTML attr. value
12801 <div style={{echo|'color:red;'}}>foo</div>
12803 <div style="color:red;">foo</div>
12808 Templates: HTML Tag: 3. Generation of HTML attr key and value
12810 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12812 <div style="color:red;">foo</div>
12817 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12819 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12821 <div title="This is a long title with just one piece templated">foo</div>
12826 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12828 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12830 <div title="This is a long title with just one piece templated">foo</div>
12835 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12837 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12839 <div title="This is a long title with just one piece templated">foo</div>
12843 # SSS FIXME: While it is great we added support for all this,
12844 # do we want to make this part of the spec? Maybe we want to
12845 # deprecate this kind of usage in the future?
12847 Templates: HTML Tag: 7. Generation of partial attribute key string
12849 <div st{{echo|yle}}="color:red;">foo</div>
12851 <div style="color:red;">foo</div>
12856 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12858 <div {{echo|1=id="v1"}}>bar</div>
12860 <div id="v1">bar</div>
12865 Templates: HTML Tag: 9. Multiple template-generated attributes
12867 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12869 <div id="v1" title="foo">bar</div>
12874 Templates: Support for templates generating attributes and content
12876 {| {{mixed_attr_content_template}}
12881 <table style="color:red;" title="T48811">
12891 <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|}"]}'>
12900 1. Entities and nowikis inside templated attributes should be handled correctly
12902 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12904 <div style="background:#f9f9f9;">foo</div>
12907 <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>
12911 2. Entities and nowikis inside templated attributes should be handled correctly
12914 |{{table_attribs_3}}
12919 <td style="background:#f9f9f9;">Foo
12924 <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>
12929 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12932 |{{table_attribs_3}}
12937 <td style="background:#f9f9f9;">Foo
12941 <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}}]}'>
12942 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12948 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12951 | {{table_attribs_6}} hi
12956 <td style="background: red;"> hi
12961 <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>
12966 Templates: HTML Tables: 1. Generating start of a HTML table
12968 {{echo|<table><tr><td>foo</td>}}</tr></table>
12970 <table><tr><td>foo</td></tr></table>
12975 Templates: HTML Tables: 2a. Generating middle of a HTML table
12977 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12979 <table><tr><td>foo</td></tr></table>
12984 Templates: HTML Tables: 2b. Generating middle of a HTML table
12986 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12988 <table><tr><td>foo</td></tr></table>
12993 Templates: HTML Tables: 3. Generating end of a HTML table
12995 <table><tr>{{echo|<td>foo</td></tr></table>}}
12997 <table><tr><td>foo</td></tr></table>
13002 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13004 {{echo|<table>}}<tr><td>foo</td></tr></table>
13006 <table><tr><td>foo</td></tr></table>
13011 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13013 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13015 <table><tr><td>foo</td></tr></table>
13020 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13022 <table><tr>{{echo|<td>}}foo</td></tr></table>
13024 <table><tr><td>foo</td></tr></table>
13029 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13031 <table><tr><td>foo{{echo|</td>}}</tr></table>
13033 <table><tr><td>foo</td></tr></table>
13038 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13040 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13042 <table><tr><td>foo</td></tr></table>
13047 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13049 <table><tr><td>foo</td></tr>{{echo|</table>}}
13051 <table><tr><td>foo</td></tr></table>
13056 Templates: HTML Tables: 5. Proper fostering of categories from inside
13058 parsoid=wt2html,wt2wt
13060 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13061 <!--Two categories (T52330)-->
13062 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13064 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13065 <!--Two categories (T52330)-->
13066 <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>
13070 Templates: Wiki Tables: 1a. Fostering of entire template content
13078 <tr><td></td></tr></table>
13090 Templates: Wiki Tables: 1b. Fostering of entire template content
13103 <tr><td></td></tr></table>
13117 Templates: Wiki Tables: 2. Fostering of partial template content
13127 <tr><td></td></tr></table>
13140 Templates: Wiki Tables: 3. td-content via multiple templates
13143 {{echo|{{pipe}}a}}{{echo|b}}
13154 Templates: Wiki Tables: 4. Templated tags, no content
13160 <tr><td></td></tr></table>
13165 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13179 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13192 ## This test case is very specific to Parsoid's internals
13193 ## and is hence only tested for Parsoid's code. Parsoid uses
13194 ## a <meta> marker tag for <ref> tags and they are expanded
13195 ## much later. We are verifying that this <meta> tag usage
13196 ## doesn't prevent foster parenting.
13198 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13200 {{PartialTable}}<ref>foo</ref>
13205 <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">
13209 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
13213 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13223 <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{{!}}}"]}'>
13224 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13228 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13233 Templates: Lists: Multi-line list-items via templates
13235 *{{echo|a {{nonexistent|
13237 *{{echo|b {{nonexistent|
13240 <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>
13241 <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>
13246 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13248 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13250 <p><i>ab</i>c<i>d</i>e
13255 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13256 (PHP parser generates misnested html)
13258 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13260 <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>
13264 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13265 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13267 parsoid=wt2html,wt2wt
13269 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13271 <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>
13272 <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>
13273 <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>
13277 Templates: Ugly nesting: 4. Divs opened/closed across templates
13279 a<div>b{{echo|c</div>d}}e
13290 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
13296 |{{echo|foo</table>}}
13300 <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|}"]}'>
13304 <td>foo</td></tr></tbody></table><span about="#mwt1">
13305 </span><span about="#mwt1">|bar</span><span about="#mwt1">
13310 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
13320 <td>1. {{echo|foo </table>}}</td>
13322 <td>2. {{echo|baz </table>}}</td>
13335 <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>"]}'>
13340 <td>1. foo </td></tr></tbody></table></td>
13342 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
13343 </span><span about="#mwt2">
13344 </span><span about="#mwt2">
13345 </span><span about="#mwt2">abc</span><span about="#mwt2">
13346 </span><span about="#mwt2">
13347 </span><span about="#mwt2">
13348 </span><span about="#mwt2">
13349 </span><span about="#mwt2">
13350 </span><span about="#mwt2">
13351 </span><span about="#mwt2">xyz</span><span about="#mwt2">
13352 </span><span about="#mwt2">
13357 Templates: Ugly templates: 3. newline-only template parameter
13366 # This looks like a bug: a single newline triggers p/br for some reason.
13368 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13377 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13378 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13380 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13386 <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
13387 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13391 # T66017 -- ugly wikitext with fostered content generates two template ranges
13392 # that are "identical" and generate nesting cycles in the algorithm
13394 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13396 {{echo|<table><tr><td><table>}}
13400 <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"}'>
13401 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13402 </table></td></tr></tbody></table>
13406 Templates: Parameters substituted at the top-level
13408 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13412 <p><i>who</i> me? <b>never!</b>
13416 <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>
13418 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13422 Templates: Param with empty arg in the final position
13426 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13430 Parser Functions: 1. Simple example
13439 Parser Functions: 2. Nested use (only outermost should be marked up)
13448 ### Pre-save transform tests
13451 pre-save transform: subst:
13457 This is a test template
13461 pre-save transform: normal template
13471 pre-save transform: nonexistent template
13475 {{thistemplatedoesnotexist}}
13477 {{thistemplatedoesnotexist}}
13481 pre-save transform: subst magic variables
13490 # This is T2089, which I fixed. -- wtm
13492 pre-save transform: subst: templates with parameters
13496 {{subst:paramtest|param="something else"}}
13498 This is a test template with parameter "something else"
13502 Template:nowikitest
13504 <nowiki>'''not wiki'''</nowiki>
13508 pre-save transform: nowiki in subst (T3188)
13512 {{subst:nowikitest}}
13514 <nowiki>'''not wiki'''</nowiki>
13518 Template:commenttest
13520 This template has <!-- a comment --> in it.
13524 pre-save transform: comment in subst (T3936)
13528 {{subst:commenttest}}
13530 This template has <!-- a comment --> in it.
13534 pre-save transform: unclosed tag
13538 <nowiki>'''not wiki'''
13540 <nowiki>'''not wiki'''
13544 pre-save transform: mixed tag case
13548 <NOwiki>'''not wiki'''</noWIKI>
13550 <NOwiki>'''not wiki'''</noWIKI>
13554 pre-save transform: unclosed comment in <nowiki>
13558 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13560 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13563 # Leading @ in this template definition works around a limitation
13564 # in parsoid's parserTests which otherwise strips the <span> from the
13565 # result (confusing it for a template wrapper)
13569 @<span onmouseover="alert('crap')">Oh no</span>
13573 (confirming safety of fix for subst T3936)
13575 {{Template:dangerous}}
13577 <p>@<span>Oh no</span>
13582 pre-save transform: comment containing gallery (T7024)
13586 <!-- <gallery>data</gallery> -->
13588 <!-- <gallery>data</gallery> -->
13592 pre-save transform: comment containing extension
13596 <!-- <tag>data</tag> -->
13598 <!-- <tag>data</tag> -->
13602 pre-save transform: comment containing nowiki
13606 <!-- <nowiki>data</nowiki> -->
13608 <!-- <nowiki>data</nowiki> -->
13612 pre-save transform: <noinclude> in subst (T5298)
13622 pre-save transform: <onlyinclude> in subst (T5298)
13626 {{subst:Includes2}}
13634 {{<includeonly>subst:</includeonly>Includes}}
13638 Template:SafeSubstTest
13640 {{<includeonly>safesubst:</includeonly>Includes}}
13644 T24297: safesubst: works during PST
13648 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13654 T24297: safesubst: works during normal parse
13663 subst: does not work during normal parse
13667 <p>{{subst:Includes}}
13672 pre-save transform: context links ("pipe trick")
13676 [[Article (context)|]]
13679 [[Bar:Article (context)|]]
13680 [[:Bar:Article (context)|]]
13682 [[|Article (context)]]
13686 [[Article (context)|Article]]
13687 [[Bar:Article|Article]]
13688 [[:Bar:Article|Article]]
13689 [[Bar:Article (context)|Article]]
13690 [[:Bar:Article (context)|Article]]
13692 [[Article (context)]]
13693 [[Bar:X (Y) Z|X (Y) Z]]
13694 [[:Bar:X (Y) Z|X (Y) Z]]
13698 pre-save transform: context links ("pipe trick") with interwiki prefix
13702 [[interwiki:Article|]]
13703 [[:interwiki:Article|]]
13704 [[interwiki:Bar:Article|]]
13705 [[:interwiki:Bar:Article|]]
13707 [[interwiki:Article|Article]]
13708 [[:interwiki:Article|Article]]
13709 [[interwiki:Bar:Article|Bar:Article]]
13710 [[:interwiki:Bar:Article|Bar:Article]]
13714 pre-save transform: context links ("pipe trick") with parens in title
13716 pst title=[[Somearticle (context)]]
13720 [[Article (context)|Article]]
13724 pre-save transform: context links ("pipe trick") with comma in title
13726 pst title=[[Someplace, Somewhere]]
13729 [[Otherplace, Elsewhere|]]
13730 [[Otherplace, Elsewhere, Anywhere|]]
13732 [[Otherplace, Somewhere|Otherplace]]
13733 [[Otherplace, Elsewhere|Otherplace]]
13734 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13738 pre-save transform: context links ("pipe trick") with parens and comma
13740 pst title=[[Someplace (IGNORED), Somewhere]]
13743 [[Otherplace (place), Elsewhere|]]
13745 [[Otherplace, Somewhere|Otherplace]]
13746 [[Otherplace (place), Elsewhere|Otherplace]]
13750 pre-save transform: context links ("pipe trick") with comma and parens
13752 pst title=[[Who, me? (context)]]
13755 [[Me, Myself, and I (1937 song)|]]
13757 [[Yes, you. (context)|Yes, you.]]
13758 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13762 pre-save transform: context links ("pipe trick") with namespace
13764 pst title=[[Ns:Somearticle]]
13768 [[Ns:Article|Article]]
13772 pre-save transform: context links ("pipe trick") with namespace and parens
13774 pst title=[[Ns:Somearticle (context)]]
13778 [[Ns:Article (context)|Article]]
13782 pre-save transform: context links ("pipe trick") with namespace and comma
13784 pst title=[[Ns:Somearticle, Context, Whatever]]
13788 [[Ns:Article, Context, Whatever|Article]]
13792 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13794 pst title=[[Ns:Somearticle, Context (context)]]
13798 [[Ns:Article (context)|Article]]
13802 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13804 pst title=[[Ns:Somearticle (IGNORED), Context]]
13808 [[Ns:Article, Context|Article]]
13812 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13816 [[Article(context)|]]
13817 [[Bar:Article(context)|]]
13818 [[:Bar:Article(context)|]]
13819 [[|Article(context)]]
13823 [[Article(context)|Article]]
13824 [[Bar:Article(context)|Article]]
13825 [[:Bar:Article(context)|Article]]
13826 [[Article(context)]]
13827 [[Bar:X(Y)Z|X(Y)Z]]
13828 [[:Bar:X(Y)Z|X(Y)Z]]
13832 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13836 [[Article (context)|]]
13837 [[Bar:Article (context)|]]
13838 [[:Bar:Article (context)|]]
13839 [[|Article (context)]]
13843 [[Article (context)|Article]]
13844 [[Bar:Article (context)|Article]]
13845 [[:Bar:Article (context)|Article]]
13846 [[Article (context)]]
13847 [[Bar:X (Y) Z|X (Y) Z]]
13848 [[:Bar:X (Y) Z|X (Y) Z]]
13852 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13856 [[Article(context)|]]
13857 [[Bar:Article(context)|]]
13858 [[:Bar:Article(context)|]]
13859 [[|Article(context)]]
13863 [[Article(context)|Article]]
13864 [[Bar:Article(context)|Article]]
13865 [[:Bar:Article(context)|Article]]
13866 [[Article(context)]]
13867 [[Bar:X(Y)Z|X(Y)Z]]
13868 [[:Bar:X(Y)Z|X(Y)Z]]
13872 pre-save transform: context links ("pipe trick") with commas (T23660)
13876 [[Article (context), context|]]
13877 [[Article (context),context|]]
13878 [[Bar:Article (context), context|]]
13879 [[Bar:Article (context),context|]]
13880 [[:Bar:Article (context), context|]]
13881 [[:Bar:Article (context),context|]]
13883 [[Article (context), context|Article]]
13884 [[Article (context),context|Article]]
13885 [[Bar:Article (context), context|Article]]
13886 [[Bar:Article (context),context|Article]]
13887 [[:Bar:Article (context), context|Article]]
13888 [[:Bar:Article (context),context|Article]]
13892 Parsoid: backwards pipe trick
13899 <p>[[|<b>bar</b>]]</p>
13903 pre-save transform: trim trailing empty lines
13907 Empty lines are trimmed
13913 Empty lines are trimmed
13917 pre-save transform: Signature expansion
13924 * <noinclude>~~~</noinclude>
13925 * <includeonly>~~~</includeonly>
13926 * <onlyinclude>~~~</onlyinclude>
13928 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13929 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13930 * 00:02, 1 January 1970 (UTC)
13931 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13932 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13933 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13938 ParserOutput flags from signature expansion (T84843)
13945 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13946 flags=user-signature
13951 pre-save transform: Signature expansion in nowiki tags (T2093)
13957 <nowiki>~~~~</nowiki>
13959 <includeonly><nowiki>~~~~</nowiki></includeonly>
13961 <noinclude><nowiki>~~~~</nowiki></noinclude>
13963 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13965 {{subst:Foo}} shall be converted to FOO
13967 As well as inside noinclude/onlyinclude
13968 <noinclude>{{subst:Foo}}</noinclude>
13969 <onlyinclude>{{subst:Foo}}</onlyinclude>
13971 But not inside includeonly
13972 <includeonly>{{subst:Foo}}</includeonly>
13976 <nowiki>~~~~</nowiki>
13978 <includeonly><nowiki>~~~~</nowiki></includeonly>
13980 <noinclude><nowiki>~~~~</nowiki></noinclude>
13982 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13984 FOO shall be converted to FOO
13986 As well as inside noinclude/onlyinclude
13987 <noinclude>FOO</noinclude>
13988 <onlyinclude>FOO</onlyinclude>
13990 But not inside includeonly
13991 <includeonly>{{subst:Foo}}</includeonly>
13995 Parsoid: Recognize nowiki with trailing space in tags
13999 <nowiki ><div>[[foo]]</nowiki >
14007 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14014 Parsoid: Recognize nowiki with odd capitalization
14018 <noWikI ><div>[[foo]]</Nowiki >
14020 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14025 Parsoid: Escape nowiki with trailing space in tags
14029 <p><nowiki > foo </nowiki ></p>
14030 <p>a<nowiki />b</p>
14031 <p>c<nowiki/ >d</p>
14033 <nowiki > foo </nowiki >
14041 Parsoid: Escape weird noWikI capitalizations
14045 <p><noWikI > foo </NoWikI ></p>
14047 <noWikI > foo </NoWikI >
14051 ### Message transform tests
14054 message transform: magic variables
14064 message transform: should not transform wiki markup
14074 message transform: <noinclude> in transcluded template (T6926)
14084 message transform: <onlyinclude> in transcluded template (T6926)
14094 {{#special:}} page name, known
14098 {{#special:Recentchanges}}
14100 Special:RecentChanges
14104 {{#special:}} page name with subpage, known
14108 {{#special:Recentchanges/param}}
14110 Special:RecentChanges/param
14114 {{#special:}} page name, unknown
14118 {{#special:foobar nonexistent}}
14120 Special:Foobar nonexistent
14124 {{#speciale:}} page name, known
14128 {{#speciale:Recentchanges}}
14130 Special:RecentChanges
14134 {{#speciale:}} page name with subpage, known
14138 {{#speciale:Recentchanges/param}}
14140 Special:RecentChanges/param
14144 {{#speciale:}} page name, unknown
14148 {{#speciale:foobar nonexistent}}
14150 Special:Foobar_nonexistent
14156 ### For Parsoid-specific tests, see
14157 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14162 parsoid=wt2html,wt2wt,html2html
14164 [[Image:foobar.jpg]]
14166 <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>
14169 <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>
14173 Serialize simple image with figure-inline wrapper
14177 <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>
14179 [[File:Foobar.jpg]]
14183 Simple image (using File: namespace, now canonical)
14185 [[File:Foobar.jpg]]
14187 <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>
14190 <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>
14194 Right-aligned image
14196 [[File:Foobar.jpg|right]]
14198 <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>
14201 <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>
14207 [[File:Foobar.jpg|right|Caption text]]
14209 <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>
14212 <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>
14216 Image with caption, T55312 #1
14218 [[File:Foobar.jpg|right|Caption page stuff]]
14220 <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>
14223 <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>
14227 Image with caption, T55312 #2
14229 [[File:Foobar.jpg|right|Caption page=]]
14231 <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>
14234 <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>
14238 Image with caption, T55312 #3
14240 [[File:Foobar.jpg|right|Caption page=stuff]]
14242 <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>
14245 <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>
14249 Allow empty links in image captions (T62753)
14253 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14258 <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>
14261 <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>
14263 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14264 </figcaption></figure>
14268 Titles in unlinked images (T23454)
14270 [[File:Foobar.jpg|link=|stuff]]
14272 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14277 Link with empty target
14286 Image with link trail
14288 Linktrails should not work for images: [[File:Foobar.jpg]]s
14290 <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
14293 <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>
14297 Image with empty attribute
14299 parsoid=wt2html,wt2wt,html2html
14301 [[File:Foobar.jpg|right||Caption text]]
14303 <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>
14306 <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>
14310 1. Block image with individual attributes from templates
14312 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14314 <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>
14317 <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>
14321 2. Block Image with individual attributes from templates
14323 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14325 <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>
14328 <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>
14332 3. Inline image with individual attributes from templates
14334 [[File:Foobar.jpg|{{echo|50px}}]]
14336 <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>
14339 <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>
14342 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14343 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14345 Image with multiple attributes from the same template
14347 [[File:Foobar.jpg|{{image_attribs}}]]
14349 <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>
14352 <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>
14356 Image with link tails
14360 123[[File:Foobar.jpg]]456
14361 123[[File:Foobar.jpg|right]]456
14362 123[[File:Foobar.jpg|thumb]]456
14364 <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
14366 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
14367 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
14370 <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>
14372 <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>
14374 <div class="thumb tright">
14375 <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>
14376 <div class="thumbcaption">
14377 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
14383 <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>
14384 <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>
14385 <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>
14389 Image with multiple captions -- only last one is accepted
14391 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14393 <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>
14396 <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>
14400 Image with multiple widths -- use last
14402 [[File:Foobar.jpg|200px|300px|caption]]
14404 <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>
14407 <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>
14411 Image with multiple alignments -- use first (T50664)
14415 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14417 [[File:Foobar.jpg|middle|text-top|caption]]
14419 <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>
14420 <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>
14423 <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>
14424 <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>
14428 Image with width attribute at different positions
14430 [[File:Foobar.jpg|200px|right|Caption]]
14431 [[File:Foobar.jpg|right|200px|Caption]]
14432 [[File:Foobar.jpg|right|Caption|200px]]
14434 <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>
14435 <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>
14436 <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>
14439 <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>
14440 <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>
14441 <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>
14444 # a sad bit of backward-compatibility
14446 Image with size specified with pxpx (T15500, T53628)
14448 parsoid=wt2html,wt2wt,html2html
14450 [[File:Foobar.jpg|20pxpx]]
14451 [[File:Foobar.jpg|200x20pxpx]]
14453 <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>
14454 <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>
14457 <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>
14461 Image with link parameter, wiki target
14463 [[File:Foobar.jpg|link=Main Page]]
14465 <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>
14468 <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>
14471 # parsoid T51293 (part 1)
14473 Image with link parameter, URL target
14475 [[File:Foobar.jpg|link=http://example.com/]]
14477 <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>
14480 <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>
14483 # parsoid T51293 (part 2)
14485 Image with link parameter, protocol-less URL target
14487 [[File:Foobar.jpg|link=//example.com/]]
14489 <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>
14492 <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>
14496 Escaping non-block captions (T107435)
14499 "modes": ["wt2wt"],
14501 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14505 [[Image:Foobar.jpg|caption]]
14507 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14510 # wgExternalLinkTarget not supported by Parsoid
14512 Image with link parameter, wgExternalLinkTarget
14514 [[Image:foobar.jpg|link=http://example.com/]]
14516 wgExternalLinkTarget='foobar'
14518 <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>
14523 Image with link parameter, wgNoFollowLinks set to false
14525 [[Image:foobar.jpg|link=http://example.com/]]
14527 wgNoFollowLinks=false
14529 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14534 Image with link parameter, wgNoFollowDomainExceptions
14536 [[Image:foobar.jpg|link=http://example.com/]]
14538 wgNoFollowDomainExceptions='example.com'
14540 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14544 # wgExternalLinkTarget not supported by Parsoid
14546 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14548 [[Image:foobar.jpg|link=http://example.com/|Title]]
14550 wgExternalLinkTarget='foobar'
14552 <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>
14557 Image with empty link parameter
14559 [[File:Foobar.jpg|link=]]
14561 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14564 <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>
14568 Image with link parameter (wiki target) and unnamed parameter
14570 [[File:Foobar.jpg|link=Main_Page|Title]]
14572 <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>
14575 <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>
14579 Image with link parameter (URL target) and unnamed parameter
14581 [[File:Foobar.jpg|link=http://example.com/|Title]]
14583 <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>
14586 <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>
14590 Thumbnail image with link parameter
14593 parsoid=wt2html,wt2wt,html2html
14595 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14597 <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>
14600 <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>
14604 Manually-specified thumbnail image
14608 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14610 <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>
14613 <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>
14617 Manually-specified thumbnail image with explicit link to wiki page
14620 parsoid=wt2html,wt2wt,html2html
14622 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14624 <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>
14627 <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>
14631 Manually-specified thumbnail image with explicit link to url
14634 parsoid=wt2html,wt2wt,html2html
14636 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14638 <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>
14641 <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>
14645 Manually-specified thumbnail image with explicit no link
14648 parsoid=wt2html,wt2wt,html2html
14650 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14652 <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>
14655 <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>
14659 Manually-specified thumbnail image with explicit link and alt text
14662 parsoid=wt2html,wt2wt,html2html
14664 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14666 <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>
14669 <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>
14673 Image with frame and link
14675 parsoid=wt2html,wt2wt,html2html
14677 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14679 <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>
14682 <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>
14686 Image with frame and link and explicit alt
14688 parsoid=wt2html,wt2wt,html2html
14690 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14692 <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>
14695 <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>
14699 Image with wiki markup in implicit alt
14701 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14703 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14705 <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>
14706 </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>
14709 <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>
14711 <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>
14715 Alt image option should handle most kinds of wikitext without barfing
14717 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14719 <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>
14722 <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>
14725 ###################
14726 # Conflicting image format options.
14727 # First option specified should 'win'.
14728 # All three cases in each test should be identical.
14731 Image with 'frameless' first.
14733 parsoid=wt2html,wt2wt,html2html
14735 [[File:Foobar.jpg|frameless|caption]]
14737 [[File:Foobar.jpg|frameless|frame|caption]]
14739 [[File:Foobar.jpg|frameless|thumb|caption]]
14741 <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>
14742 </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>
14743 </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>
14746 <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>
14747 <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>
14748 <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>
14752 Image with 'frame' first.
14754 parsoid=wt2html,wt2wt,html2html
14756 [[File:Foobar.jpg|frame|caption]]
14757 [[File:Foobar.jpg|frame|frameless|caption]]
14758 [[File:Foobar.jpg|frame|thumb|caption]]
14760 <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>
14761 <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>
14762 <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>
14765 <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>
14766 <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>
14767 <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>
14771 Image with 'thumb' first.
14773 parsoid=wt2html,wt2wt,html2html
14775 [[File:Foobar.jpg|thumb|caption]]
14776 [[File:Foobar.jpg|thumb|frameless|caption]]
14777 [[File:Foobar.jpg|thumb|frame|caption]]
14779 <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>
14780 <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>
14781 <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>
14784 <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>
14785 <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>
14786 <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>
14789 ###################
14791 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14792 # and https://phabricator.wikimedia.org/T64258
14793 # Foobar has actual size of 1941x220
14794 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14795 # a scalable format.
14796 # 2. Framed images always ignore size options; always render at default size.
14797 # 3. "Unspecified format" and border are the only types which can be
14801 Image: unspecified format and border enlarge
14803 parsoid=wt2html,wt2wt,html2html
14805 [[File:Foobar.jpg|2000px]]
14807 [[File:Foobar.jpg|border|2000px]]
14809 <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>
14810 </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>
14813 <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>
14814 <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>
14818 Image: "unspecified format" and border reduce
14820 parsoid=wt2html,wt2wt,html2html
14822 [[File:Foobar.jpg|1000px]]
14824 [[File:Foobar.jpg|border|1000px]]
14826 <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>
14827 </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>
14830 <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>
14831 <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>
14835 Image: thumbs reduce
14837 parsoid=wt2html,wt2wt,html2html
14839 [[File:Foobar.jpg|thumb|50px]]
14841 <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>
14844 <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>
14848 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14850 parsoid=wt2html,wt2wt,html2html
14852 [[File:Foobar.jpg|thumb|2000px]]
14854 [[File:Foobar.svg|thumb|2000px]]
14856 <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>
14857 <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>
14860 <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>
14861 <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>
14865 Image: frameless can reduce in size
14867 parsoid=wt2html,wt2wt,html2html
14869 [[File:Foobar.jpg|frameless|50px]]
14871 <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>
14874 <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>
14878 Image: bitmap frameless can't be enlarged past original size, but vector can
14880 parsoid=wt2html,wt2wt,html2html
14882 [[File:Foobar.jpg|frameless|2000px]]
14884 [[File:Foobar.svg|frameless|2000px]]
14886 <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>
14887 </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>
14890 <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>
14891 <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>
14895 Image: framed images are always unscaled.
14897 parsoid=wt2html,wt2wt,html2html
14899 [[File:Foobar.jpg|frame]]
14901 [[File:Foobar.jpg|frame|50px]]
14903 [[File:Foobar.jpg|frame|50x50px]]
14905 [[File:Foobar.jpg|frame|2000px]]
14907 <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>
14908 <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>
14909 <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>
14910 <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>
14913 <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>
14914 <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>
14915 <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>
14916 <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>
14919 ###################
14922 Link to image page- image page normally doesn't exists, hence edit link
14923 Add test with existing image page
14924 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14928 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14933 T20784 Link to non-existent image page with caption should use caption as link text
14935 [[:Image:test|caption]]
14937 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14942 Frameless image caption with a free URL
14944 [[File:Foobar.jpg|http://example.com]]
14946 <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>
14949 <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>
14953 Thumbnail image caption with a free URL
14957 [[File:Foobar.jpg|thumb|http://example.com]]
14959 <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>
14962 <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>
14966 Thumbnail image caption with a free URL and explicit alt
14969 parsoid=wt2html,wt2wt,html2html
14971 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14973 <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>
14976 <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>
14980 SVG thumbnails with no language set
14983 [[File:Foobar.svg|thumb|caption]]
14985 <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>
14988 <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>
14992 SVG thumbnails with language de
14994 parsoid=wt2html,wt2wt,html2html
14996 [[File:Foobar.svg|thumb|caption|lang=de]]
14998 <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>
15001 <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>
15005 SVG thumbnails with invalid language code
15007 parsoid=wt2html,wt2wt,html2html
15009 [[File:Foobar.svg|thumb|caption|lang=invalid.language.code]]
15011 <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>
15014 <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>
15018 T3887: A ISBN with a thumbnail
15020 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15022 <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>
15025 <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>
15029 T3887: A RFC with a thumbnail
15031 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15033 <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>
15036 <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>
15040 T3887: A mailto link with a thumbnail
15042 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15044 <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>
15047 <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>
15050 # Pending resolution to T2368
15052 T2648: Frameless image caption with a link
15054 [[File:Foobar.jpg|text with a [[link]] in it]]
15056 <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>
15059 <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>
15063 T2648: Frameless image caption with a link (suffix)
15065 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15067 <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>
15070 <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>
15074 T2648: Frameless image caption with an interwiki link
15076 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15078 <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>
15081 <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>
15085 T2648: Frameless image caption with a piped interwiki link
15087 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15089 <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>
15092 <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>
15096 T107474: Frameless image caption with <nowiki>
15098 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15100 <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>
15104 Escape HTML special chars in image alt text
15106 [[File:Foobar.jpg|& < > "]]
15108 <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>
15111 <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>
15115 Escape HTML special chars in image alt text with LanguageConverter
15119 [[File:Foobar.jpg|& < > "]]
15121 <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>
15124 <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>
15128 Entities in file name and attributes
15130 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15132 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15135 <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>
15139 T2499: Alt text should have Ӓ, not &1234;
15141 [[File:Foobar.jpg|♀]]
15143 <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>
15146 <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>
15150 Broken image caption with link
15152 parsoid=wt2html,wt2wt,html2html
15154 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15156 <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.
15159 <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>
15163 Image caption containing another image
15165 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15167 <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>
15170 <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>
15174 Image: caption containing a newline
15176 [[File:Foobar.jpg|This
15179 <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>
15182 <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>
15186 Image: caption containing leading space
15187 (The leading space should not trigger nowiki escaping in wt2wt mode)
15189 [[File:Foobar.jpg|thumb| bar]]
15191 <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>
15194 <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>
15198 Image: caption containing a table
15200 parsoid=wt2html,wt2wt,html2html
15202 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15208 and some more text.]]
15210 <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>
15213 <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
15216 <tr><th>Foo </th><th>Bar</th></tr>
15219 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15223 T5090: External links other than http: in image captions
15225 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15227 <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>
15230 <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>
15236 parsoid=wt2html,wt2wt,html2html
15238 [[Image:foobar.jpg|a|class=b]]
15240 <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>
15243 <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>
15247 Localized image handling (1).
15249 parsoid=wt2html,wt2wt,html2html
15252 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15254 <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>
15257 <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>
15261 Localized image handling (2).
15264 parsoid=wt2html,wt2wt,html2html
15267 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15269 <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>
15272 <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>
15276 Localized image handling (3).
15281 <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>
15283 [[File:Foobar.jpg|بندانگشتی]]
15287 "border", "frameless" and "class" attributes on an image.
15290 parsoid=wt2html,wt2wt,html2html
15292 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15294 <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>
15297 <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>
15300 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15302 Invalid image attributes (T64500)
15305 parsoid=wt2html,wt2wt,html2html
15307 [[File:Foobar.jpg|thumb|float|left|caption]]
15309 [[File:Foobar.jpg|thumb|righ|caption]]
15311 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15313 <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>
15314 <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>
15315 <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>
15318 <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>
15319 <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>
15320 <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>
15326 #REDIRECT [[File:Barfoo.jpg]]
15329 # FIXME: Parsoid should run this test -- but we'd need to teach the
15330 # mockAPI about the redirected Barfoo.jpg image.
15334 [[Image:Barfoo.jpg]]
15336 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15341 Missing image with uploads disabled
15345 [[File:Foobaz.jpg]]
15347 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15350 <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>
15353 # Parsoid-specific testing for images
15354 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15355 # Currently imperfect due to a flaw in the Parsoid testrunner
15357 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15361 Parsoid-specific image handling - simple image with size and middle alignment
15363 [[File:Foobar.jpg|middle|50px]]
15365 <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>
15369 Parsoid-specific image handling - simple image with size, middle alignment,
15370 non-standard namespace alias
15372 parsoid=wt2wt,wt2html,html2html
15374 [[Image:Foobar.jpg|middle|50px]]
15376 <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>
15380 Parsoid-specific image handling - simple image with size and middle alignment
15383 [[File:Foobar.jpg|50px|middle]]
15385 <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>
15389 Parsoid-specific image handling - simple image with size and middle alignment
15390 and non-standard namespace name
15392 parsoid=wt2html,wt2wt,html2html
15394 [[Image:Foobar.jpg|50px|middle]]
15396 <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>
15400 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15402 [[File:Foobar.jpg|500x10px|baseline|caption]]
15404 <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>
15408 Parsoid-specific image handling - simple image with border and size spec
15410 [[File:Foobar.jpg|50px|border|caption]]
15412 <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>
15416 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15418 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15420 <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>
15424 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15427 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15429 <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>
15433 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15435 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15437 <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>
15441 Parsoid-specific image handling - thumbnail with specific size, halign,
15442 valign, and caption (existing content)
15444 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15446 <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>
15450 Parsoid-specific image handling - framed image with specific size and caption
15453 parsoid=wt2html,wt2wt,html2html
15455 [[File:Foobar.jpg|frame|500x50px|caption]]
15457 <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>
15461 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15464 parsoid=wt2html,wt2wt,html2html
15466 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15468 <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>
15472 Parsoid-specific image handling - frameless image with specific size, border, and caption
15474 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15476 <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>
15480 Parsoid-specific image handling - simple image with a formatted caption
15482 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15484 <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>
15488 Parsoid-specific image handling - caption with a template in it
15490 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15492 <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>
15496 Parsoid-specific image handling - caption with unbalanced tags in it
15498 parsoid=wt2html,wt2wt,html2html
15501 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15505 <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>
15510 Parsoid-specific image handling - empty caption (1)
15512 parsoid=wt2html,wt2wt
15514 [[File:Foobar.jpg|thumb|]]
15516 <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>
15519 # empty captions don't get serialized unless we're in the "round trip" case
15521 Parsoid-specific image handling - empty caption (2)
15525 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15526 <a href="./File:Foobar.jpg">
15527 <img resource="./File:Foobar.jpg"
15528 src="//example.com/images/3/3a/Foobar.jpg"
15529 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15530 height="25" width="220"/>
15532 <figcaption></figcaption>
15535 [[File:Foobar.jpg|thumb]]
15539 Parsoid-specific image handling - whitespace caption
15541 [[File:Foobar.jpg|thumb| ]]
15543 <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>
15547 Parsoid-specific image handling - lang option
15550 [[File:Foobar.svg|lang=de|caption]]
15554 <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>
15558 ## Edge case bugs in Parsoid from T93580
15560 T93580: 1. Templated <ref> inside block images
15562 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15566 <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>
15568 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
15572 T93580: 2. <ref> inside inline images
15574 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15578 <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>
15580 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
15584 T93580: 3. Templated <ref> inside inline images
15586 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15590 <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>
15592 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
15599 Subpage test/subpage
15607 subpage title=[[Subpage test]]
15611 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15616 Subpage noslash link
15618 subpage title=[[Subpage test]]
15622 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15627 Subpage test/1/2/subpage
15633 Relative subpage noslash link
15635 parsoid=wt2wt,wt2html,html2html
15636 subpage title=[[Subpage test/1/2/3/4]]
15642 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15643 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15646 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15647 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15651 Parsoid: dot-slash prefixed wikilinks
15661 </p><p>[[././baz/]]
15666 </p><p>[[././baz/]]
15671 Render invalid page names as plain text (T53090)
15683 [[foo[http://example.com]xyz]]
15685 [[{{echo|./../foo}}|bar]]
15686 [[{{echo|foo/.}}|bar]]
15687 [[{{echo|foo/..}}|bar]]
15688 [[{{echo|foo~~~~bar}}]]
15689 [[{{echo|foo>bar}}]]
15690 [[{{echo|foo././bar}}]]
15691 [[{{echo|foo{bar}}]]
15692 [[{{echo|foo}bar}}]]
15693 [[{{echo|foo[bar}}]]
15694 [[{{echo|foo]bar}}]]
15695 [[{{echo|foo<bar}}]]
15697 <p>[[./../foo|bar]]
15707 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15708 </p><p>[[./../foo|bar]]
15721 <p>[[./../foo|bar]]
15731 [[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
15733 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15734 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15735 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15736 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15737 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15738 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15739 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15740 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15741 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15742 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15743 [[<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>
15751 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15756 T2561: {{/Subpage}}
15758 subpage title=[[Page]]
15762 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15770 Category:MediaWiki User's Guide
15778 [[:Category:MediaWiki User's Guide]]
15780 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15789 [[Category:MediaWiki User's Guide]]
15791 cat=MediaWiki_User's_Guide sort=
15793 <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"}}'/>
15797 PAGESINCATEGORY invalid title fatal (r33546 fix)
15799 {{PAGESINCATEGORY:<bogus>}}
15806 Category with different sort key
15810 [[Category:MediaWiki User's Guide|Foo]]
15812 cat=MediaWiki_User's_Guide sort=Foo
15814 <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"}}'/>
15818 Category with identical sort key
15822 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15824 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15826 <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"}}'/>
15830 Category with empty sort key
15835 [[Category:MediaWiki User's Guide|]]
15837 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15841 Category with empty sort key and parentheses
15846 [[Category:Foo (bar)|]]
15848 [[Category:Foo (bar)|Foo]]
15852 Category with link tail
15857 123[[Category:Foo]]456
15859 123[[Category:Foo]]456
15863 Category with template
15868 [[Category:{{echo|Foo}}]]
15870 [[Category:{{echo|Foo}}]]
15874 Category with template in sort key
15879 [[Category:Foo|{{echo|Bar}}]]
15881 [[Category:Foo|{{echo|Bar}}]]
15885 Category with template in sort key and title
15890 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15892 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15895 ## We used to, but no longer wt2wt this test since the default serializer
15896 ## will normalize all categories to serialize on their own line.
15897 ## This wikitext usage is going to be fairly uncommon in production and
15898 ## selser will take care of preserving formatting in those scenarios.
15900 Category / paragraph interactions
15904 Foo [[Category:Baz]] Bar
15906 Foo [[Category:Baz]]
15914 [[Category:Baz]] Bar
15927 {{echo|[[Category:Baz]]}}
15940 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15941 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15942 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15943 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15944 <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>
15945 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15948 ## We used to, but no longer wt2wt this test since the default serializer
15949 ## will normalize all categories to serialize on their own line.
15950 ## This wikitext usage is going to be fairly uncommon in production and
15951 ## selser will take care of preserving formatting in those scenarios.
15953 ## The whitespace on the empty line is part of the test. Please do not delete
15955 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15961 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15963 {{echo|[[Category:Foo]] and so should this!}}
15965 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15970 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15972 <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>
15975 ## Parsoid will not try to wt2wt this while preserving newlines because
15976 ## it suppresses excess newlines within list items -- and we don't want to
15977 ## introduce a special case just for categories, which is, in reality somewhat
15978 ## odd behavior -- categories are unlikely to be used in list items like this
15979 ## in top-level pages and are only likely to show up in template-generated
15980 ## list items where this RT-ing is a non-issue.
15982 ## The whitespace on the empty line is part of the test. Please do not delete
15984 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15990 [[Category:Foo]] and this should be part of the same list item
15993 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15995 <ul><li>This and this should be part of the same list item</li>
15996 <li>So should this and this should be part of the same list item</li></ul>
15999 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16000 <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>
16004 ## Newlines and categories that follow the last item of a list
16005 ## are treated differently because this (list followed by categories)
16006 ## is an extremely common pattern on wikis.
16008 3. Categories and newlines: newline suppression for last list item should RT properly
16021 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16023 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16024 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16028 4. Categories and newlines: newline suppression for last list item should RT properly
16036 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16038 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16041 ## only wt2html for this to make sure the algo only applies to the rightmost path
16043 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16056 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16058 <ul><li> d</li></ul></li></ul>
16059 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16062 ## We used to, but no longer wt2wt this test since the default serializer
16063 ## will normalize all categories to serialize on their own line.
16064 ## This wikitext usage is going to be fairly uncommon in production and
16065 ## selser will take care of preserving formatting in those scenarios.
16067 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16071 * a [[Category:Foo]]
16073 <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>
16076 # This test also demonstrates because of newline+category tunneling
16077 # through the list hander, template wrapping doesn't expand to the
16078 # containing list when the list item swallows the category.
16080 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16085 <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
16086 </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>
16090 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16094 {{echo|[[Category:Foo]]
16098 <ul><li> a</li></ul>
16100 <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">
16101 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16102 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16106 9. Categories and newlines: should behave properly with linkprefix (T87753)
16121 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16122 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16126 10. No regressions on internal links following category (T174639)
16128 parsoid=wt2html,html2html
16130 [[Category:Foo]]<div>a
16135 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16138 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16140 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16143 # Note that Parsoid differs slightly from PHP due to T175421
16145 11. Special case where only newlines separate links (T175416)
16147 parsoid=wt2html,html2html
16151 [[Foo]][[es:Alimento]]
16156 <a href="/wiki/Foo" title="Foo">Foo</a>
16157 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16160 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16162 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16164 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16168 Category links with multiple namespaces
16170 [[Category:Project:Foo]]
16172 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16176 Parsoid: Serialize link to category page with colon escape
16182 [[:Category:Foo|Bar]]
16185 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16186 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16190 # We used to, but no longer wt2wt this test since the default serializer
16191 # will normalize all categories to serialize on their own line.
16192 # This wikitext usage is going to be fairly uncommon in production and
16193 # selser will take care of preventing whitespace insertion if this
16194 # occurs in an article.
16196 # html2html disabled for the same reason (whitespace insertion between
16199 # html2wt disabled because it localizes the "Category" namespace.
16201 Link prefix/suffixes aren't applied to category links
16211 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16215 Link prefix/suffixes aren't applied to language links
16225 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16229 Parsoid: Serialize link to file page with colon escape
16235 [[:File:Foo.png|Bar]]
16238 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16239 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16244 Parsoid: Serialize a genuine category link without colon escape
16249 [[Category:Foo|Bar]]
16251 <link rel="mw:PageProp/Category" href="./Category:Foo">
16252 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16256 Normalize hrefs properly before testing for invalid link targets (T72894)
16260 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16262 [[Category:Toxine bactérienne]]
16266 Parsoid: Defaultsort
16268 {{DEFAULTSORT:Foo}}
16270 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16273 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16274 # But, this is a limitation of our representation and is documented in
16275 # TemplateHandler.js in processSpecialMagicWord
16277 Parsoid: Defaultsort (template-generated)
16279 {{{{echo|DEFAULTSORT}}:Foo}}
16281 <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"}]]}'/>
16285 ### Inter-language links
16288 Interlanguage links
16296 es:Alimento fr:Nourriture zh:食品
16298 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16299 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16300 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16304 Duplicate interlanguage links (T26502)
16315 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16316 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16317 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16318 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16325 Basic section headings
16332 ===Smaller headline===
16335 <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>
16338 <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>
16341 <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>
16347 Section headings with TOC
16350 === Subheadline 1 ===
16351 ===== Skipping a level =====
16352 ====== Skipping a level ======
16356 ===Another headline===
16358 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16360 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16362 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16364 <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>
16366 <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>
16373 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16375 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16381 <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>
16382 <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>
16383 <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>
16384 <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>
16385 <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>
16388 <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>
16393 TOC anchors don't collide
16401 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16403 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16404 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16405 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16406 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16410 <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>
16411 <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>
16412 <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>
16413 <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>
16417 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16419 Handling of sections up to level 6 and beyond
16422 == Level 2 Heading==
16423 === Level 3 Heading===
16424 ==== Level 4 Heading====
16425 ===== Level 5 Heading=====
16426 ====== Level 6 Heading======
16427 ======= Level 7 Heading=======
16428 ======== Level 8 Heading========
16429 ========= Level 9 Heading=========
16430 ========== Level 10 Heading==========
16432 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16434 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16436 <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>
16438 <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>
16440 <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>
16442 <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>
16444 <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>
16445 <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>
16446 <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>
16447 <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>
16448 <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>
16462 <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>
16463 <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>
16464 <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>
16465 <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>
16466 <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>
16467 <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>
16468 <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>
16469 <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>
16470 <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>
16471 <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>
16476 TOC regression (T11764)
16480 ==== title 1.1.1 ====
16485 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16487 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16489 <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>
16491 <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>
16494 <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>
16497 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16499 <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>
16505 <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>
16506 <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>
16507 <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>
16508 <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>
16509 <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>
16510 <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>
16515 TOC for heading containing <span id="..."></span> (T96153)
16518 ==<span id="old-anchor"></span>New title==
16520 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16522 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16526 <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>
16531 TOC with wgMaxTocLevel=3 (T8204)
16537 ==== title 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="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16546 <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>
16547 <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>
16550 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16552 <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>
16558 <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>
16559 <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>
16560 <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>
16561 <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>
16562 <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>
16563 <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>
16568 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16574 ====Section 1.1.1====
16575 ====Section 1.1.1.1====
16578 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16580 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16582 <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>
16585 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16589 <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>
16590 <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>
16591 <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>
16592 <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>
16593 <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>
16599 Resolving duplicate section names
16604 <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>
16605 <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>
16610 Resolving duplicate section names with differing case (T12721)
16615 <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>
16616 <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>
16628 Template with sections, __NOTOC__
16635 <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>
16636 <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>
16637 <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>
16638 <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>
16643 __NOEDITSECTION__ keyword
16649 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16650 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16655 Link inside a section heading
16657 ==Section with a [[Main Page|link]] in it==
16659 <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>
16664 TOC regression (T14077)
16671 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16673 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16675 <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>
16678 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16682 <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>
16683 <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>
16684 <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>
16689 T3219 URL next to image (good)
16691 http://example.com [[File:Foobar.jpg]]
16693 <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>
16696 <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>
16700 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16703 The line above must have a trailing space!
16706 But just in case it doesn't...
16708 <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>
16709 <p>The line above must have a trailing space!
16711 <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>
16712 <p>But just in case it doesn't...
16717 Header with special characters (T27462)
16719 The tooltips shall not show entities to the user (ie. be double escaped)
16736 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16738 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16740 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16741 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16742 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16743 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16744 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16748 <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>
16751 <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>
16754 <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>
16757 <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>
16760 <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>
16766 Header with space, plus and underscore as entity
16768 Id should not contain + for spaces
16770 == Space between Text ==
16773 == Space-Entity between Text ==
16776 == Plus+between+Text ==
16779 == Plus-Entity+between+Text ==
16782 == Underscore_between_Text ==
16785 == Underscore-Entity_between_Text ==
16788 [[#Space between Text]]
16789 [[#Space-Entity between Text]]
16790 [[#Plus+between+Text]]
16791 [[#Plus-Entity+between+Text]]
16792 [[#Underscore_between_Text]]
16793 [[#Underscore-Entity_between_Text]]
16795 <p>Id should not contain + for spaces
16797 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16799 <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>
16800 <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>
16801 <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>
16802 <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>
16803 <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>
16804 <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>
16808 <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>
16811 <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>
16814 <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>
16817 <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>
16820 <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>
16823 <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>
16825 </p><p><a href="#Space_between_Text">#Space between Text</a>
16826 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16827 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16828 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16829 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16830 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16835 Headers with excess '=' characters
16836 (Are similar tests necessary beyond the 1st level?)
16840 =''italic'' heading==
16841 ==''italic'' heading=
16843 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16845 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16846 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16847 <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>
16848 <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>
16852 <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>
16853 <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>
16854 <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>
16855 <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>
16860 HTML headers vs TOC (T25393)
16861 (__NOEDITSECTION__ for clearer output, doesn't matter here)
16873 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
16875 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
16877 <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>
16878 <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>
16881 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
16883 <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>
16884 <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>
16890 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
16891 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
16892 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
16893 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
16894 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
16895 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
16900 Single-line or multiline-comments can follow headings
16902 parsoid=wt2html,wt2wt
16910 <h2><span class="mw-headline" id="foo">foo</span></h2>
16911 <h2><span class="mw-headline" id="bar">bar</span></h2>
16912 <h2><span class="mw-headline" id="baz">baz</span></h2>
16917 T3219 URL next to image (broken)
16919 http://example.com[[File:Foobar.jpg]]
16921 <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>
16924 <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>
16928 T3186 news: in the middle of text
16930 http://en.wikinews.org/wiki/Wikinews:Workplace
16932 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
16938 Namespaced link must have a title
16947 Namespaced link must have a title (bad fragment version)
16949 [[Project:#fragment]]
16951 <p>[[Project:#fragment]]
16957 ### HTML tags and HTML attributes
16961 div with no attributes
16963 <div>HTML rocks</div>
16965 <div>HTML rocks</div>
16970 div with double-quoted attribute
16972 <div id="rock">HTML rocks</div>
16974 <div id="rock">HTML rocks</div>
16979 div with single-quoted attribute
16981 <div id='rock'>HTML rocks</div>
16983 <div id="rock">HTML rocks</div>
16988 div with unquoted attribute
16990 <div id=rock>HTML rocks</div>
16992 <div id="rock">HTML rocks</div>
16997 div with illegal double attributes
16999 <div id="a" id="b">HTML rocks</div>
17001 <div id="b">HTML rocks</div>
17006 div with empty attribute value, space before equals
17008 parsoid=wt2html,html2html
17010 <div class =>HTML rocks</div>
17012 <div class="">HTML rocks</div>
17015 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17019 div with multiple empty attribute values
17021 parsoid=wt2html,html2html
17023 <div id= title=>HTML rocks</div>
17025 <div id="title.3D">HTML rocks</div>
17028 <div id="title.3D" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17032 table with multiple empty attribute values
17034 parsoid=wt2html,html2html
17040 <table title="id=">
17046 <table title="id=">
17047 <tbody><tr><td> hi</td></tr>
17052 div with braces in attribute value
17054 <div title="{}">Foo</div>
17056 <div title="{}">Foo</div>
17059 <div title="{}">Foo</div>
17063 div with empty attribute value, no space before equals
17065 parsoid=wt2html,html2html
17067 <div class=>HTML rocks</div>
17069 <div class="">HTML rocks</div>
17072 <div class="">HTML rocks</div>
17076 HTML multiple attributes correction
17078 <p class="error" class="awesome">Awesome!</p>
17080 <p class="awesome">Awesome!</p>
17085 Table multiple attributes correction
17088 !+ class="error" class="awesome"| status
17093 <th class="awesome"> status
17101 <DIV ID="x">HTML ROCKS</DIV>
17103 <div id="x">HTML ROCKS</div>
17108 Non-ASCII pseudo-tags are rendered as text
17117 Pseudo-tag with URL 'name' renders as url link
17119 <http://example.com/>
17121 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17126 text with amp in the middle of nowhere
17130 <p>Remember AT&T?
17135 text with character entity: eacute
17137 I always thought é was a cute letter.
17139 <p>I always thought é was a cute letter.
17142 <p>I always thought é was a cute letter.</p>
17146 text with entity-escaped character entity-like string: eacute
17148 I always thought &eacute; was a cute letter.
17150 <p>I always thought &eacute; was a cute letter.
17155 text with undefined character entity: xacute
17157 I always thought &xacute; was a cute letter.
17159 <p>I always thought &xacute; was a cute letter.
17166 <data value="5">five</data>
17167 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17168 <mark>This highlighted text</mark>
17170 <p><data value="5">five</data>
17171 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17172 <mark>This highlighted text</mark>
17177 HTML tag with leading space is parsed as text
17181 <p>< div>foo< /div>
17185 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17186 ## the HTML5 parsing spec.
17188 Element with broken attribute syntax
17192 <div style=" style="123">hi</div>
17195 <div style="123">hi</div>
17199 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17200 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17204 ### Nesting tests (see T43545, T52604, T53081)
17207 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17208 # Note that html2wt is considerably more difficult if we use <b> in
17209 # the test case, instead of <small>
17211 Ensure that HTML adoption agency algorithm is properly implemented.
17213 <small>X<small>Y</small>Z</small>
17215 <p><small>X<small>Y</small>Z</small>
17219 # This was T43545 in the PHP parser.
17220 # Note that tidy doesn't handle this correctly.
17224 <kbd>X<kbd>Y</kbd>Z</kbd>
17226 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17230 # The following cases were T53081 in the PHP parser.
17231 # Note that there are some other nestable tags (b, i, etc) which are
17232 # not covered; see T53081 for discussion.
17234 # Note that tidy doesn't handle this correctly.
17238 <em>X<em>Y</em>Z</em>
17240 <p><em>X<em>Y</em>Z</em>
17244 # Note that tidy doesn't handle this correctly.
17246 Nesting of <strong>
17248 <strong>X<strong>Y</strong>Z</strong>
17250 <p><strong>X<strong>Y</strong>Z</strong>
17259 <p><q>X<q>Y</q>Z</q></p>
17262 # Note that tidy doesn't handle this correctly.
17266 <ruby>X<ruby>Y</ruby>Z</ruby>
17268 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17272 # Note that tidy doesn't handle this correctly.
17276 <bdo>X<bdo>Y</bdo>Z</bdo>
17278 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17290 [[Media:Foobar.jpg]]
17291 [[Media:Video.ogv]]
17292 [[:Media:Video.ogv]]
17294 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17295 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17296 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17299 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17300 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17301 <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>
17305 Media link with text
17307 [[Media:Foobar.jpg|A neat file to look at]]
17309 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17312 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17315 # FIXME: this is still bad HTML tag nesting
17316 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17318 Media link with nasty text
17320 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17322 <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>
17325 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
17326 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
17328 <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>
17333 Media link to nonexistent file (T3702)
17335 [[Media:No such.jpg]]
17336 [[Media:No_such file.jpg]]
17338 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17339 <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>
17342 <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>
17343 <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>
17347 Image link to nonexistent file (T3850 - good)
17349 [[File:No_such.jpg]]
17351 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17354 <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>
17358 :Image link to nonexistent file (T3850 - bad)
17360 [[:Image:No such.jpg]]
17362 <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>
17365 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17369 Character reference normalization in link text (T3938)
17371 [[Main Page|this&that]]
17373 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17380 Test for unicode normalization
17382 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17386 (T21451) Links should refer to the normalized form.
17394 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17395 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17396 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17397 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17398 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17403 Empty attribute crash test (T4067)
17405 <font color="">foo</font>
17407 <p><font color="">foo</font>
17412 Empty attribute crash test single-quotes (T4067)
17414 <font color=''>foo</font>
17416 <p><font color="">foo</font>
17421 Attribute test: equals, then nothing
17423 parsoid=wt2html,html2html
17425 <font color=>foo</font>
17427 <p><font color="">foo</font>
17430 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17434 Attribute test: unquoted value
17436 parsoid=wt2html,html2html
17438 <font color=x>foo</font>
17440 <p><font color="x">foo</font>
17443 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17447 Attribute test: unquoted but illegal value (hash)
17449 <font color=#x>foo</font>
17451 <p><font color="#x">foo</font>
17455 # Parsoid does not serialize to empty attribute syntax,
17456 # so wt2wt and html2wt cases are skipped
17458 Attribute test: no value (T54330)
17460 parsoid=wt2html,html2html
17462 <font color>foo</font>
17464 <p><font color="">foo</font>
17467 <p><font color="">foo</font></p>
17471 T4095: link with three closing brackets
17475 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17478 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17482 T4095: link with pipe and three closing brackets
17484 [[Main Page|link]]]
17486 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17489 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17493 T4095: link with pipe and three closing brackets, version 2
17495 [[Main Page|[http://example.com/]]]
17497 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17500 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17509 Template:Dangerous attribute
17511 " onmouseover="alert(document.cookie)
17515 Template:Dangerous style attribute
17517 border-size: expression(alert(document.cookie))
17523 <div style="float: right; {{{1}}}">Magic div</div>
17527 T4304: HTML attribute safety (safe template; regression T4309)
17529 <div title="{{test}}"></div>
17531 <div title="This is a test template"></div>
17534 <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>
17537 # Parsoid has enough context to handle this case
17539 T4304: HTML attribute safety (dangerous template; 2309)
17541 <div title="{{dangerous attribute}}"></div>
17543 <div title=""></div>
17546 <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>
17550 T4304: HTML attribute safety (dangerous style template; 2309)
17552 <div style="{{dangerous style attribute}}"></div>
17554 <div style="/* insecure input */"></div>
17557 <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>
17561 T4304: HTML attribute safety (safe parameter; 2309)
17563 {{div style|width: 200px}}
17565 <div style="float: right; width: 200px">Magic div</div>
17568 <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>
17572 T4304: HTML attribute safety (unsafe parameter; 2309)
17574 {{div style|width: expression(alert(document.cookie))}}
17576 <div style="/* insecure input */">Magic div</div>
17579 <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>
17582 ## Parsoid output here differs; needs investigation.
17584 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17586 {{div style|"><script>alert(document.cookie)</script>}}
17588 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17592 ## Parsoid output here differs; needs investigation.
17594 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17596 {{div style|" ><script>alert(document.cookie)</script>}}
17598 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17603 T4304: HTML attribute safety (link)
17605 <div title="[[Main Page]]"></div>
17607 <div title="[[Main Page]]"></div>
17612 T4304: HTML attribute safety (italics)
17614 <div title="''foobar''"></div>
17616 <div title="''foobar''"></div>
17621 T4304: HTML attribute safety (bold)
17623 <div title="'''foobar'''"></div>
17625 <div title="'''foobar'''"></div>
17630 T4304: HTML attribute safety (ISBN)
17632 <div title="ISBN 1234567890"></div>
17634 <div title="ISBN 1234567890"></div>
17639 T4304: HTML attribute safety (RFC)
17641 <div title="RFC 1234"></div>
17643 <div title="RFC 1234"></div>
17648 T4304: HTML attribute safety (PMID)
17650 <div title="PMID 1234567890"></div>
17652 <div title="PMID 1234567890"></div>
17657 T4304: HTML attribute safety (web link)
17659 <div title="http://example.com/"></div>
17661 <div title="http://example.com/"></div>
17666 T4304: HTML attribute safety (named web link)
17668 <div title="[http://example.com/ link]"></div>
17670 <div title="[http://example.com/ link]"></div>
17675 T5244: HTML attribute safety (extension; safe)
17677 <div style="<nowiki>background:blue</nowiki>"></div>
17679 <div style="background:blue"></div>
17682 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17686 T5244: HTML attribute safety (extension; unsafe)
17688 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17690 <div style="/* insecure input */"></div>
17693 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17696 # More MSIE fun discovered by Tom Gilder
17699 MSIE CSS safety test: spurious slash
17701 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17703 <div style="/* insecure input */">evil</div>
17706 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17710 MSIE CSS safety test: hex code
17712 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17714 <div style="/* insecure input */">evil</div>
17717 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17721 MSIE CSS safety test: comment in url
17723 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17725 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17728 <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>
17732 MSIE CSS safety test: comment in expression
17734 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17736 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17739 <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>
17743 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17745 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17747 <p style="/* invalid control char */">A</p>
17750 <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>
17754 MSIE 6 CSS safety test: Fullwidth (T57332)
17756 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17757 <div style="top:EXPRESSION(alert())">B</div>
17759 <p style="/* insecure input */">A</p>
17760 <div style="/* insecure input */">B</div>
17763 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17764 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17768 MSIE 6 CSS safety test: IPA extensions (T57332)
17770 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17771 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17773 <div style="/* insecure input */">A</div>
17774 <p style="/* insecure input */">B</p>
17777 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17778 <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>
17782 MSIE 6 CSS safety test: sup/sub script (T57332)
17784 <div style="background-image:url⁽javascript:alert())">A</div>
17785 <div style="background-image:url₍javascript:alert())">B</div>
17786 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17788 <div style="/* insecure input */">A</div>
17789 <div style="/* insecure input */">B</div>
17790 <p style="/* insecure input */">C</p>
17793 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17794 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17795 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17801 parsoid=wt2html,html2html
17804 title="data:text/html,<img src=1 onerror=alert(1)>"
17805 style="-o-link:attr(title);-o-link-source:current">X</div>
17807 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17810 <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>
17814 MSIE 6 CSS safety test: Repetition markers (T57332)
17816 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17817 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17818 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17819 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17820 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17821 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17822 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17824 <p style="/* insecure input */">A</p>
17825 <p style="/* insecure input */">B</p>
17826 <p style="/* insecure input */">C</p>
17827 <p style="/* insecure input */">D</p>
17828 <p style="/* insecure input */">E</p>
17829 <p style="/* insecure input */">F</p>
17830 <p style="/* insecure input */">G</p>
17833 <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>
17834 <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>
17835 <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>
17836 <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>
17837 <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>
17838 <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>
17839 <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>
17843 Table attribute legitimate extension
17846 !+ style="<nowiki>color:blue</nowiki>"| status
17851 <th style="color:blue"> status
17857 Table attribute safety
17860 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
17865 <th style="/* insecure input */"> status
17871 CSS line continuation 1
17873 <div style="background-image: u\ rl(test.jpg);"></div>
17875 <div style="/* insecure input */"></div>
17880 CSS line continuation 2
17882 <div style="background-image: u\ rl(test.jpg); "></div>
17884 <div style="/* invalid control char */"></div>
17895 Expansion of multi-line templates in attribute values (T8255)
17897 <div style="background: {{identity|#00FF00}}">-</div>
17899 <div style="background: #00FF00">-</div>
17904 Expansion of multi-line templates in attribute values (T8255 sanity check)
17906 <div style="background:
17909 <div style="background: #00FF00">-</div>
17912 <div style="background:
17917 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
17919 <div style="background: #00FF00">-</div>
17921 <div style="background: #00FF00">-</div>
17926 Tags which are hidden from Tidy cannot pass through the Sanitizer
17928 <mw:toc><script>alert();</script></mw:toc>
17930 <p><mw:toc><script>alert();</script></mw:toc></p>
17934 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
17938 Parser hook: empty input
17949 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
17952 ## Don't expect parsoid to rt this form.
17954 Parser hook: empty input using terminated empty elements
17956 parsoid=wt2html,html2html
17967 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17971 Parser hook: empty input using terminated empty elements (space before)
17982 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
17986 Parser hook: basic input
17997 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18000 ## Don't expect parsoid to rt this form.
18002 Parser hook: case insensitive
18004 parsoid=wt2html,html2html
18015 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18018 ## Don't expect parsoid to rt this form.
18020 Parser hook: case insensitive, redux
18022 parsoid=wt2html,html2html
18033 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18037 Parser hook: nested tags
18039 <tag><tag></tag></tag>
18048 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18052 Parser hook: basic arguments
18054 <tag width="200" height="100" depth="50" square=""></tag>
18067 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18070 ## Don't expect parsoid to rt this form.
18072 Parser hook: basic arguments, variations
18074 parsoid=wt2html,html2html
18076 <tag width=200 height = "100" depth = '50' square></tag>
18089 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18093 Parser hook: argument containing a forward slash (T7344)
18095 <tag filename="/tmp/bla"></tag>
18100 'filename' => '/tmp/bla',
18105 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18108 ## Don't expect parsoid to rt this form.
18110 Parser hook: empty input using terminated empty elements (T4374)
18112 parsoid=wt2html,html2html
18124 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18127 ## </tag> should be output literally since there is no matching tag that begins it
18128 ## Don't expect parsoid to rt this form.
18130 Parser hook: basic arguments using terminated empty elements (T4374)
18134 <tag width=200 height = "100" depth = '50' square/>
18151 <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
18155 ## Don't expect parsoid to rt this form.
18157 Parser hook: Don't allow unclosed extension tags
18163 this is a '''test'''
18165 <p>test <tag>123
18166 </p><p>this is a <b>test</b>
18169 <p>test <tag>123</p>
18171 <p>this is a <b>test</b></p>
18175 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18179 Parser hook: static parser hook not inside a comment
18181 <statictag>hello, world</statictag>
18183 <statictag action="flush" />
18189 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18190 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18194 Parser hook: static parser hook inside a comment
18196 <!-- <statictag>hello, world</statictag> -->
18197 <statictag action="flush" />
18202 <!-- <statictag>hello, world</statictag> -->
18203 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
18206 # Nested template calls; this case was broken by Parser.php rev 1.506,
18210 Template:One-parameter
18212 (My parameter is: {{{1}}})
18216 Template:Map-one-parameter
18218 {{{{{1}}}|{{{2}}}}}
18222 Nested template calls
18224 {{Map-one-parameter|One-parameter|param}}
18226 <p>(My parameter is: param)
18235 # HTML+Tidy effectively strips out the empty tags completely
18236 # But since Parsoid doesn't it wraps the <s></s> tags in p-tags
18237 # which Tidy would have done for the PHP parser had there been content inside it.
18239 Sanitizer: Closing of open tags
18241 <s></s><table></table>
18243 <s></s><table></table>
18246 <p><s></s></p><table></table>
18250 Sanitizer: Closing of open but not closed tags
18259 Sanitizer: Closing of closed but not open tags
18269 Sanitizer: Closing of closed but not open table tags
18273 Table not started</td></tr></table>
18275 <p>Table not started</p>
18277 <p>Table not started</p>
18281 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18283 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18285 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18288 <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>
18291 # In HTML5, the restrictions are that id must contain at least one character,
18292 # and must not contain any space characters.
18294 Sanitizer: Validating the contents of the id attribute (T6515)
18298 <br id="" /><br id="a space" />
18303 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18305 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18309 <br id="foo" /><br id="foo" />
18311 Something need to be done. foo-2 ?
18315 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18318 <meta itemprop="hello" content="world">
18319 <meta http-equiv="refresh" content="5">
18320 <meta itemprop="hello" http-equiv="refresh" content="5">
18321 <link itemprop="hello" href="{{SERVER}}">
18322 <link rel="stylesheet" href="{{SERVER}}">
18323 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18327 <p> <meta itemprop="hello" content="world" />
18328 <meta http-equiv="refresh" content="5">
18329 <meta itemprop="hello" content="5" />
18330 <link itemprop="hello" href="http://example.org" />
18331 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18332 <link itemprop="hello" href="http://example.org" />
18339 Sanitizer: Strip comments from CSS attributes
18341 parsoid=wt2html,wt2wt
18343 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18345 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18348 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18352 Language converter: output gets cut off unexpectedly (T7757)
18356 this bit is safe: }-
18358 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18360 then we get cut off here: }-
18362 all additional text is vanished
18364 <p>this bit is safe: }-
18365 </p><p>but if we add a conversion instance: xxx
18366 </p><p>then we get cut off here: }-
18367 </p><p>all additional text is vanished
18370 <p>this bit is safe: }-</p>
18371 <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>
18372 <p>then we get cut off here: }-</p>
18373 <p>all additional text is vanished</p>
18377 Self closed html pairs (T7487)
18379 <center><font id="bug" />Centered text</center>
18380 <div><font id="bug2" />In div text</div>
18382 <center><font id="bug"></font>Centered text</center>
18383 <div><font id="bug2"></font>In div text</div>
18391 Punctuation: nbsp before exclamation
18395 <p>C'est grave !
18400 Punctuation: CSS !important (T13874)
18402 <div style="width:50% !important">important</div>
18404 <div style="width:50% !important">important</div>
18409 Punctuation: CSS ! important (T13874; with space after)
18411 <div style="width:50% ! important">important</div>
18413 <div style="width:50% ! important">important</div>
18418 HTML bullet list, closed tags (T7497)
18431 <ul data-parsoid='{"stx":"html"}'>
18432 <li data-parsoid='{"stx":"html"}'>One</li>
18433 <li data-parsoid='{"stx":"html"}'>Two</li>
18439 HTML bullet list, unclosed tags (T7497)
18451 <ul data-parsoid='{"stx":"html"}'>
18452 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18453 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18459 HTML ordered list, closed tags (T7497)
18472 <ol data-parsoid='{"stx":"html"}'>
18473 <li data-parsoid='{"stx":"html"}'>One</li>
18474 <li data-parsoid='{"stx":"html"}'>Two</li>
18480 HTML ordered list, unclosed tags (T7497)
18493 <ol data-parsoid='{"stx":"html"}'>
18494 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18495 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18501 HTML nested bullet list, closed tags (T7497)
18524 <ul data-parsoid='{"stx":"html"}'>
18525 <li data-parsoid='{"stx":"html"}'>One</li>
18526 <li data-parsoid='{"stx":"html"}'>Two:
18527 <ul data-parsoid='{"stx":"html"}'>
18528 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18529 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18536 HTML nested bullet list, open tags (T7497)
18573 HTML nested ordered list, closed tags (T7497)
18598 HTML nested ordered list, open tags (T7497)
18635 HTML ordered list item with parameters oddity
18637 <ol><li id="fragment">One</li>
18640 <ol><li id="fragment">One</li>
18645 # parsoid doesn't explicitly mark autonumbered links, see T55505
18647 T7918: autonumbering
18649 [http://first/] [http://second] [ftp://ftp]
18653 [mailto:enclosed@mail.tld With target]
18655 [mailto:enclosed@mail.tld]
18657 mailto:inline@mail.tld
18659 <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>
18660 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18661 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18662 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18663 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18666 <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>
18667 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
18668 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
18669 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
18670 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18675 # Security and HTML correctness
18676 # From Nick Jenkins' fuzz testing
18680 Fuzz testing: Parser13
18695 Fuzz testing: Parser14
18700 <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>
18701 http://<div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
18703 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18709 <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>
18711 <div id="toc" class="toc">
18712 <div class="toctitle">
18716 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18723 Fuzz testing: Parser14-table
18725 parsoid=wt2html,html2html
18730 <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>
18731 <table style="__TOC__">
18736 <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>
18737 <table style="__TOC__">
18744 <table style="__TOC__"></table>
18747 # Known to produce bogus xml (extra </td>)
18749 Fuzz testing: Parser16
18776 Fuzz testing: Parser21
18779 ! irc://{{ftp://a" onmouseover="alert('hello world');"
18784 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18794 Fuzz testing: Parser22
18796 http://===r:::https://b
18800 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
18808 # Known to produce bad XML for now
18810 Fuzz testing: Parser24
18817 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
18818 <br style="onmouseover='alert(document.cookie);' " />
18820 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18825 <u class="|">}}}} >
18826 <br style="onmouseover='alert(document.cookie);'" />
18828 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18836 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
18837 <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>"}'/>}}}} >
18838 <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}'>
18842 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
18845 # Note: the current result listed for this is not what the original one was,
18846 # but the original bug was JavaScript injection, which is fixed in any case.
18847 # It's not clear that the original result listed was any more correct than the
18848 # current one. Original result:
18851 # <li class="||">
18852 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18854 Fuzz testing: Parser25 (T8055)
18860 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
18862 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18865 <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"]}'>
18866 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
18870 Fuzz testing: URL adjacent extension (with space, clean)
18872 http://example.com <nowiki>junk</nowiki>
18874 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
18877 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
18881 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
18883 http://example.com<nowiki>junk</nowiki>
18885 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
18888 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
18892 Fuzz testing: URL adjacent extension (no space, dirty; pre)
18894 http://example.com<pre>junk</pre>
18896 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
18899 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
18904 <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>
18908 Fuzz testing: image with bogus manual thumbnail
18910 [[Image:foobar.jpg|thumbnail= ]]
18912 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
18915 <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>
18919 Fuzz testing: encoded newline in generated HTML replacements (T8577)
18921 <pre dir=" "></pre>
18923 <pre dir=" "></pre>
18926 <pre typeof="mw:Extension/pre" about="#mwt2" dir="&#10;" data-mw='{"name":"pre","attrs":{"dir":"&#10;"},"body":{"extsrc":""}}'></pre>
18930 Parsing optional HTML elements (T8171)
18935 <td> Some tabular data</td>
18936 <td> More tabular data ...
18937 <td> And yet som tabular data</td>
18943 <td> Some tabular data</td>
18944 <td> More tabular data ...
18945 </td><td> And yet som tabular data</td>
18952 Correct handling of <td>, <tr> (T8171)
18957 <td> Some tabular data</td>
18958 <td> More tabular data ...</td>
18959 <td> And yet som tabular data</td>
18965 <td> Some tabular data</td>
18966 <td> More tabular data ...</td>
18967 <td> And yet som tabular data</td>
18975 Parsing crashing regression (fr:JavaScript)
18979 <p></body></x>
18984 Inline wiki vs wiki block nesting
18990 <p><b>Bold paragraph</b>
18991 </p><p>New wiki paragraph
18995 # FIXME: The current php output is documented
18996 # and desired output is the parsoid target.
18998 Inline HTML vs wiki block nesting
19004 <p><b>Bold paragraph
19005 </p><p>New wiki paragraph</b>
19008 <p><b>Bold paragraph</b>
19009 </p><p>New wiki paragraph
19013 # Original result was this:
19014 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19016 # While that might be marginally more intuitive, maybe, the six-apostrophe
19017 # construct is clearly pathological and the result stated here (which is what
19018 # the parser actually does) is about as reasonable as anything.
19020 Mixing markup for italics and bold
19023 '''bold''''''bold''bolditalics'''''
19025 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19033 Article for special page transclusion test
19037 Special page transclusion
19040 {{Special:Prefixindex/Xyzzyx}}
19042 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19048 Special page transclusion twice (T7021)
19051 {{Special:Prefixindex/Xyzzyx}}
19052 {{Special:Prefixindex/Xyzzyx}}
19054 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19056 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19062 Transclusion of default MediaWiki message
19064 {{MediaWiki:Mainpage}}
19071 Transclusion of nonexistent MediaWiki message
19073 {{MediaWiki:Mainpagexxx}}
19075 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19080 Transclusion of MediaWiki message with underscore
19082 {{MediaWiki:history_short}}
19089 Transclusion of MediaWiki message with space
19091 {{MediaWiki:history short}}
19098 Invalid header with following text
19108 Section extraction test (section 0)
19128 Section extraction test (section 1)
19150 Section extraction test (section 2)
19171 Section extraction test (section 3)
19191 Section extraction test (section 4)
19215 Section extraction test (section 5)
19235 Section extraction test (section 6)
19256 Section extraction test (section 7)
19276 Section extraction test (section 8)
19296 Section extraction test (section 9)
19317 Section extraction test (section 10)
19337 Section extraction test (nonexistent section 11)
19356 Section extraction test with bogus heading (section 1)
19361 ==bogus== not a legal section
19365 ==bogus== not a legal section
19369 Section extraction test with bogus heading (section 2)
19374 ==bogus== not a legal section
19381 Section extraction test with comment after heading (section 1)
19393 Section extraction test with comment after heading (section 2)
19405 Section extraction test with bogus <nowiki> heading (section 1)
19410 ==bogus== <nowiki>not a legal section</nowiki>
19414 ==bogus== <nowiki>not a legal section</nowiki>
19418 Section extraction test with bogus <nowiki> heading (section 2)
19423 ==bogus== <nowiki>not a legal section</nowiki>
19429 # Formerly testing for T4587, now resolved by the use of unmarked sections
19430 # instead of respecting commented sections
19432 Section extraction prefixed by comment (section 1)
19443 Section extraction prefixed by comment (section 2)
19453 # Formerly testing for T4607, now resolved by the use of unmarked sections
19454 # instead of respecting HTML-style headings
19456 Section extraction, mixed wiki and html (section 1)
19472 Section extraction, mixed wiki and html (section 2)
19488 # Formerly testing for T5342
19490 Section extraction, heading surrounded by <noinclude>
19494 <noinclude>==unmarked==</noinclude>
19500 # Test behavior of T21910
19502 Sectiion with all-equals
19507 The line above must have a trailing space
19510 But just in case it doesn't...
19514 But just in case it doesn't...
19518 Section replacement test (section 0)
19549 Section replacement test (section 1)
19578 Section replacement test (section 2)
19608 Section replacement test (section 3)
19639 Section replacement test (section 4)
19666 Section replacement test (section 5)
19697 Section replacement test (section 6)
19727 Section replacement test (section 7)
19758 Section replacement test (section 8)
19789 Section replacement test (section 9)
19818 Section replacement test (section 10)
19848 Section replacement test with initial whitespace (T15728)
19852 Preformatted initial line
19856 Preformatted initial line
19863 Section extraction, heading followed by pre with 20 spaces (T8398)
19875 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
19888 Section extraction, <pre> around bogus header (T12309)
19905 Section replacement, <pre> around bogus header (T12309)
19926 Handling of 
 in URLs
19930 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19933 <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>
19937 Handling of %0A in URLs
19941 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19944 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
19947 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
19949 5 quotes, code coverage +1 line
19956 <p><b><i></i></b></p>
19959 # same html as previous, but wikitext adjusted to match parsoid html2wt
19960 # note that wt2html and html2html will put the <i> before the <b>
19962 5 quotes, code coverage +1 line w/ nowiki (1)
19964 parsoid=wt2wt,html2wt
19966 '''''<nowiki/>'''''
19971 <p><b><i></i></b></p>
19974 # same as previous, just swapping the <i> and <b>
19976 5 quotes, code coverage +1 line w/ nowiki (2)
19978 '''''<nowiki/>'''''
19983 <p><i><b></b></i></p>
19987 Special:Search page linking.
19991 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
19996 {{!}} is a magic word
19998 {{!}} is a magic word there and {{!}} is still a magic word here
19999 | is not a magic word here but {{!}} is still a magic word here
20001 <p>| is a magic word there and | is still a magic word here
20002 | is not a magic word here but | is still a magic word here
20005 <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
20006 | 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>
20012 title=[[Parser test]]
20017 * {{FULLPAGENAMEE}}
20019 * {{BASEPAGENAMEE}}
20023 * {{ROOTPAGENAMEE}}
20025 * {{TALKPAGENAMEE}}
20026 * {{SUBJECTPAGENAME}}
20027 * {{SUBJECTPAGENAMEE}}
20030 * {{NAMESPACENUMBER}}
20034 * {{SUBJECTSPACEE}}
20035 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20037 <ul><li> Parser test</li>
20038 <li> Parser_test</li>
20039 <li> Parser test</li>
20040 <li> Parser_test</li>
20041 <li> Parser test</li>
20042 <li> Parser_test</li>
20043 <li> Parser test</li>
20044 <li> Parser_test</li>
20045 <li> Parser test</li>
20046 <li> Parser_test</li>
20047 <li> Talk:Parser test</li>
20048 <li> Talk:Parser_test</li>
20049 <li> Parser test</li>
20050 <li> Parser_test</li>
20058 <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>
20061 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20064 Gallery with valid attributes
20066 <gallery type="123" summary="345">
20067 File:File:Foobar.jpg
20070 <ul class="gallery mw-gallery-traditional" type="123">
20071 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20072 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20073 <div class="gallerytext">
20079 <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"}}'>
20080 <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>
20084 ## Parsoid thinks the "centre" here is a property, not a caption.
20089 "modes": ["wt2html"],
20090 "nativeGallery": true
20098 image4 |300px| centre
20099 image5.svg| http://///////
20104 <ul class="gallery mw-gallery-traditional">
20105 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20106 <div class="thumb" style="height: 150px;">Image1.png</div>
20107 <div class="gallerytext">
20110 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20111 <div class="thumb" style="height: 150px;">Image2.gif</div>
20112 <div class="gallerytext">
20115 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20116 <div class="thumb" style="height: 150px;">Image3</div>
20117 <div class="gallerytext">
20120 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20121 <div class="thumb" style="height: 150px;">Image4</div>
20122 <div class="gallerytext">
20127 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20128 <div class="thumb" style="height: 150px;">Image5.svg</div>
20129 <div class="gallerytext">
20130 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20134 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20135 <div class="thumb" style="height: 150px;">* image6</div>
20136 <div class="gallerytext">
20142 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20143 <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>
20144 <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>
20145 <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>
20146 <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>
20147 <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>
20148 <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>
20153 Gallery (with options, html)
20156 "modes": ["wt2html", "html2html"],
20157 "nativeGallery": true
20160 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20161 File:Nonexistent.jpg|caption
20162 File:Nonexistent.jpg
20163 image:foobar.jpg|some '''caption''' [[Main Page]]
20165 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20168 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20169 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20170 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20171 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20172 <div class="gallerytext">
20177 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20178 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20179 <div class="gallerytext">
20182 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20183 <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>
20184 <div class="gallerytext">
20185 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20189 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20190 <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>
20191 <div class="gallerytext">
20194 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20195 <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>
20196 <div class="gallerytext">
20204 <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":{}}'>
20205 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20206 <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>
20207 <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>
20208 <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>
20209 <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>
20210 <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>
20215 Gallery (with options, extsrc)
20218 "nativeGallery": false
20221 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20222 File:Nonexistent.jpg|caption
20223 File:Nonexistent.jpg
20224 image:foobar.jpg|some '''caption''' [[Main Page]]
20226 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20229 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20230 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20231 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20232 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20233 <div class="gallerytext">
20238 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20239 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20240 <div class="gallerytext">
20243 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20244 <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>
20245 <div class="gallerytext">
20246 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20250 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20251 <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>
20252 <div class="gallerytext">
20255 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20256 <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>
20257 <div class="gallerytext">
20265 <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"}}'>
20266 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20267 <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>
20268 <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>
20269 <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>
20270 <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>
20271 <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>
20276 Gallery with link that has fragment
20279 "modes": ["wt2html", "html2html"],
20280 "nativeGallery": true
20284 image:foobar.jpg|link=Main_Page
20285 image:foobar.jpg|link=Main_Page#section
20286 image:foobar.jpg|link=Main Page#section|caption
20289 <ul class="gallery mw-gallery-traditional">
20290 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20291 <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>
20292 <div class="gallerytext">
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/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>
20297 <div class="gallerytext">
20300 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20301 <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>
20302 <div class="gallerytext">
20310 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20311 <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>
20312 <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>
20313 <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>
20317 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20319 Gallery with template inside caption
20322 "nativeGallery": true
20325 <gallery caption="{{echo|hi}}">
20326 File:Foobar.jpg|{{echo|ho}}
20329 <ul class="gallery mw-gallery-traditional">
20330 <li class='gallerycaption'>{{echo|hi}}</li>
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="" 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">
20341 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20342 <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>
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 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>
20348 Gallery with wikitext inside caption
20351 "nativeGallery": true
20355 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20356 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20359 <ul class="gallery mw-gallery-traditional">
20360 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20361 <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>
20362 <div class="gallerytext">
20363 <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>
20367 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20368 <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>
20369 <div class="gallerytext">
20370 <p>This is a test template
20377 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20378 <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>
20379 <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>
20384 Gallery (with showfilename option)
20387 "nativeGallery": true
20390 <gallery showfilename="">
20391 File:Nonexistent.jpg|caption
20392 File:Nonexistent.jpg
20393 File:Foobar.jpg|some '''caption''' [[Main Page]]
20397 <ul class="gallery mw-gallery-traditional">
20398 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20399 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20400 <div class="gallerytext">
20401 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20406 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20407 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20408 <div class="gallerytext">
20409 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20413 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20414 <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>
20415 <div class="gallerytext">
20416 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20417 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20421 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20422 <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>
20423 <div class="gallerytext">
20424 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20431 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20432 <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>
20433 <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>
20434 <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>
20435 <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>
20439 ## Should Parsoid be preserving these variations? See T151367
20441 Gallery (with namespace-less filenames)
20444 "modes": ["wt2html", "html2html"],
20445 "nativeGallery": true
20449 File:Nonexistent.jpg
20455 <ul class="gallery mw-gallery-traditional">
20456 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20457 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20458 <div class="gallerytext">
20461 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20462 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20463 <div class="gallerytext">
20466 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20467 <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>
20468 <div class="gallerytext">
20471 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20472 <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>
20473 <div class="gallerytext">
20479 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20480 <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>
20481 <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>
20482 <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>
20483 <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>
20488 Gallery override link with WikiLink (T36852)
20491 "nativeGallery": true
20495 File:Foobar.jpg|alt=galleryalt|link=InterWikiLink
20498 <ul class="gallery mw-gallery-traditional">
20499 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20500 <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>
20501 <div class="gallerytext">
20507 <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":{}}'>
20508 <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>
20513 Gallery override link with absolute external link (T36852)
20516 "nativeGallery": true
20520 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20523 <ul class="gallery mw-gallery-traditional">
20524 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20525 <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>
20526 <div class="gallerytext">
20532 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20533 <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>
20538 Gallery override link with absolute external link with LanguageConverter
20543 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20546 <ul class="gallery mw-gallery-traditional">
20547 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20548 <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>
20549 <div class="gallerytext">
20559 Gallery override link with malicious javascript (T36852)
20562 "modes": ["wt2html", "html2html"],
20563 "nativeGallery": true
20567 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20570 <ul class="gallery mw-gallery-traditional">
20571 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20572 <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>
20573 <div class="gallerytext">
20579 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20580 <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>
20584 # Note that parsoid uses the invalid link as a caption, PHP does not.
20586 Gallery with invalid title as link (T45964)
20589 "modes": ["wt2html", "html2html"],
20590 "nativeGallery": true
20594 File:Foobar.jpg|link=<
20597 <ul class="gallery mw-gallery-traditional">
20598 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20599 <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>
20600 <div class="gallerytext">
20606 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20607 <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>
20612 Serialize gallery without attrs in data-mw
20615 "modes": ["html2wt"],
20616 "nativeGallery": true
20619 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20620 <li class="gallerycaption">123</li>
20621 <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>
20624 <gallery caption="123">
20630 Gallery with class and style attributes
20633 "nativeGallery": true
20636 <gallery class="center" style="text-align: center;">
20640 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20641 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20642 <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>
20643 <div class="gallerytext">
20649 <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":{}}'>
20650 <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>
20655 Gallery in slideshow mode
20658 "nativeGallery": true
20661 <gallery mode="slideshow" showthumbnails="">
20665 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20666 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20667 <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>
20668 <div class="gallerytext">
20674 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20675 <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>
20680 HTML Hex character encoding (spells the word "JavaScript")
20682 parsoid=wt2html,wt2wt,html2html
20684 JavaScript
20686 <p>JavaScript
20691 <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>
20695 HTML Hex character encoding bogus encoding (T28437 regression check)
20699 <p>&#xsee;&#XSEE;
20702 <p>&#xsee;&#XSEE;</p>
20706 HTML Hex character encoding mixed case
20708 parsoid=wt2html,wt2wt,html2html
20717 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20720 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20721 # Note that U+000C (form feed) is not a valid XML character, so
20722 # it is banned even though allowed in HTML5.
20724 Illegal character references (T106578)
20729 ; Control (low): 
20730 ; Control (high):  Ÿ
20731 ; Surrogate: ��
20732 ; This is an okay astral character: 💩
20741 <dt>Control (low)</dt>
20743 <dt>Control (high)</dt>
20744 <dd>&#x7F; &#x9F;</dd>
20746 <dd>&#xD83D;&#xDCA9;</dd>
20747 <dt>This is an okay astral character</dt>
20753 __FORCETOC__ override
20765 ISBN 978-0-1234-56 789
20767 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
20770 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
20772 <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>
20776 ISBN followed by 5 spaces
20787 ISBN ISBN 1234567890
20789 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20792 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
20795 # Uppercase X and lowercase x as well
20806 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
20807 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
20808 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
20809 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
20810 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
20811 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
20814 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
20815 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
20816 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
20817 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
20818 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
20819 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
20823 ISBN with empty prefix (parsoid test)
20827 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20830 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
20834 T24905: <abbr> followed by ISBN followed by </a>
20836 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
20838 <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>
20841 <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>
20849 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
20854 Double RFC with a wiki link
20858 <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>
20867 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
20870 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
20874 Centre-aligned image
20876 [[Image:foobar.jpg|centre]]
20878 <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>
20885 [[Image:foobar.jpg|none]]
20887 <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>
20892 Width + Height sized image (using px) (height is ignored)
20894 [[Image:foobar.jpg|640x480px]]
20896 <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>
20901 Width-sized image (using px, no following whitespace)
20903 [[Image:foobar.jpg|640px]]
20905 <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>
20910 Width-sized image (using px, with following whitespace - test regression from r39467)
20912 [[Image:foobar.jpg|640px ]]
20914 <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>
20919 Width-sized image (using px, with preceding whitespace - test regression from r39467)
20921 [[Image:foobar.jpg| 640px]]
20923 <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>
20928 Image with page parameter
20932 [[File:LoremIpsum.djvu|page=2]]
20934 <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>
20937 <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>
20941 Another italics / bold test
20949 # FIXME: The php output seems broken. It's interleaving some open/close tags.
20955 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
20958 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
20962 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
20964 Images with the "|" character in the comment
20966 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
20968 <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>
20971 <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>
20975 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
20977 <html><script>alert(1);</script></html>
20979 <p><html><script>alert(1);</script></html>
20984 HTML with raw HTML ($wgRawHtml==true)
20988 <html><script>alert(1);</script></html>
20990 <p><script>alert(1);</script>
20995 Parents of subpages, one level up
20997 subpage title=[[Subpage test/L1/L2/L3]]
21001 <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>
21007 Parents of subpages, one level up, not named
21009 subpage title=[[Subpage test/L1/L2/L3]]
21013 <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>
21020 Parents of subpages, two levels up
21022 subpage title=[[Subpage test/L1/L2/L3]]
21028 <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
21029 </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>
21034 Parents of subpages, two levels up, without trailing slash or name.
21036 subpage title=[[Subpage test/L1/L2/L3]]
21045 Parents of subpages, two levels up, with lots of extra trailing slashes.
21047 subpage title=[[Subpage test/L1/L2/L3]]
21051 <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>
21056 Subpage test/L1/L2/L3Sibling
21062 Transclusion of a sibling page (one level up)
21064 subpage title=[[Subpage test/L1/L2/L3]]
21073 Transclusion of a child page
21075 subpage title=[[Subpage test/L1/L2]]
21083 # This is wt2html only in Parsoid because we add <nowiki>
21084 # because of {{..}} and we don't expect to fix that to
21085 # eliminate the nowikis selective for {{..}} markup.
21087 Non-transclusion because of too many up levels
21089 subpage title=[[Subpage test/L1/L2/L3]]
21092 {{../../../../More than parent}}
21094 <p>{{../../../../More than parent}}
21097 <p>{{../../../../More than parent}}</p>
21101 Definition list code coverage
21107 <dl><dt> title  </dt>
21109 <dt> title </dt>
21115 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21116 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21117 <dt>title</dt><dd> def</dd></dl>
21121 Don't fall for the self-closing div
21123 <div>hello world</div/>
21125 <div>hello world</div>
21134 <p>[[:Template:Msg]]
21143 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21147 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21149 Always escape literal '>' in output, not just after '<'
21163 <p>This is a test template
21164 This is a test template
21176 Inclusion of !userCanEdit() content
21180 <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>
21186 Out-of-order TOC heading levels
21195 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
21197 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21199 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21200 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21203 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21205 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21206 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21212 <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>
21213 <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>
21214 <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>
21215 <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>
21216 <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>
21217 <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>
21223 ISBN with a dummy number
21233 ISBN with space-delimited number
21237 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21240 <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>
21245 ISBN with multiple spaces, no number
21264 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21265 </p><p>ISBN 12345678901
21268 <p>ISBN 123456789</p>
21270 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21272 <p>ISBN 12345678901</p>
21277 ISBN with trailing year (T9110)
21279 ISBN 1-234-56789-0 - 2006
21281 ISBN 1 234 56789 0 - 2006
21283 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21284 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21287 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21289 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21296 {{anchorencode:foo bar©#%n}}
21298 <p>foo_bar.C2.A9.23.25n
21303 anchorencode trims spaces
21305 {{anchorencode: __pretty__please__}}
21312 anchorencode deals with links
21314 {{anchorencode: [[hello|world]] [[hi]]}}
21321 anchorencode deals with templates
21323 {{anchorencode: {{Foo}} }}
21330 anchorencode encodes like the TOC generator: (T20431)
21332 === _ +:.3A%3A&&]] ===
21333 {{anchorencode: _ +:.3A%3A&&]] }}
21336 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21337 <p>.2B:.3A.253A.26.26.5D.5D
21342 T8200: blockquotes and paragraph formatting
21363 T10293: Use of center tag ruins paragraph formatting
21384 Parsing of overlapping (improperly nested) inline html tags
21386 <span><s>x</span></s>
21388 <p><span><s>x</span></s></span>
21391 <p><span><s>x</s></span>
21396 ### Language variants related tests
21399 # Parsoid does not mark self-links.
21400 # Parsoid does not convert links; PHP will do any necessary redirects.
21403 Self-link in language variants
21405 title=[[Dunav]] language=sr
21407 Both [[Dunav]] and [[Дунав]] are names for this river.
21409 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21412 <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>
21422 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21424 title=[[Duna]] language=sr
21426 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21428 <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.
21431 <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>
21435 Link to a section of a variant of this title shouldn't be parsed as self-link
21437 title=[[Duna]] language=sr
21439 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21441 <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.
21444 <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>
21448 Link to pages in language variants
21452 Main Page can be written as [[Маин Паге]]
21454 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21457 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21462 Multiple links to pages in language variants
21466 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21468 <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>.
21471 <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>
21476 Simple template in language variants
21482 <p>This is a test template
21488 Template with explicit namespace in language variants
21494 <p>This is a test template
21500 Basic test for template parameter in language variants
21504 {{парамтест|param=foo}}
21506 <p>This is a test template with parameter foo
21511 Simple category in language variants
21515 [[Category:МедиаWики Усер'с Гуиде]]
21517 cat=МедиаWики_Усер'с_Гуиде sort=
21519 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21534 ## We used to, but no longer wt2wt this test since the default serializer
21535 ## will normalize all categories to serialize on their own line.
21536 ## This wikitext usage is going to be fairly uncommon in production and
21537 ## selser will take care of preserving formatting in those scenarios.
21539 Don't convert blue categorylinks to another variant (T35210)
21545 [[A]][[Category:分类]]
21549 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21550 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21554 Stripping -{}- tags (language variants)
21558 Latin proverb: -{Ne nuntium necare}-
21560 <p>Latin proverb: Ne nuntium necare
21563 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21568 Prevent conversion with -{}- tags (language variants)
21570 language=sr variant=sr-ec
21572 Latinski: -{Ne nuntium necare}-
21574 <p>Латински: Ne nuntium necare
21577 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21582 Prevent conversion of text with -{}- tags (language variants)
21584 language=sr variant=sr-ec
21586 Latinski: -{Ne nuntium necare}-
21588 <p>Латински: Ne nuntium necare
21591 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21596 Prevent conversion of links with -{}- tags (language variants)
21598 language=sr variant=sr-ec
21602 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21605 <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>
21610 -{}- tags within headlines (within html for parserConvert())
21612 language=sr variant=sr-ec
21616 Note that even an unprotected headline ID is not affected by language
21621 <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>
21622 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
21625 <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>
21628 <h2 id="-.7BNaslov.7D-"><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
21630 <p>Note that even an unprotected headline ID is not affected by language
21633 <h2 id="Latinski">Latinski</h2>
21637 Explicit definition of language variant alternatives
21639 language=zh variant=zh-tw
21641 -{zh:China;zh-tw:Taiwan}-, not China
21643 <p>Taiwan, not China
21646 <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>
21650 Filter syntax for language variants
21652 language=zh variant=zh-tw
21654 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
21656 <p>fooblog, WEBJOURNAL, WEBLOGquux
21659 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
21662 # Note that Parsoid post-processing for language variants needs to
21663 # update the `title` attribute here, based on the mw:ExpandedAttrs property
21665 Conversion around HTML tags
21667 language=sr variant=sr-ec
21669 -{H|span=>sr-ec:script;title=>sr-ec:src}-
21670 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
21673 <span title="ЛаCтин">ски</span>
21676 <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"}]}'/>
21677 <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>
21681 Explicit session-wise two-way language variant mapping (A flag and - flag)
21683 language=zh variant=zh-tw
21685 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
21687 Taiwan is not China.
21689 But -{A|zh:China; zh-tw:Taiwan}- is China,
21691 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
21693 and -{China}- is China.
21695 <p>This is Taiwan, but we'll forget that now.
21696 </p><p>Taiwan is not China.
21697 </p><p>But Taiwan is Taiwan,
21698 </p><p>(This should be stripped!)
21699 </p><p>and China is China.
21702 <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>
21703 <p>Taiwan is not China.</p>
21704 <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>
21705 <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>
21706 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
21710 Explicit session-wise one-way language variant mapping (A flag and - flag)
21712 language=zh variant=zh-tw
21714 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
21716 COUNTRY is China or Taiwan.
21718 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
21720 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
21722 and -{COUNTRY}- is COUNTRY.
21724 <p>This is Taiwan, but we'll forget that now.
21725 </p><p>COUNTRY is China or Taiwan.
21726 </p><p>But Taiwan is Taiwan,
21727 </p><p>(This should be stripped!)
21728 </p><p>and COUNTRY is COUNTRY.
21731 <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>
21732 <p>COUNTRY is China or Taiwan.</p>
21733 <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>
21734 <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>
21735 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
21739 Explicit session-wise two-way language variant mapping (H flag for hide)
21741 language=zh variant=zh-tw
21743 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
21747 <p>(This should be stripped!)
21748 </p><p>Taiwan is Taiwan.
21751 <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>
21752 <p>Taiwan is China.</p>
21756 Explicit session-wise one-way language variant mapping (H flag for hide)
21758 language=zh variant=zh-tw
21760 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
21762 COUNTRY is Taiwan or China.
21764 <p>(This should be stripped!)
21765 </p><p>Taiwan is Taiwan or China.
21768 <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>
21769 <p>COUNTRY is Taiwan or China.</p>
21772 ## Note that parsoid test runner does not support 'showtitle' option.
21774 Adding explicit conversion rule for title (T flag)
21776 language=zh variant=zh-tw showtitle
21778 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
21783 <p>Should be stripped!
21784 </p><p>Taiwan is China.
21787 <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>
21788 <p>Taiwan is China.</p>
21792 Code coverage: T combined with H flag
21794 language=zh variant=zh-tw showtitle
21796 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
21801 <p>Should be stripped!
21802 </p><p>Taiwan is Taiwan.
21805 <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>
21806 <p>Taiwan is China.</p>
21810 Code coverage: T with no variants
21812 language=zh variant=zh-tw showtitle
21814 -{H|zh:China; zh-tw:Taiwan}-
21815 Taiwan is China.-{T|Taiwan is China}-
21822 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
21823 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
21827 Code coverage: rules with no variants
21829 language=zh variant=zh-tw
21831 -{H|zh:China; zh-tw:Taiwan}-
21842 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
21844 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
21845 Taiwan is China.</p>
21850 Code coverage: D flag for conversion rule
21852 language=zh variant=zh-tw
21854 -{D|zh-cn:XA; zh-tw:YA}-
21855 -{A;D|zh-cn:XB; zh-tw:YB}-
21856 -{D;H|zh-cn:XC; zh-tw:YC}-
21858 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
21864 XA XB XC YA YB YC FOO BAR BAT 012345
21869 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
21873 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
21876 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
21877 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
21878 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
21879 <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>
21880 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
21881 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
21882 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
21883 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
21887 Code coverage: N flag for conversion rule
21889 language=zh variant=zh-cn
21899 </p><p>српски (ћирилица)
21902 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
21903 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
21904 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
21907 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
21909 Code coverage: N flag for conversion rule (wt2html only)
21911 language=zh variant=zh-cn
21912 parsoid=wt2html,html2html
21919 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
21923 Testing that changing the language variant here in the tests actually works
21925 language=zh variant=zh showtitle
21927 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
21930 <p>Should be stripped!
21933 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
21937 Recursive conversion of alt and title attrs shouldn't clear converter state
21939 language=zh variant=zh-cn
21942 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
21943 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
21947 Should be stripped<span title="Exclamation">!</span>
21950 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
21951 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>
21955 T26072: more test on conversion rule for title
21957 language=zh variant=zh-tw showtitle
21959 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
21961 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
21964 <p>This should be stripped!
21965 </p><p>This won't take interferes with the title rule.
21968 <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>
21969 <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>
21973 Partly disable title conversion if variant == main language code
21975 language=zh variant=zh title=[[ZH]] showtitle
21977 -{T|zh-cn:CN;zh-tw:TW}-
21983 <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>
21987 Partly disable title conversion if variant == main language code, more
21989 language=zh variant=zh title=[[ZH]] showtitle
21997 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22001 Raw output of variant escape tags (R flag)
22003 language=zh variant=zh-tw
22005 Raw: -{R|zh:China;zh-tw:Taiwan}-
22007 <p>Raw: zh:China;zh-tw:Taiwan
22010 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22013 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22015 Raw output of variant escape tags (R flag) (wt2html only)
22017 language=zh variant=zh-tw
22018 parsoid=wt2html,html2html
22020 -{Variant}- -{D|syntax}- -{D;R|options}-
22022 <p>Variant syntax options
22025 <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>
22029 Nested markup inside raw output of variant escape tags (R flag)
22031 language=zh variant=zh-tw
22033 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22035 <p>Nested raw: nested Taiwan nested
22038 <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>
22042 Nested markup and spaces inside raw output of variant escape tags (R flag)
22044 language=zh variant=zh-tw
22046 X-{ outer -{ inner }- outer }-X
22048 <p>X outer inner outer X
22051 <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>
22055 Templates inside raw output of variant escape tags (R flag)
22057 language=zh variant=zh-tw
22059 Nested raw: -{R|nested {{echo|hi}} templates}-
22061 <p>Nested raw: nested hi templates
22064 <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>
22068 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22070 language=zh variant=zh-cn
22072 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22077 <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>
22081 Conversion rules from [numeric-only string] to [something else] (T48634)
22083 language=zh variant=zh-cn
22085 -{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
22090 <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>
22094 Two-way converter rule entries with an empty value should be ignored (T53551)
22096 language=zh variant=zh-cn
22098 -{H|zh-cn:foo;zh-tw:;}-foobar
22103 <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>
22107 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22109 language=zh variant=zh-cn
22111 -{H|=>zh-cn:foo;}-foobar
22116 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22120 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22122 language=zh variant=zh-cn
22129 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22133 Nested using of manual convert syntax
22135 language=zh variant=zh-hk
22137 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22139 <p>Nested: Hello Hong Kong!
22142 <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>
22146 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22148 language=zh variant=zh-cn
22150 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22152 <p><span title="X">A</span>
22155 <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>
22159 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22161 language=zh variant=zh-cn
22163 -{<span title="-{X}-">A</span>}-
22164 !! html/php+disabled
22165 <p><span title="X">A</span>
22168 <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>
22171 # Parsoid and PHP disagree on how to parse this example: Parsoid
22172 # insists that the content of a language converter element be a valid
22173 # DOM fragment or attribute string
22175 Language converter markup with block content
22177 language=zh variant=zh-cn
22179 <span>a-{b<div>c}-d
22181 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22183 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22185 <p><span>ab</span></p>
22186 <div><span>cd <span>ab</span></span>
22187 <div><span>cd <span>ad</span></span></div>
22190 <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>
22192 <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>
22194 <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>
22198 LanguageConverter selser (1)
22200 language=zh variant=zh-cn
22202 "modes": ["wt2wt", "selser"],
22204 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22214 LanguageConverter selser (2)
22216 language=zh variant=zh-cn
22218 "modes": ["wt2wt", "selser"],
22220 ["span[class='x']", "contents", "text", "-{foo}-"],
22221 ["a", "contents", "text", "-{"],
22222 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22226 <span class="x">TEXT1</span>
22227 [http://example.com TEXT2]
22231 <span class="x"><nowiki>-{foo}-</nowiki></span>
22232 [http://example.com -{]
22233 [[Foo|<nowiki>-{</nowiki>]]
22234 {{1x|<nowiki>-{</nowiki>}}
22237 # Tests LanguageVariantText in ConstrainedText
22239 LanguageConverter selser (3)
22241 language=zh variant=zh-cn
22243 "modes": ["wt2wt", "selser"],
22245 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22246 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22257 |<nowiki/>-{edited}-
22261 # Tests LanguageVariantText._fromSelser
22263 LanguageConverter selser (4)
22265 language=zh variant=zh-cn
22267 "modes": ["wt2wt", "selser"],
22269 ["td > span.x", "remove"]
22275 |<span class="x">Foo</span>-{Bar}-
22276 ||<span class="x">Foo</span>-{Bar}-
22286 # Since Parsoid is starting to emit canonical wikitext for links,
22287 # [http://example.com http://example.com] will not RT back to that
22289 # Parsoid does not language-convert links (it is done in a
22290 # post-processing step)
22292 Proper conversion of text in external links
22294 language=sr variant=sr-ec
22297 http://www.google.com
22298 gopher://www.google.com
22299 [http://www.google.com http://www.google.com]
22300 [gopher://www.google.com gopher://www.google.com]
22301 [https://www.google.com irc://www.google.com]
22302 [ftp://www.google.com www.google.com/ftp://dir]
22303 [//www.google.com www.google.com]
22305 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22306 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22307 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22308 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22309 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22310 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22311 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22314 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22315 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22316 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22317 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22318 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
22319 <a rel="mw:ExtLink" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22320 <a rel="mw:ExtLink" href="//www.google.com">www.google.com</a></p>
22324 Do not convert roman numbers to language variants
22326 language=sr variant=sr-ec
22330 <p>Фридрих IV је цар.
22333 <p>Fridrih IV je car.</p>
22337 Unclosed language converter markup "-{"
22348 Don't convert raw rule "-{R|=>}-" to "=>"
22357 <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>
22361 Don't break link parsing if language converter markup is in the caption.
22363 language=sr variant=sr-ec
22365 [[Main Page|-{R|main page}-]]
22367 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22370 <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>
22374 T146304: Don't break template parsing if language converter markup is in the parameter.
22376 language=sr variant=sr-ec
22383 <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>
22387 T146305: Don't break image parsing if language converter markup is in the caption.
22391 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22393 <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>
22396 <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>
22400 T146305: Don't break image parsing if nested language converter markup is in the caption.
22402 language=zh variant=zh-cn
22404 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22406 <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>
22409 <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>
22412 # XXX html2wt disabled because rich markup in alt is not preserved.
22414 Don't break gallery if language converter markup is inside.
22419 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22420 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22423 <ul class="gallery mw-gallery-traditional">
22424 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22425 <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>
22426 <div class="gallerytext">
22427 <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>
22431 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22432 <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>
22433 <div class="gallerytext">
22434 <p>This is a test template
22441 <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"}}'>
22442 <li class="gallerybox">
22443 <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>
22444 <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>
22446 <li class="gallerybox">
22447 <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>
22448 <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>
22454 T153135: Don't break list handling if language converter markup is in the item.
22456 language=zh variant=zh-cn
22458 ;-{zh-cn:AAA;zh-tw:BBB}-
22462 <dt>foo:bar</dt></dl>
22465 <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>
22466 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22470 // Note that parsoid does not protect colons unless language converter
22471 // markup is properly nested, because it is a backtracking parser.
22473 T153135: Unclosed markup in definition list (code coverage)
22475 language=zh variant=zh-cn
22481 <dt><b>foo:bar</b></dt>
22482 <dt><b>-{zh-cn:AAA</b></dt>
22485 <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}'>
22486 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22487 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22492 T153135: Nested language converter markup in definition list (code coverage)
22494 language=zh variant=zh-cn
22496 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22498 <dl><dt>AAA foo:bar bat:baz</dt>
22502 <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>
22503 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22507 # html2wt mode disabled due to <nowiki> insertion.
22509 T153140: Don't break table handling if language converter markup is in the cell.
22511 language=sr variant=sr-ec
22512 parsoid=wt2html,wt2wt,html2html
22529 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22536 Language converter tricky html2wt cases (1)
22539 parsoid=html2wt,wt2wt
22541 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22543 -{<nowiki>}-</nowiki>}-
22550 Language converter tricky html2wt cases (2)
22553 parsoid=html2wt,wt2wt
22557 <nowiki>-{foo}-</nowiki>
22559 <p>-{foo}-
22564 Language converter tricky html2wt cases (3)
22567 parsoid=html2wt,wt2wt
22569 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22570 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22571 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22577 -{<nowiki>-{foo}-</nowiki>}-
22581 </p><p>-{foo}-
22586 Language converter tricky html2wt cases (4)
22589 parsoid=html2wt,wt2wt
22591 <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>
22599 # Note that the <nowiki> escaping added by parsoid for source text,
22600 # destination text, and language names only works on the PHP side
22601 # for *destination text*. (HTML entity escaping wouldn't work
22602 # any better.) This is probably a bug, at least for source texts.
22603 # (For language names PHP uses a precise regexp based on the languages
22604 # it currently knows have variants, which is fragile since this set
22605 # can grow/shrink over time.)
22607 Language converter tricky html2wt cases (5)
22609 language=zh variant=zh-cn
22611 <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>
22612 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22613 <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>
22614 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22617 -{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
22619 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22621 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
22623 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
22626 !! html/php+disabled
22627 <p>foobat;xyz=>zh-cn:abc
22631 </p><p>a:b=>c 0;zh-tw:bar
22636 T2529: Uncovered bullet
22645 # Plain MediaWiki does not remove empty lists, but tidy actually does.
22646 # Templates in Wikipedia rely on this behavior, as tidy has always been
22647 # enabled there. These tests are normally run *without* tidy, so specify the
22648 # full output here.
22649 # To test realistic parsing behavior, apply a tidy-like transformation to both
22650 # the expected output and your parser's output.
22652 T2529: Uncovered bullet leaving empty list, normally removed by tidy
22654 ******* Foo {{bullet}}
22656 <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>
22662 T2529: Uncovered table already at line-start
22685 T2529: Uncovered bullet in parser function result
22687 * Foo {{lc:{{bullet}} }}
22695 T7678: Double-parsed template argument
22697 {{lc:{{{1}}}|hello}}
22704 T7678: Double-parsed template invocation
22706 {{lc:{{paramtest {{!}} param = hello }} }}
22708 <p>{{paramtest | param = hello }}
22713 Case insensitivity of parser functions for non-ASCII characters (T10143)
22716 title=[[Main Page]]
22718 {{PRVNÍVELKÉ:ěščř}}
22719 {{prvnívelké:ěščř}}
22739 Morwen/13: Unclosed link followed by heading
22746 <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>
22751 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
22758 <h1><span class="mw-headline" id="heading">heading</span></h1>
22763 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
22770 <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>
22785 Paragraphs inside divs (no extra line breaks)
22797 Paragraphs inside divs (extra line break on open)
22812 Paragraphs inside divs (extra line break on close)
22827 Paragraphs inside divs (extra line break on open and close)
22844 Nesting tags, paragraphs on lines which begin with <div>
22846 <div></div><strong>A
22849 <p><strong>A</strong></p>
22850 <p><strong>B</strong></p>
22858 # T8200: <blockquote> should behave like <div> with respect to line breaks
22860 T8200: paragraphs inside blockquotes (no extra line breaks)
22862 <blockquote>Line one
22864 Line two</blockquote>
22866 <blockquote>Line one
22867 Line two</blockquote>
22871 <p>Line one Line two</p>
22876 T8200: paragraphs inside blockquotes (extra line break on open)
22881 Line two</blockquote>
22886 Line two</blockquote>
22891 Line two</blockquote>
22895 T8200: paragraphs inside blockquotes (extra line break on close)
22897 <blockquote>Line one
22902 <blockquote>Line one
22915 T8200: paragraphs inside blockquotes (extra line break on open and close)
22937 Paragraphs inside blockquotes/divs (no extra line breaks)
22939 <blockquote><div>Line one
22941 Line two</div></blockquote>
22943 <blockquote><div>Line one
22944 Line two</div></blockquote>
22949 Paragraphs inside blockquotes/divs (extra line break on open)
22954 Line two</div></blockquote>
22959 Line two</div></blockquote>
22964 Paragraphs inside blockquotes/divs (extra line break on close)
22966 <blockquote><div>Line one
22969 </div></blockquote>
22971 <blockquote><div>Line one
22974 </div></blockquote>
22979 Paragraphs inside blockquotes/divs (extra line break on open and close)
22985 </div></blockquote>
22991 </div></blockquote>
22996 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
22998 wgLinkHolderBatchSize=0
23004 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23005 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23006 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23011 Free external link invading image caption
23013 [[Image:Foobar.jpg|thumb|http://x|hello]]
23015 <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>
23020 T17196: localised external link numbers
23024 [http://en.wikipedia.org/]
23026 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23029 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
23033 Multibyte character in padleft
23035 {{padleft:-Hello|7|Æ}}
23042 Multibyte character in padright
23044 {{padright:Hello-|7|Æ}}
23051 formatdate parser function
23053 {{#formatdate:2009-03-24}}
23055 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23060 formatdate parser function, with default format
23062 {{#formatdate:2009-03-24|mdy}}
23064 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23069 Spacing of numbers in formatted dates
23071 {{#formatdate:January 15}}
23073 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23078 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
23080 language=nl title=[[MediaWiki:Common.css]]
23082 {{#formatdate:2009-03-24|dmy}}
23084 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23097 Edit comment with link
23101 I like the [[Main Page]] a lot
23103 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23107 Edit comment with link and link text
23111 I like the [[Main Page|best pages]] a lot
23113 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23117 Edit comment with link and link text with suffix
23121 I like the [[Main Page|best page]]s a lot
23123 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23127 Edit comment with section link (non-local, eg in history list)
23129 comment title=[[Main Page]]
23131 /* External links */ removed bogus entries
23133 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23137 Edit comment with section link and text before it (non-local, eg in history list)
23139 comment title=[[Main Page]]
23141 pre-comment text /* External links */ removed bogus entries
23143 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>
23147 Edit comment with section link (local, eg in diff view)
23149 comment local title=[[Main Page]]
23151 /* External links */ removed bogus entries
23153 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23157 Edit comment with subpage link (T16080)
23161 title=[[Subpage test]]
23163 Poked at a [[/subpage]] here...
23165 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23169 Edit comment with subpage link and link text (T16080)
23173 title=[[Subpage test]]
23175 Poked at a [[/subpage|neat little page]] here...
23177 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23181 Edit comment with bogus subpage link in non-subpage NS (T16080)
23184 title=[[Subpage test]]
23186 Poked at a [[/subpage]] here...
23188 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23192 Edit comment with bare anchor link (local, as on diff)
23196 title=[[Main Page]]
23200 <a href="#section">#section</a>
23204 Edit comment with bare anchor link (non-local, as on history)
23207 title=[[Main Page]]
23211 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23215 Anchor starting with underscore
23221 <p><a href="#_ref">One</a>
23224 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23228 Id starting with underscore
23230 <div id="_ref"></div>
23232 <div id="_ref"></div>
23237 Edit comment with link with more than one pipe (T99346)
23241 [[Main Page|Many|pipes]]
23243 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23247 Complex edit comment with link with more than one pipe (T99346)
23251 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23253 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..."
23257 Space normalisation on autocomment (T24784)
23260 title=[[Main Page]]
23262 /* __hello__world__ */
23264 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23268 percent-encoding and + signs in comments (T28410)
23272 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23274 <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>
23277 # Parsoid doesn't support this yet: see T75581
23278 # but it *should* omit the 'src' attribute if the image is bad.
23279 # PHP side of tests was disabled in
23280 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23281 # because of issues in the PHP parserTests infrastructure
23282 # (but the output below is indeed what the PHP side emits)
23284 Bad images - basic functionality
23287 !! DISABLED/html/php
23289 <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>
23293 Bad images - T18039: text after bad image disappears
23298 !! DISABLED/html/php
23304 <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>
23309 Verify that displaytitle works (T24501) no displaytitle
23313 wgAllowDisplayTitle=true
23314 wgRestrictDisplayTitle=false
23316 this is not the the title
23319 <p>this is not the the title
23324 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23329 wgAllowDisplayTitle=true
23330 wgRestrictDisplayTitle=false
23332 this is not the the title
23333 {{DISPLAYTITLE:whatever}}
23336 <p>this is not the the title
23341 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23346 wgAllowDisplayTitle=true
23347 wgRestrictDisplayTitle=true
23349 this is not the the title
23350 {{DISPLAYTITLE:whatever}}
23353 <p>this is not the the title
23358 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23363 wgAllowDisplayTitle=true
23364 wgRestrictDisplayTitle=true
23366 this is not the the title
23367 {{DISPLAYTITLE:screen}}
23370 <p>this is not the the title
23375 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23380 wgAllowDisplayTitle=false
23382 this is not the the title
23383 {{DISPLAYTITLE:screen}}
23386 <p>this is not the the title
23387 <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>
23392 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23397 wgAllowDisplayTitle=false
23399 this is not the the title
23402 <p>this is not the the title
23407 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23412 wgAllowDisplayTitle=true
23413 wgRestrictDisplayTitle=true
23415 this is not the the title
23416 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23418 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23419 <p>this is not the the title
23424 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23429 wgAllowDisplayTitle=true
23430 wgRestrictDisplayTitle=true
23432 this is not the the title
23433 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23435 <span style="color: red;">s</span>creen
23436 <p>this is not the the title
23441 Page status indicators: Empty name is invalid
23445 <indicator name=" "></indicator>
23446 <indicator></indicator>
23448 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23449 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23454 Page status indicators: Weird syntaxes that are okay
23458 <indicator name="empty" />
23459 <indicator name="name"></indicator>
23468 Page status indicators: Torture test
23472 <indicator name="01">hello world</indicator>
23473 <indicator name="02">[[Main Page]]</indicator>
23474 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23475 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23476 <indicator name="05">* foo
23478 <indicator name="06"><nowiki>foo</nowiki></indicator>
23479 <indicator name="07"> Preformatted</indicator>
23480 <indicator name="08"><div>Broken tag</indicator>
23481 <indicator name="09">{| class=wikitable
23484 <indicator name="10">Two
23486 paragraphs</indicator>
23489 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23490 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" />
23491 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>
23492 05=<ul><li> foo</li>
23496 07=<pre>Preformatted
23498 08=<div>Broken tag</div>
23500 09=<table class="wikitable">
23517 preload: check <noinclude> and <includeonly>
23521 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23527 preload: check <onlyinclude>
23531 Goodbye <onlyinclude>Hello world</onlyinclude>
23537 preload: can pass tags through if we want to
23541 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23543 <includeonly>Hello world</includeonly>
23547 preload: check that it doesn't try to do tricks
23551 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23553 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23557 Play a bit with r67090 and T5158
23559 <div style="width:50% !important"> </div>
23560 <div style="width:50% !important"> </div>
23561 <div style="width:50% !important"> </div>
23562 <div style="border : solid;"> </div>
23564 <div style="width:50% !important"> </div>
23565 <div style="width:50% !important"> </div>
23566 <div style="width:50% !important"> </div>
23567 <div style="border : solid;"> </div>
23570 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23571 <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>
23572 <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>
23573 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23578 HTML5 data attributes
23580 <span data-foo="bar">Baz</span>
23581 <p data-abc-def_hij="">Quuz</p>
23583 <p><span data-foo="bar">Baz</span>
23585 <p data-abc-def_hij="">Quuz</p>
23588 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23589 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23593 Strip reserved data attributes
23595 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23597 <div data-ok="fred">d</div>
23600 <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>
23604 percent-encoding and + signs in internal links (T28410)
23606 [[User:+%]] [[Page+title%]]
23607 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
23608 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
23609 [[%33%45]] [[%33%45+]]
23611 <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>
23612 <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>
23613 <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>
23614 <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>
23617 <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>
23618 <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>
23619 <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>
23620 <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>
23624 Special characters in embedded file links (T29679)
23626 [[File:Contains & ampersand.jpg]]
23627 [[File:Does not exist.jpg|Title with & ampersand]]
23629 <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>
23630 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
23633 <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>
23634 <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>
23638 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
23640 Text's been normalized?
23642 <p>Text's been normalized?
23647 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
23649 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
23651 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
23656 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
23658 [http://www.example.org/ ideograms]
23660 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
23665 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
23667 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
23669 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
23693 T33098 Template which includes system messages which includes the template
23697 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23698 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23703 T33490 Turkish: ucfirst 'blah'
23714 T33490 Turkish: ucfirst 'ix'
23725 T33490 Turkish: lcfirst 'BLAH'
23736 T33490 Turkish: ucfırst (with a dotless i)
23742 <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>
23747 T33490 ucfırst (with a dotless i) with English language
23753 <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>
23757 # Note that Parsoid doesn't emit an explicit TOC.
23758 # Note also that the html2wt direction tends to emit an extra newline
23759 # between the __TOC__ magicword and the first heading unless *both*
23760 # the <meta> and the <h2> have a data-parsoid attribute set (even if
23764 T28375: TOC with italics
23766 title=[[Main Page]]
23769 == ''Lost'' episodes ==
23771 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23773 <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>
23777 <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>
23780 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23781 <h2 data-parsoid='{}'> <i>Lost</i> episodes </h2>
23785 T28375: TOC with bold
23787 title=[[Main Page]]
23790 == '''should be bold''' then normal text ==
23792 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23794 <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>
23798 <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>
23801 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23802 <h2 data-parsoid='{}'> <b>should be bold</b> then normal text </h2>
23806 T35845: Headings become cursive in TOC when they contain an image
23808 title=[[Main Page]]
23811 == Image [[Image:foobar.jpg]] ==
23813 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23815 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
23819 <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>
23822 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23823 <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>
23827 T35845 (2): Headings become bold in TOC when they contain a blockquote
23829 title=[[Main Page]]
23832 == <blockquote>Quote</blockquote> ==
23834 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23836 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
23840 <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>
23844 <div id="toc" class="toc">
23845 <div class="toctitle">
23849 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
23853 <h2><span class="mw-headline" id="Quote"></span></h2>
23855 <p><span class="mw-headline" id="Quote">Quote</span></p>
23857 <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>
23859 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23860 <h2 data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
23864 Unclosed tags in TOC
23866 title=[[Main Page]]
23870 <small>Hanc marginis exiguitas non caperet.</small>
23873 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23875 <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>
23879 <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>
23880 <p><small>Hanc marginis exiguitas non caperet.</small>
23884 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23885 <h2 data-parsoid='{}'> Proof: 2 < 3 </h2>
23886 <p><small>Hanc marginis exiguitas non caperet.</small>
23891 Multiple tags in TOC
23894 == <i>Foo</i> <b>Bar</b> ==
23896 == <i>Foo</i> <blockquote>Bar</blockquote> ==
23898 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23900 <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>
23901 <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>
23905 <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>
23906 <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>
23910 <div id="toc" class="toc">
23911 <div class="toctitle">
23915 <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>
23916 <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>
23920 <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>
23921 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
23923 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
23925 <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>
23927 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23928 <h2 data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
23929 <h2> <i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote> </h2>
23932 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
23933 # html5 tag parsing.
23935 Tags with parameters in TOC
23940 == <sup class="in-h2">Hello</sup> ==
23942 == <sup class="a > b">Evilbye</sup> ==
23944 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23946 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
23947 <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>
23951 <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>
23952 <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>
23955 <meta property="mw:PageProp/toc" />
23956 <h2> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
23958 <h2> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
23962 span tags with directionality in TOC
23965 == <span dir="ltr">C++</span> ==
23967 == <span dir="rtl">זבנג!</span> ==
23969 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
23971 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
23973 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
23975 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
23977 <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>
23978 <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>
23979 <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>
23980 <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>
23981 <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>
23985 <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>
23986 <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>
23987 <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>
23988 <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>
23989 <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>
23992 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
23993 <h2 data-parsoid='{}'> <span dir="ltr">C++</span> </h2>
23994 <h2> <span dir="rtl">זבנג!</span> </h2>
23995 <h2> <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> </h2>
23996 <h2> <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> </h2>
23997 <h2> <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> </h2>
24001 T74884: bdi element in ToC
24004 == <bdi>test</bdi> ==
24006 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24008 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24012 <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>
24015 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24016 <h2 data-parsoid='{}'> <bdi>test</bdi> </h2>
24020 T35715: s/strike element in ToC
24023 == <s>test</s> test <strike>test</strike> ==
24025 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24027 <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>
24031 <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>
24034 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24035 <h2 data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
24038 # Note that the html output does not have the <p></p>, but the
24039 # html+tidy output *does*. This is because the empty <p></p> is
24040 # removed by the sanitizer, but only when tidy is *not* enabled (!).
24042 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24047 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
24049 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24053 <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>
24057 <div id="toc" class="toc">
24058 <div class="toctitle">
24062 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24066 <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>
24068 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24069 <h2 data-parsoid='{}'> x </h2>
24075 == {{int:headline_sample}} ==
24079 T34057: Title needed when expanding <h> nodes.
24081 title=[[Main Page]]
24085 <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>
24090 Strip marker in urlencode
24092 {{urlencode:x<nowiki/>y}}
24093 {{urlencode:x<nowiki/>y|wiki}}
24094 {{urlencode:x<nowiki/>y|path}}
24095 {{urlencode:x<pre id="one">two</pre>y}}
24123 Strip marker in formatNum
24125 {{formatnum:1<nowiki/>2}}
24126 {{formatnum:1<nowiki/>2|R}}
24134 Check noCommafy in formatNum
24138 {{formatnum:123456.78}}
24139 {{formatnum:123456.78|NOSEP}}
24147 Wrong option for formatNum (T58199)
24149 {{formatnum:1,234.56|Random}}
24150 {{formatnum:1,234.56|EVERYTHING}}
24151 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24160 Strip marker in grammar
24164 {{grammar:elative|foo<nowiki/>bar}}
24171 Strip marker in padleft
24173 {{padleft:|2|x<nowiki/>y}}
24180 Strip marker in padright
24182 {{padright:|2|x<nowiki/>y}}
24189 Strip marker in anchorencode
24191 {{anchorencode:x<nowiki/>y}}
24198 nowiki inside link inside heading (T20295)
24200 ==[[foo|x<nowiki>y</nowiki>z]]==
24202 <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>
24207 new support for bdi element (T33817)
24209 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24211 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24216 Ignore pipe between table row attributes
24220 |- id=foo | style='color: red'
24228 <tr id="foo" style="color: red">
24235 Language parser function
24244 Padleft and padright as substr
24246 {{padleft:|3|abcde}}
24247 {{padright:|3|abcde}}
24255 Special parser function
24257 {{#special:RandomPage}}
24258 {{#special:BaDtItLe}}
24259 {{#special:Foobar}}
24268 T36939 - Case insensitive link parsing ([HttP://])
24270 [HttP://MediaWiki.Org/]
24272 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24275 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
24279 T36939 - Case insensitive link parsing ([HttP:// title])
24281 [HttP://MediaWiki.Org/ MediaWiki]
24283 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24288 T36939 - Case insensitive link parsing (HttP://)
24290 HttP://MediaWiki.Org/
24292 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24295 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24313 <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>
24314 <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>
24315 <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>
24316 <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>
24317 <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>
24323 ### Parsoid-specific tests
24324 ### Parsoid-PHP parser incompatibilities
24327 1. SOL-sensitive wikitext tokens as template-args
24329 parsoid=wt2html,wt2wt
24335 <span about="#mwt1" typeof="mw:Transclusion">
24336 </span><ul about="#mwt1"><li>a</li>
24338 <span about="#mwt2" typeof="mw:Transclusion">
24339 </span><ol about="#mwt2"><li>a</li>
24341 <span about="#mwt3" typeof="mw:Transclusion">
24342 </span><dl about="#mwt3"><dd>a</dd>
24346 #### -----------------------------------------------------------------
24347 #### Parsoid-specific functionality tests
24348 #### -----------------------------------------------------------------
24350 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24351 # We know wt2wt will fail, but we expect selser to pass.
24352 # Due to the nature of our testing, wt2wt and selser tests will enter the
24353 # blacklist and we'll catch selser regressions based on changes to the
24354 # blacklist entries for selser tests.
24356 1. Bad treebuilder fixup of formatting elt is cleaned up
24358 parsoid=wt2html,wt2wt
24363 [[Image:Foobar.jpg|right|Test]]
24370 <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>
24377 2. Bad treebuilder fixup of formatting elt is cleaned up
24379 parsoid=wt2html,wt2wt
24381 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24383 <small>[[Image:Foobar.jpg|right|300px]]</small>
24387 <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>
24389 <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>
24393 3. Bad treebuilder fixup of formatting elt is cleaned up
24395 parsoid=wt2html,wt2wt
24397 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24399 <p><small><b>foo</b></small></p>
24400 <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>
24401 <p><small><b>bar</b></small></p>
24405 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24407 parsoid=wt2html,wt2wt
24409 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24411 <p><b><small></small></b></p>
24412 <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>
24416 #### ----------------------------------------------------------------
24417 #### Parsoid-only testing of Parsoid's impl of LST
24418 #### Not implemented yet, see
24419 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24420 #### ----------------------------------------------------------------
24422 ## We still need to support serializing the older format while content is stored.
24424 LST Sections: Backwards compatibility
24427 "suppressErrors": true,
24428 "modes": ["html2wt"]
24431 <section begin="2011-05-16" />
24432 <section end="2014-04-10 (MW 1.23wmf22)" />
24434 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24435 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24439 LST Sections: Newfangled approach
24441 <section begin="2011-05-16" />
24442 <section end="2014-04-10 (MW 1.23wmf22)" />
24444 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24446 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24450 #--------- Test stripping of empty nodes in template content ----------
24453 Empty LI and TR nodes should be stripped from template content
24458 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24462 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24475 Empty LI and TR nodes should not be stripped from top-level content
24502 Empty TR nodes should not be stripped if they have any attributes set
24504 {{EmptyTRWithHTMLAttrTest}}
24506 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24507 <tr align="center"></tr>
24508 <tr><td>foo</td></tr>
24509 <tr align="center"></tr>
24510 <tr><td>bar</td></tr>
24514 #### ----------------------------------------------------------------
24515 #### The following section of tests are primarily to test
24516 #### wikitext escaping capabilities of Parsoid. Given that
24517 #### escaping can be done any number of ways, the wikitext (input)
24518 #### is always adjusted to reflect how Parsoid adds nowiki
24521 #### We are marking several tests as parsoid-only since the
24522 #### HTML in the result section is different from what the
24523 #### PHP parser generates for it.
24524 #### ----------------------------------------------------------------
24527 #### --------------- Headings ---------------
24529 #### 1. Nested inside html <h1>=foo=</h1>
24530 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24531 #### 3. Nested inside html with wikitext split by html tags
24532 #### 4. No escape needed
24533 #### 5. Empty headings <h1></h1>
24534 #### 6. Heading chars in SOL context
24535 #### ----------------------------------------
24537 Headings: 0. Unnested
24547 <p>=foo<i>a</i>=</p>
24549 <nowiki>=foo=</nowiki>
24551 <nowiki> </nowiki>=foo=
24553 <nowiki>=foo=</nowiki>
24555 =foo''a''<nowiki>=</nowiki>
24558 # New headings and existing headings are handled differently
24560 Headings: 1. Nested inside html
24568 <h1 data-parsoid=''>=foo=</h1>
24569 <h2 data-parsoid=''>=foo=</h2>
24570 <h3 data-parsoid=''>=foo=</h3>
24571 <h4 data-parsoid=''>=foo=</h4>
24572 <h5 data-parsoid=''>=foo=</h5>
24573 <h6 data-parsoid=''>=foo=</h6>
24581 =<nowiki>=foo=</nowiki>=
24582 ==<nowiki>=foo=</nowiki>==
24583 ===<nowiki>=foo=</nowiki>===
24584 ====<nowiki>=foo=</nowiki>====
24585 =====<nowiki>=foo=</nowiki>=====
24586 ======<nowiki>=foo=</nowiki>======
24591 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
24600 <nowiki>*</nowiki>bar
24606 <nowiki>=bar=</nowiki>
24610 Headings: 3. Nested inside html with wikitext split by html tags
24614 <h1>=<b>bold</b>foo=</h1>
24616 = ='''bold'''foo= =
24620 Headings: 4a. No escaping needed (testing just h1 and h2)
24631 <h1><i>=</i>foo=</h1>
24651 Headings: 4b. No escaping needed (inside p-tags)
24666 Headings: 5. Empty headings
24670 <h1 data-parsoid='{}'></h1>
24672 <h2 data-parsoid='{}'></h2>
24674 <h3 data-parsoid='{}'></h3>
24676 <h4 data-parsoid='{}'></h4>
24678 <h5 data-parsoid='{}'></h5>
24680 <h6 data-parsoid='{}'></h6>
24690 =====<nowiki/>=====
24692 ======<nowiki/>======
24696 Headings: 6a. Heading chars in SOL context (with trailing spaces)
24706 <nowiki>=a=</nowiki>
24708 <nowiki>=a=</nowiki>
24710 <nowiki>=a=</nowiki>
24714 Headings: 6b. Heading chars in SOL context (with trailing newlines)
24727 <nowiki>=a=</nowiki>
24730 <nowiki>=a=</nowiki>
24733 <nowiki>=a=</nowiki>
24738 Headings: 6c. Heading chars in SOL context (leading newline break)
24746 <nowiki>=b=</nowiki>
24750 Headings: 6d. Heading chars in SOL context (with interspersed comments)
24754 <!--c0--><p>=a=</p>
24756 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
24758 <!--c0--><nowiki>=a=</nowiki>
24760 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
24764 Headings: 6d. Heading chars in SOL context (No escaping needed)
24774 Headings: 7. Insert a newline between new content and headings
24780 <h2 data-parsoid='{}'>A</h2>
24781 <p data-parsoid='{}'>a</p>
24791 #### --------------- Lists ---------------
24792 #### 0. Outside nests (*foo, etc.)
24793 #### 1. Nested inside html <ul><li>*foo</li></ul>
24794 #### 2. Inside definition lists
24795 #### 3. Only bullets at start should be escaped
24796 #### 4. No escapes needed
24797 #### 5. No unnecessary escapes
24798 #### 6. Escape bullets in SOL position
24799 #### 7. Escape bullets in a multi-line context
24800 #### ----------------------------------------
24803 Lists: 0. Outside nests
24813 <nowiki>*</nowiki>foo
24815 <nowiki>#</nowiki>foo
24817 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
24820 ## Making these next 3 tests Parsoid-only since they are html2wt tests
24821 ## to test wikitext escaping, and insignificant whitespace diffs
24822 ## cause PHP parser tests to barf
24824 Lists: 1. Nested inside html (No unnecessary escapes)
24833 <li data-parsoid='{}'>*foo</li>
24834 <li data-parsoid='{}'>#foo</li>
24835 <li data-parsoid='{}'>:foo</li>
24836 <li data-parsoid='{}'>;foo</li>
24844 <li data-parsoid='{}'>*foo</li>
24845 <li data-parsoid='{}'>#foo</li>
24846 <li data-parsoid='{}'>:foo</li>
24847 <li data-parsoid='{}'>;foo</li>
24854 *<nowiki>*foo</nowiki>
24855 *<nowiki>#foo</nowiki>
24856 *<nowiki>:foo</nowiki>
24857 *<nowiki>;foo</nowiki>
24863 #<nowiki>*foo</nowiki>
24864 #<nowiki>#foo</nowiki>
24865 #<nowiki>:foo</nowiki>
24866 #<nowiki>;foo</nowiki>
24870 Lists: 2. Inside definition lists
24874 <dl><dt>;foo</dt></dl>
24875 <dl><dt>:foo</dt></dl>
24878 <dl><dd>:foo</dd></dl>
24882 ; <nowiki>:foo</nowiki>
24884 ; <nowiki>:foo</nowiki>
24891 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
24897 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
24901 *<nowiki>*foo</nowiki>''it''*bar
24905 Lists: 4. No escapes needed
24918 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
24922 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
24936 Lists: 5. No unnecessary escapes
24940 <ul><li> bar <span>[[foo]]</span></li></ul>
24941 <ul><li> =bar <span>[[foo]]</span></li></ul>
24942 <ul><li> [[bar <span>[[foo]]</span></li></ul>
24943 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
24944 <ul><li> =bar <span>foo]]</span>=</li></ul>
24945 <ul><li> <s></s>: a</li></ul>
24946 <ul><li> <i>* foo</i></li></ul>
24949 * bar <span><nowiki>[[foo]]</nowiki></span>
24951 * =bar <span><nowiki>[[foo]]</nowiki></span>
24953 * [[bar <span><nowiki>[[foo]]</nowiki></span>
24955 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
24957 * =bar <span>foo]]</span>=
24965 Lists: 6. Escape bullets in SOL position
24969 <p><!--cmt-->*foo</p>
24971 <!--cmt--><nowiki>*</nowiki>foo
24975 Lists: 7. Escape bullets in a multi-line context
24984 <nowiki>*</nowiki>b
24988 Lists: 8. Escape colons only if not present in tags
24992 <dl><dt>a:b<i>c:d</i></dt></dl>
24994 ; <nowiki>a:b</nowiki>''c:d''
24997 #### --------------- HRs ---------------
24998 #### 1. Single line
24999 #### -----------------------------------
25002 HRs: 1. Single line
25010 ----<nowiki>----</nowiki>
25015 #### --------------- Tables ---------------
25016 #### 1a. Simple example
25017 #### 1b. No escaping needed (!foo)
25018 #### 1c. No escaping needed (|foo)
25019 #### 1d. No escaping needed (|}foo)
25021 #### 2a. Nested in td (<td>foo|bar</td>)
25022 #### 2b. Nested in td (<td>foo||bar</td>)
25023 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25025 #### 3a. Nested in th (<th>foo!bar</th>)
25026 #### 3b. Nested in th (<th>foo!!bar</th>)
25027 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25031 #### 4c. No escaping needed
25032 #### --------------------------------------
25035 Tables: 1a. Simple example
25043 <nowiki>{|</nowiki>
25048 Tables: 1b. No escaping needed
25059 Tables: 1c. No escaping needed
25070 Tables: 1d. No escaping needed
25081 Tables: 2a. Nested in td
25086 <td>foo|bar</td></tr>
25087 <tr><td>x<div>a|b</div></td>
25091 |<nowiki>foo|bar</nowiki>
25093 |x<div><nowiki>a|b</nowiki></div>
25109 Tables: 2b. Nested in td
25115 <td>a<i>b||c</i></td>
25116 <td>a<i><div>b||c</div></i></td>
25117 </tr></tbody></table>
25120 |<nowiki>foo||bar</nowiki>
25121 |a''<nowiki>b||c</nowiki>''
25122 |a''<div><nowiki>b||c</nowiki></div>''
25131 <td>a<i><div>b||c</div></i>
25137 Tables: 2c. Nested in td -- no escaping needed
25153 Tables: 3a. Nested in th
25169 Tables: 3b. Nested in th
25174 <tr><th>foo!!bar</th>
25175 <th><i>foo|bar</i></th>
25176 <th><i>foo!!bar</i></th>
25177 <th><i><span>foo!!bar</span></i></th>
25178 </tr></tbody></table>
25181 !<nowiki>foo!!bar</nowiki>
25182 !''<nowiki>foo|bar</nowiki>''
25183 !''<nowiki>foo!!bar</nowiki>''
25184 !''<span><nowiki>foo!!bar</nowiki></span>''
25193 <th><i>foo!!bar</i>
25195 <th><i><span>foo!!bar</span></i>
25201 Tables: 3c. Nested in th
25206 <tr><th>foo||bar</th>
25207 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25208 </tr></tbody></table>
25211 !<nowiki>foo||bar</nowiki>
25212 !<nowiki>foo||bar</nowiki>
25225 Tables: 4a. Escape -
25241 |<nowiki>-bar</nowiki>
25246 Tables: 4b. Escape +
25262 |<nowiki>+bar</nowiki>
25267 Tables: 4c. No escaping needed
25272 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25273 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25279 <div>a|b</div></td>
25324 Tables: 4d. No escaping needed
25329 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25330 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25331 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25342 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25352 T97430: Don't emit empty nowiki pairs around marker meta tags
25356 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25357 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25359 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25360 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25364 Unclosed xmlish element in table line shouldn't eat end delimiters
25369 <tbody><tr><td> <foo</td>
25370 <td> bar></td></tr>
25387 #### --------------- Links ----------------
25388 #### 1. Quote marks in link text
25389 #### 2. Wikilinks: Escapes needed
25390 #### 3. Wikilinks: No escapes needed
25391 #### 4. Extlinks: Escapes needed
25392 #### 5. Extlinks: No escapes needed
25393 #### --------------------------------------
25395 Links 1. WikiLinks: No escapes needed
25399 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25400 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25401 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25405 [[Foo|x [Foobar] x]]
25407 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25408 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25409 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25414 Links 2. WikiLinks: Escapes needed
25418 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25419 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25420 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25421 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25422 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25423 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25424 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25425 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25426 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25427 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25429 [[Foo|<nowiki>Foobar]</nowiki>]]
25430 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25431 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25432 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25433 [[Foo|<nowiki>|Bar</nowiki>]]
25434 [[Foo|<nowiki>]]bar</nowiki>]]
25435 [[Foo|<nowiki>[[bar</nowiki>]]
25436 [[Foo|<nowiki>x [[ y</nowiki>]]
25437 [[Foo|<nowiki>x ]] y</nowiki>]]
25438 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25440 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25441 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25442 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25443 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25444 <a href="/wiki/Foo" title="Foo">|Bar</a>
25445 <a href="/wiki/Foo" title="Foo">]]bar</a>
25446 <a href="/wiki/Foo" title="Foo">[[bar</a>
25447 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25448 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25449 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25454 Links 3. WikiLinks: No escapes needed
25458 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25459 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25464 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25465 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25470 Links 4. ExtLinks: Escapes needed
25474 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25475 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25476 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25477 <p>[http://google.com]</p>
25478 <p>[http://google.com google]</p>
25479 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25480 <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>
25482 [http://google.com <nowiki>[google]</nowiki>]
25483 [http://google.com <nowiki>google]</nowiki>]
25484 [http://google.com <nowiki>goog] le</nowiki>]
25486 <nowiki>[http://google.com]</nowiki>
25488 <nowiki>[http://google.com google]</nowiki>
25490 [http://google.com<nowiki>]</nowiki>
25492 [{{echo|http://google.com}}<nowiki>]</nowiki>
25494 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25495 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25496 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25497 </p><p>[http://google.com]
25498 </p><p>[http://google.com google]
25499 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25500 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25505 Links 5. ExtLinks: No escapes needed
25509 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25510 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25512 [http://google.com [google]
25514 [[http://google.com]]
25516 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25517 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25522 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25526 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25527 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
25528 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
25529 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
25530 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
25531 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
25532 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25533 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
25534 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25535 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
25536 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
25537 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
25538 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
25541 x<nowiki/>http://example.com<nowiki/>y
25542 http://example.com<nowiki/>?x
25543 http://example.com<nowiki/>&x
25544 http://example.com<nowiki/>'x
25545 http://example.com<nowiki/>,x
25546 http://example.com<nowiki/>.x
25547 http://example.com<nowiki/>;x
25548 http://example.com<nowiki/>:x
25549 http://example.com<nowiki/>;x
25550 http://example.com<nowiki/>!x
25551 http://example.com<nowiki/>=x
25552 http://example.com<nowiki/>(x)
25553 http://example.com(x<nowiki/>)
25557 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25562 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
25564 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
25565 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
25566 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
25567 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
25568 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
25574 "http://example.com"
25575 (http://example.com)
25576 (http://example.com) foo
25577 http://example.com,
25578 http://example.com, foo
25581 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
25583 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
25584 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
25585 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
25586 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
25587 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
25592 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25596 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
25597 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
25599 http://example.com.,;:!?\
25600 -http://example.com:
25602 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
25603 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
25608 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
25612 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
25613 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
25614 X<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
25618 X<nowiki/>RFC 123<nowiki/>y
25622 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
25626 <p><a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
25627 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
25628 -<a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
25635 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>?foo
25636 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>&foo
25637 -<a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc123">RFC 123</a>-
25642 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
25646 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
25647 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25648 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25652 X<nowiki/>PMID 123<nowiki/>y
25656 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
25660 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
25661 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
25662 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
25669 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
25670 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
25671 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
25676 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
25680 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
25681 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
25682 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
25685 ISBN 1234567890<nowiki/>1
25686 ISBN 1234567890<nowiki/>x
25687 a<nowiki/>ISBN 1234567890<nowiki/>b
25691 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
25695 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
25699 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
25704 Links 14. Protect link-like plain text. (Parsoid bug T78425)
25708 <p>this is not a link: http://example.com
25711 this is not a link: <nowiki>http://example.com</nowiki>
25715 Links 15. Link trails can't become link prefixes.
25720 <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>
25722 [[Söfnuður]]-[[00]]
25724 <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>
25728 #### --------------- Quotes ---------------
25729 #### 1. Quotes inside <b> and <i>
25730 #### 2. Link fragments separated by <i> and <b> tags
25731 #### 3. Link fragments inside <i> and <b>
25732 #### 4. No escaping needed
25733 #### --------------------------------------
25735 1a. Quotes inside <b> and <i>
25746 <b>foo'<i>bar'</i>baz</b>
25755 <i>fools'<span> errand</span></i>
25756 <i><span>fool</span>'s errand</i>
25757 '<i>foo</i> bar '<i>baz</i>
25758 a|!*#-:;+-~[]{}b'<i>x</i>
25762 ''<nowiki>''foo''</nowiki>''
25763 ''<nowiki>'''foo'''</nowiki>''
25765 '''<nowiki/>'foo''''
25766 '''<nowiki>''foo''</nowiki>'''
25767 '''<nowiki>'''foo'''</nowiki>'''
25768 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
25769 '''foo'''<nowiki/>'s
25775 '''foo'''<nowiki/>'
25776 ''''foo'''<nowiki/>'
25777 ''fools'<span> errand</span>''
25778 ''<span>fool</span>'s errand''
25779 '<nowiki/>''foo'' bar '''baz''
25780 a|!*#-:;+-~[]{}b'''x''
25784 1b. Quotes inside <b> and <i> with other tags on same line
25788 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
25789 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
25790 <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>
25791 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
25792 '<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>
25793 '<i>foo</i> <div title="name">test</div>
25794 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
25795 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
25796 <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>
25799 '''a'' foo ''[[bar]]''
25800 ''a''' foo ''[[bar]]''
25801 ''a''' foo '''{{echo|[[bar]]}}'''
25802 [[foo]] x'''[[bar]]''
25803 '''foo'' <ref>test</ref>
25804 '''foo'' <div title="name">test</div>
25805 '''foo'' and <br> bar
25810 2. Link fragments separated by <i> and <b> tags
25814 <p>[[<i>foo</i>hello]]</p>
25815 <p>[[<b>foo</b>hello]]</p>
25817 [[''foo''<nowiki>hello]]</nowiki>
25819 [['''foo'''<nowiki>hello]]</nowiki>
25822 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
25823 # this is one of the shortcomings of this format
25825 3. Link fragments inside <i> and <b>
25829 <p><i>[[foo</i>]]</p>
25830 <p><b>[[foo</b>]]</p>
25832 ''[[foo''<nowiki>]]</nowiki>
25834 '''[[foo'''<nowiki>]]</nowiki>
25838 4. No escaping needed
25842 <p>'<span><i>bar</i></span>'
25843 '<span><b>bar</b></span>'
25847 '<span>''bar''</span>'
25848 '<span>'''bar'''</span>'
25852 #### ----------- Paragraphs ---------------
25853 #### 1. No unnecessary escapes
25854 #### --------------------------------------
25857 1. No unnecessary escapes
25861 <p>bar <span>[[foo]]</span>
25862 </p><p>=bar <span>[[foo]]</span>
25863 </p><p>[[bar <span>[[foo]]</span>
25864 </p><p>]]bar <span>[[foo]]</span>
25865 </p><p>=bar <span>foo]]</span>=
25868 bar <span><nowiki>[[foo]]</nowiki></span>
25870 =bar <span><nowiki>[[foo]]</nowiki></span>
25872 [[bar <span><nowiki>[[foo]]</nowiki></span>
25874 ]]bar <span><nowiki>[[foo]]</nowiki></span>
25876 =bar <span>foo]]</span><nowiki>=</nowiki>
25879 #### ----------------------- PRE --------------------------
25880 #### 1. Leading whitespace in SOL context should be escaped
25881 #### ------------------------------------------------------
25883 1. Leading whitespace in SOL context should be escaped
25906 <nowiki> </nowiki>a
25908 <nowiki> </nowiki> a
25912 <nowiki> </nowiki> a
25914 <nowiki> </nowiki>a
25917 <nowiki> </nowiki>b
25940 2. Leading whitespace in non-indent-pre contexts should not be escaped
25944 <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>
25945 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
25946 <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>
25956 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
25975 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
25979 <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>
25981 [[File:Foobar.jpg|thumb|caption]]
25985 5. Nowiki escaping should account for indent-pres
25995 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26008 #### --------------- Behavior Switches --------------------
26011 1. Valid behavior switches should be escaped
26018 <nowiki>__TOC__</nowiki>
26019 ''<nowiki>__TOC__</nowiki>''
26023 2. Invalid behavior switches should not be escaped
26034 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26036 Behavior switches should be SOL-transparent
26040 <meta property="mw:PageProp/toc" />
26042 <!-- this one's bogus -->
26045 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26047 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26051 <!-- this one's bogus -->
26060 #### --------------- HTML tags ---------------
26063 #### 3. multi-line html tag
26064 #### 4. extension tags
26065 #### -----------------------------------------
26071 <a href="http://google.com">google</a>
26073 <a href="http://google.com">google</a>
26081 <ul><li> <div>foo</div></li>
26082 <li> <div style="color:red">foo</div></li>
26083 <li> <td></li></ul>
26086 * <nowiki><div>foo</div></nowiki>
26087 * <nowiki><div style="color:red">foo</div></nowiki>
26088 * <nowiki><td></nowiki>
26092 3. multi-line html tag
26111 <p><ref>foo</ref>
26112 </p><p><ref>bar
26113 </p><p>baz</ref>
26116 <nowiki><ref>foo</ref></nowiki>
26118 <nowiki><ref>bar</nowiki>
26120 baz<nowiki></ref></nowiki>
26123 #### --------------- Others ---------------
26129 <p><nowiki>foo</nowiki>
26132 <nowiki>foo</nowiki>
26135 ## The quote-char in the input is necessary for triggering the bug
26137 (T54035) Nowiki-escaping should not get tripped by " :" in text
26146 #----------- End of wikitext escaping tests --------------
26150 Tag-like HTML structures are passed through as text
26172 </p><p>1<d e>f
26177 HTML tag with necessary entities in attributes
26179 <span title="&amp;">foo</span>
26181 <p><span title="&amp;">foo</span>
26186 HTML tag with 'unnecessary' entity encoding in attributes
26188 <span title="&">foo</span>
26190 <p><span title="&">foo</span>
26195 HTML tag with broken attribute value quoting
26197 parsoid=wt2html,html2html
26199 <span title="Hello world>Foo</span>
26201 <p><span title="Hello world">Foo</span>
26204 <p><span title="Hello world">Foo</span></p>
26208 Self-closed tag with broken attribute value quoting
26210 parsoid=wt2html,html2html
26212 <div title="Hello world />Foo
26214 <div title="Hello world"></div>
26217 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26221 Table with broken attribute value quoting
26223 parsoid=wt2html,html2html
26226 | title="Hello world|Foo
26231 <td title="Hello world">Foo
26237 <td title="Hello world">Foo
26243 Table with broken attribute value quoting on consecutive lines
26245 parsoid=wt2html,html2html
26248 | title="Hello world|Foo
26249 | style="color:red|Bar
26254 <td title="Hello world">Foo
26256 <td style="color:red">Bar
26262 <td title="Hello world">Foo
26263 </td><td style="color: red">Bar
26264 </td></tr></tbody></table>
26269 Accept empty td cell attribute
26272 | align="center" | foo || |
26277 <td align="center"> foo </td>
26284 Non-empty attributes in th-cells
26287 ! Foo !! style="color: red" | Bar
26293 <th style="color: red"> Bar
26299 Accept empty attributes in th-cells
26314 Empty table rows go away
26335 ### Parsoid-centric tests for testing RTing of inter-element separators
26336 ### Edge cases not tested by existing parser tests and specific to
26337 ### Parsoid-specific serialization strategies.
26341 RT-ed inter-element separators should be valid separators
26353 <tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26357 # Parsoid-only since PHP parser relies on Tidy for correct output
26359 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26373 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26374 <p>bar</p></small></td></tr>
26378 <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>
26382 # Note that the "style" attribute is really a template parameter here.
26383 # The = would have to be {{=}} if you wanted the literal.
26385 Empty TD followed by TD with tpl-generated attribute
26390 |{{echo|style='color:red'}}|foo
26404 Indented table with an empty td
26422 ## We have some newline diffs RT-ing this edge case
26423 ## and it is not important enough -- we seem to be emitting
26424 ## at most 2 newlines after a </tr> and this is unrelated to
26425 ## the issue from T85627 that this is testing.
26427 Indented table with blank lines in between (T85627)
26446 Indented block & table
26460 <div data-parsoid='{"stx":"html"}'>foo</div>
26462 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26467 Indent and comment before table row
26482 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26483 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26487 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26489 Empty TR followed by a template-generated TR
26495 {{echo|<tr><td>foo</td></tr>}}
26501 <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}}]}'>
26506 ## PHP and parsoid output differ for this, and since this is primarily
26507 ## for testing Parsoid's serializer, marking this Parsoid only
26509 Empty TR followed by mixed-ws-comment line should RT correctly
26525 <!--c--> </tr><!--d-->
26531 Multi-line image caption generated by templates with/without trailing newlines
26533 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
26534 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
26536 <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>
26537 <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>
26541 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
26545 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
26547 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
26549 <includeonly>foo</includeonly>
26557 ## PHP emits broken html for this, and since this is primarily
26558 ## a Parsoid serializer test, marking this Parsoid only
26560 Improperly nested inline or quotes tags with whitespace in between
26562 <span> <s>x</span> </s>
26565 <p><span> <s>x</s></span><s> </s>
26566 <b> <i>x</i></b><i> </i>
26571 Encapsulate protected attributes from wt
26573 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
26575 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
26579 <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>
26581 <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">
26582 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
26586 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
26587 ## Having nested or stray pre tags results in the attempt to add duplicates,
26588 ## causing an assertion fail. This test tries to prevent that situation.
26590 Ensure ParagraphWrapper can deal with stray closing pre tags
26600 1. Ensure fostered text content is wrapped in element nodes
26604 <table>hi</table><table>ho</table>
26613 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
26615 parsoid=wt2html,wt2wt
26624 <tbody><tr><td> a</td></tr>
26629 Encapsulation properly handles null DSR information from foster box
26631 parsoid=wt2html,wt2wt
26633 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
26635 <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>
26639 1. Encapsulate foster-parented transclusion content
26641 parsoid=wt2wt,wt2html
26643 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
26645 <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>
26655 2. Encapsulate foster-parented transclusion content
26657 parsoid=wt2wt,wt2html
26659 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
26661 <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>
26672 3. Encapsulate foster-parented transclusion content
26674 parsoid=wt2wt,wt2html
26676 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
26678 <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>"]}">
26691 4. Encapsulate foster-parented transclusion content
26693 parsoid=wt2wt,wt2html
26695 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
26697 <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>"]}">
26710 5. Encapsulate foster-parented transclusion content
26712 parsoid=wt2wt,wt2html
26714 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
26716 <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>
26731 6. Encapsulate foster-parented transclusion content
26733 parsoid=wt2wt,wt2html
26735 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
26737 <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>
26753 7. Encapsulate foster-parented transclusion content
26755 parsoid=wt2wt,wt2html
26757 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
26759 <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>
26769 # Note that the wt is broken on purpose: the = should be {{=}} if you
26770 # don't want it to be a template parameter key.
26772 8. Encapsulate foster-parented transclusion content
26774 parsoid=wt2wt,wt2html
26777 }}{|{{echo|style='color:red'}}
26782 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
26784 <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>
26795 9. Encapsulate foster-parented transclusion content
26797 parsoid=wt2wt,wt2html
26799 <table>{{echo|hi</table>hello}}
26801 <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>
26805 Table in fosterable position
26816 <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">
26818 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
26824 # Parsoid only for T66747
26826 Properly encapsulate empty-content transclusions in fosterable positions
26834 <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"}]]}'>
26840 Always encapsulate foster box when template range is expanded to table
26853 T115289: Unclosed table
26855 {{echo|<table>}}<!--c-->[[Category:Two]]
26857 <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>
26861 T115289: Don't migrate newlines out of tables with fostered content
26863 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
26865 <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>
26869 T73074: More fostering fun
26871 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
26873 <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>
26877 Support <object> element with .data attribute
26881 <object data="test.swf"></object>
26883 <object data="test.swf"></object>
26887 Don't block XML namespace declaration
26889 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
26891 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
26894 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
26897 # -----------------------------------------------------------------
26898 # The following section of tests are primarily to spec requirements
26899 # around Parsoid's serialization (old, new, edited content)
26901 # All these tests are marked Parsoid html2wt and html2html only
26902 # ----------------------------------------------------------------
26905 Ignore rel attribute in a-tags during serialization to url-links
26909 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
26910 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
26911 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
26913 http://en.wikipedia.org/wiki/Foobar
26914 http://en.wikipedia.org/wiki/Foobar
26915 http://en.wikipedia.org/wiki/Foobar
26918 # 'mi' is a localinterwiki prefix as well as a language
26920 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
26924 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
26930 Parsoid should accept interwiki shortcuts
26934 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
26935 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
26936 <a href='./fr:Foo'>Foo</a></p>
26937 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
26938 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
26939 <a href='fr%3AFoo'>Foo</a></p>
26940 <p><a href='FR%3AFoo'>Foo</a>
26941 <a href='./FR:Foo'>Foo</a></p>
26956 Parsoid should not accept invalid interwiki shortcuts
26960 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
26961 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
26962 <a href='news:Foo'>Foo</a></p>
26971 New wikilinks should be serialized properly
26975 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
26976 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
26977 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
26978 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
26979 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
26983 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
26984 http://en.wikipedia.org/wiki/Foo
26985 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
26989 New wiki links (href variations)
26993 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
26994 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
26995 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
26996 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27001 [[Toxine bactérienne]]
27005 New wiki links (content string variations)
27009 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27010 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27011 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27015 [[Foo_bar|./Foo_bar]]
27019 New category links (href variations)
27023 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27024 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27025 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27027 [[Category:Toxine bactérienne]]
27028 [[Category:Toxine bactérienne]]
27029 [[Category:Toxine bactérienne]]
27033 New sol transparent links don't need indent-pre nowiki protection
27038 <link rel="mw:PageProp/redirect" href="./Main_Page">
27039 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27040 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27042 #WEITERLEITUNG [[Main Page]]
27043 <!-- this is good --> [[Category:Good]]
27044 <!-- this is great --> [[Kategorie:Great]]
27048 New interlanguage links (href variations)
27052 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27053 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27054 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27056 [[es:Toxine bactérienne]]
27057 [[es:Toxine_bactérienne]]
27058 [[es:Toxine_bactérienne]]
27062 Image: Modifying size of an image (1)
27065 "modes": ["wt2wt"],
27067 ["img[height]", "attr", "height", "22"],
27068 ["img[width]", "attr", "width", "200"]
27072 [[Image:Foobar.jpg|230x230px]]
27074 [[Image:Foobar.jpg|200x200px]]
27078 Image: Modifying size of an image (2)
27081 "modes": ["wt2wt"],
27083 ["img[height]", "attr", "height", "100"],
27084 ["img[width]", "attr", "width", "500"]
27088 [[Image:Foobar.jpg|230x230px]]
27090 [[Image:Foobar.jpg|500x500px]]
27093 # Change in size is ignored so long as class='mw-default-size'
27095 Image: Modifying size of an image (3)
27098 "modes": ["wt2wt"],
27100 ["figure[class]", "removeClass", "mw-default-size"],
27101 ["figure img", "attr", "height", "19"],
27102 ["figure img", "attr", "width", "170"]
27106 [[Image:Foobar.jpg|thumb]]
27108 [[Image:Foobar.jpg|thumb|170x170px]]
27112 Image: Modifying alignment of an image (T50665)
27115 "modes": ["wt2wt"],
27117 ["figure[class]", "removeClass", "mw-halign-right"],
27118 ["figure[class]", "addClass", "mw-halign-left"]
27122 [[Image:Foobar.jpg|thumb|caption|right]]
27124 [[Image:Foobar.jpg|thumb|caption|left]]
27128 Image: Modifying mw-default-size of an frameless image (T64805)
27131 "modes": ["wt2wt"],
27133 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27137 [[Image:Foobar.jpg|frameless|right]]
27139 [[Image:Foobar.jpg|frameless|right|220x220px]]
27143 Image: Modifying valign of an image (T51221)
27146 "modes": ["wt2wt"],
27148 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27149 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27153 [[File:Foobar.jpg|20px|middle]]
27155 [[File:Foobar.jpg|20px|text-top]]
27159 Image: Modifying alt attribute of an image (T58400)
27162 "modes": ["wt2wt"],
27164 ["img[alt]", "attr", "alt", "some alternate edited text"]
27168 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27170 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27174 Image: Modifying caption of an image
27177 "modes": ["wt2wt"],
27179 ["figcaption", "text", "new caption"]
27183 [[Image:Foobar.jpg|thumb|original caption]]
27185 [[Image:Foobar.jpg|thumb|new caption]]
27189 Image: empty alt attribute (T50924)
27193 [[File:Foobar.jpg|thumb|alt=|bar]]
27195 <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>
27199 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27205 <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>
27207 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27211 Image: Block level image should have \n before and after
27214 [[File:Foobar.jpg|right|thumb|150x150px]]
27218 <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>
27223 Image: New block level image should have \n before and after (existing content)
27226 [[File:Foobar.jpg|right|thumb|150x150px]]
27230 <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>
27235 Image: upright option (parsoid)
27237 [[File:Foobar.jpg|thumb|upright|caption]]
27238 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27239 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27241 <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>
27242 <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>
27243 <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>
27247 Image: upright option is ignored on inline and frame images (parsoid)
27249 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27251 <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>
27255 Image: in template parameter with empty parameter
27257 {{echo|[[File:Foobar.jpg|link=]]}}
27259 <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>
27263 Image: from basic HTML (1)
27267 <span typeof="mw:Image">
27268 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27271 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27275 Image: from basic HTML (2)
27279 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27281 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27285 Image: from basic HTML (3)
27289 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27291 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27295 Image: from basic HTML (4)
27299 <img src="./File:Foobar.jpg">
27301 [[File:Foobar.jpg|link=]]
27305 Image: Invalid title as link
27307 [[File:Foobar.jpg|link=<]]
27309 <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>
27312 <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>
27316 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27321 <li><p>foo</p></li>
27328 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27332 <ul> <li>foo</li></ul>
27338 Don't strip leading whitespace when handling indent-pre suppressing tags
27343 <tr><td> indented row</td></tr>
27346 <b>This is very bold of you!</b>
27349 indented cell (no pre-wrapping!)
27359 '''This is very bold of you!'''
27363 indented cell (no pre-wrapping!)
27371 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27393 <nowiki> </nowiki></span>bar2
27396 <nowiki> </nowiki><span>bar</span>
27399 <nowiki> </nowiki><span>foo</span>
27404 Lists: Dont insert newlines in a serialized list item.
27408 <ul><li>a<br>b</li><li>c</li></ul>
27415 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27418 "modes": ["html2wt"],
27419 "scrubWikitext": false
27422 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27423 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27425 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27426 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27428 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27430 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27432 == hello there [[Category:A1]] ==
27434 == [[Category:A2]] hi pal ==
27436 == <!--foo--> [[Category:A3]] how goes it ==
27438 == it goes well [[Category:A4]] <!--bar--> ==
27440 ==howdy [[Category:A5]]==
27446 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27449 "modes": ["html2wt"],
27450 "scrubWikitext": true
27453 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27454 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27456 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27457 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27459 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27467 <!--foo--> [[Category:A3]]
27472 [[Category:A4]] <!--bar-->
27480 Headings: Don't hoist metas that come from templates
27483 "modes": ["html2wt"],
27484 "scrubWikitext": true
27487 <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>
27489 == {{echo|foo [[Category:Foo]]}} ==
27493 Headings: Category in ref isn't hoisted
27496 "modes": ["html2wt"],
27497 "scrubWikitext": true
27500 <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>
27502 <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>
27505 [[Category:Baz]] </ref> ==
27511 Parsoid: Serialize positional parameters with = in them as named parameter
27515 <p about="#mwt1" typeof="mw:Transclusion"
27516 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27518 <p about="#mwt1" typeof="mw:Transclusion"
27519 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27521 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27522 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27523 <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>
27527 {{echo|1=f=oo|2=bar}}
27529 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27530 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27531 {{echo|<nowiki>f=oo</nowiki>|bar}}
27535 Parsoid: Serialize positional parameters with = in extlink as named parameter
27539 <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>
27541 {{echo|1=http://stuff?is=ok}}
27545 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
27549 <div>a<p>b</p></div>
27570 Substrings resembling wikitext in hrefs should not get nowiki escapes
27574 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
27580 Enforce single-line context in the serializer
27587 <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">
27588 </span><span about="#mwt1">you</span> </h2>
27590 <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>
27592 <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
27593 there</span></li></ol>
27605 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
27612 </tbody></table></dd></dl>
27616 == hi {{bogus|there
27627 * foo '''bar''' baz
27639 Serialize new placeholder space without spans
27643 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
27645 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
27647 <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>
27653 <ref>foo : bar</ref>ok
27657 #-----------------------
27658 # Tag minimization tests
27659 #-----------------------
27662 1. I/B quote minimization: wikitext-only tags should be combined
27666 <p><i>A</i><i>B</i></p>
27667 <p><b>A</b><b>B</b></p>
27668 <p><i>A</i><b><i>B</i></b></p>
27669 <p><b>A</b><i><b>B</b></i></p>
27670 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
27671 <p><i><b>A</b></i><i><b>B</b></i></p>
27672 <p><i><b>A</b></i><b><i>B</i></b></p>
27673 <p><b><i>A</i></b><i><b>B</b></i></p>
27693 2. I/B quote minimization: wikitext and html tags should not be combined
27697 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
27698 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
27702 ''A''<nowiki/>'''<i>B</i>'''
27706 3. I/B quote minimization: templated content stops minimization
27710 <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>
27711 <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>
27713 ''A''{{echo|''B''}}
27715 ''A''{{echo|'''''B'''''}}
27719 4. I/B quote minimization: new content should be mimimized with adjacent old content
27723 <p><i>A</i><i>B</i></p>
27724 <p><b>A</b><b>B</b></p>
27725 <p><i>A</i><b><i>B</i></b></p>
27735 5a. Merge adjacent quote nodes if they've been edited
27738 "modes": ["wt2wt", "selser"],
27740 ["p", "contents", "remove", ":contains('b')"]
27750 5b. Merge adjacent quote nodes if they've been edited
27753 "modes": ["wt2wt", "selser"],
27759 ''a''<span id="x">b</span>''c''
27765 1. Merge adjacent link nodes as long as at least one element is new
27768 "modes": ["html2wt"],
27769 "scrubWikitext": true
27772 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
27773 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
27774 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
27778 [[Football|Foot]][[Football|ball]]
27782 2. Merge adjacent link nodes and enable additional normalizations
27785 "modes": ["html2wt"],
27786 "scrubWikitext": true
27789 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
27791 [[Football|''Football'']]
27795 3. Don't merge adjacent link nodes if scrubWikitext is false
27798 "modes": ["html2wt"],
27799 "scrubWikitext": false
27802 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
27804 [[Football|Foot]][[Football|ball]]
27807 #------------------------------
27808 # End of tag minimization tests
27809 #------------------------------
27812 T56262: New entities
27816 <span typeof="mw:Entity"> </span>
27821 ## Note that there is no wikitext output for 'unknownproperty' ##
27822 ## Unknown magic words are silently dropped ##
27829 <meta property='mw:PageProp/toc' />
27830 <meta property='mw:PageProp/notoc' />
27831 <meta property='mw:PageProp/forcetoc' />
27832 <meta property='mw:PageProp/index' />
27833 <meta property='mw:PageProp/noindex' />
27834 <meta property='mw:PageProp/nogallery' />
27835 <meta property='mw:PageProp/noeditsection' />
27836 <meta property='mw:PageProp/notitleconvert' />
27837 <meta property='mw:PageProp/nocontentconvert' />
27838 <meta property='mw:PageProp/unknownproperty' />
27848 __NOCONTENTCONVERT__
27852 Consecutive <pre>s should not get merged
27854 parsoid=html2wt,html2html
27856 <pre>a</pre><pre>b</pre>
27884 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
27888 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
27890 [[Special:BookSources/1234567890|ISBN 1234567895]]
27894 Edited RFC links not serializable as RFC links should serialize as extlinks
27898 <a href="//tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
27900 [//tools.ietf.org/html/rfc123 New RFC]
27904 Edited PMID links not serializable as PMID links should serialize as extlinks
27908 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
27910 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
27914 WTS of autolinks with trailing/surrounding context
27918 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
27919 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
27920 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
27921 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
27922 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
27923 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
27925 http://cscott.net'''foo'''
27927 http://cscott.net<b>foo</b>
27929 '''http://cscott.net'''
27931 '''http://cscott.net '''
27933 '''http://cscott.net<nowiki/>x'''
27935 http://cscott.net<nowiki/>x
27939 WTS of autolinks with nowikis (round-trip)
27941 x<nowiki/>http://cscott.net<nowiki/>x
27943 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
27946 # this is the "easy" test because it leaves in place all the
27947 # data-parsoid information indicating this is an autolink
27949 WTS of autolinks with escapes (editing)
27952 "modes": ["wt2wt"],
27954 [ "span", "remove" ]
27958 x<nowiki/>http://cscott.net<nowiki/>x
27960 x<nowiki/>http://cscott.net<nowiki/>x
27964 WTS of edited autolink-like text (T103364)
27967 "modes": ["wt2wt"],
27969 [ "span[typeof]", "removeAttr", "typeof" ]
27973 Not a link: <nowiki>http://example.com</nowiki>.
27975 Not a link: <span><nowiki>http://example.com</nowiki></span>.
27979 WTS of newly-authored autolink-like text (T103364)
27983 <p>http://example.com is not a link.</p>
27985 <nowiki>http://example.com</nowiki> is not a link.
27989 WTS of autolink-like text after an autolink (T108563)
27993 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
27995 http://example.com <nowiki>http://example.com</nowiki> is not a link.
27999 Magic links inside links (not autolinked)
28001 [[Foo|http://example.com]]
28004 [[Foo|ISBN 123456789x]]
28006 [http://foo.com http://example.com]
28007 [http://foo.com RFC 1234]
28008 [http://foo.com PMID 1234]
28009 [http://foo.com ISBN 123456789x]
28011 <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>
28012 <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>
28014 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28015 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28016 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28017 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28019 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
28020 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
28021 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
28022 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
28026 Magic links inside image captions (autolinked)
28028 [[File:Foobar.jpg|thumb|http://example.com]]
28029 [[File:Foobar.jpg|thumb|RFC 1234]]
28030 [[File:Foobar.jpg|thumb|PMID 1234]]
28031 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28033 <div class="thumb tright">
28034 <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>
28035 <div class="thumbcaption">
28036 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28037 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
28040 <div class="thumb tright">
28041 <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>
28042 <div class="thumbcaption">
28043 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28044 <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a></div>
28047 <div class="thumb tright">
28048 <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>
28049 <div class="thumbcaption">
28050 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28051 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
28054 <div class="thumb tright">
28055 <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>
28056 <div class="thumbcaption">
28057 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28058 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
28062 <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>
28063 <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>
28064 <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>
28065 <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>
28069 WTS of magic word text (T109371)
28074 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28075 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28077 <nowiki>RFC 1234</nowiki>
28079 [http://foo.com RFC 1234]
28085 Edited Redirect link should emit a non-piped wikitext link
28089 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28095 T75121: Infer extension name from typeOf if data-mw is not present
28097 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28099 <div typeOf="mw:Extension/foo"></div>
28104 # Note that the <p> wrapping isn't present in PHP parser output
28105 # The important thing for this test is that P-wrapping doesn't
28106 # interfere with the <nowiki> protection for leading - in <td>
28107 # (which isn't necessary for <th>).
28109 T88318: p-wrapped dash in table.
28111 parsoid=html2wt,wt2wt
28114 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28115 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28116 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28123 |<nowiki>-</nowiki>
28124 |<nowiki>- </nowiki>
28143 <td><small>-</small></td>
28155 T149209: WTS: Handle newlines in table cells properly
28163 </td><td data-parsoid='{"stx_v":"row"}'>c</td></tr>
28165 </td><td data-parsoid='{"stx_v":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28171 </th><th data-parsoid='{"stx_v":"row"}'>c</th></tr>
28173 </th><th data-parsoid='{"stx_v":"row"}'>y</th></tr>
28195 T149209: Selser: Handle newlines in table cells properly
28198 "modes": ["selser"],
28200 [ "#h1", "html", "a\nb\n" ],
28201 [ "#h2", "html", "a\nb\n" ],
28202 [ "#c1", "html", "a\nb\n" ],
28203 [ "#c2", "html", "<p>a</p>" ],
28204 [ "#c3", "html", "<p>a</p>" ],
28205 [ "#c4", "html", "edit-me<p>a</p>" ]
28210 ! id="h1" |edit-me!!1
28212 ! id="h2" |edit-me||2
28214 | id="c1" |edit-me||3
28216 | id="c2" |edit-me||4
28218 | id="c3" |edit-me||p||q||r
28220 | id="c4" |edit-me||p||q||r
28249 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28254 <td id='mwAc'>foo</td>
28255 <td id='serialize-this'>bar</td>
28260 | id="serialize-this" |bar
28265 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28269 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28271 <div id="hello">ok</div>
28278 "modes": ["wt2wt"],
28280 [ "#xyz", "before", "<b>before</b> stuff " ],
28281 [ "#xyz", "after", " stuff <i>after</i>" ],
28282 [ "#xyz", "html", "x <b>y</b> z" ]
28286 <span id="xyz">hello</span>
28288 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28292 Never serialize a-tag as html, regardless of what data-parsoid has to say
28294 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28296 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28301 ## SSS FIXME: This is broken output nevertheless.
28302 ## What might be a reasonable non-broken output for this?
28303 ## This is an edge case unlikely to be seen in production
28304 ## that I am not wasting more time on this right now.
28306 Never serialize a-tag as html, no matter what attributes it has
28308 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28310 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28312 [http://boo.org http://boohoo.org]
28315 # Misnested is an indication that selser can reuse the source but these have
28316 # shown to sneak through on occasion. See T101768.
28317 # The original wikitext here is: [http://test.com [[one]] two three]
28319 Strip span tags added to mark misnested links
28323 <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>
28325 [http://test.com][[one]] two three
28329 Catch regression when unpacking misnested links
28333 {{echo|hi}}[http://example.com [[ho]]]
28335 <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>
28339 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28343 <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|}"]}'>
28355 ## This test verifies the presence and computation of this attribute indirectly
28356 ## by making an edit and ensuring that the serialization is correct (which it would be
28357 ## only if firstWikitextNode is properly set).
28359 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28362 "modes": ["wt2wt"],
28364 [ "div#x", "remove" ],
28365 [ "div", "before", "<div>new</div>" ]
28369 <div id="x">foo</div>
28371 {{echo|<div>boo</div>
28379 {{echo|<div>boo</div>
28385 # --------------------------------------------
28386 # Tests spec'ing wikitext serialization norms |
28387 # --------------------------------------------
28390 Serialize multi-line indent-pre starting with wikitext syntax
28404 1. Categories should always be serialized on their own line
28408 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28416 2. Categories that are part of templates should not introduce a line break
28418 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28420 <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>
28423 # Careful while editing these next 2 tests. There are \u200f characters
28424 # before and after the <link> tags in the HTML and following some
28425 # of the categories in wikitext
28426 # Do not remove these characters in edits.
28428 # As part of the serialization, these bidi characters will get stripped.
28430 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28433 "modes": ["html2wt"],
28434 "scrubWikitext": true
28437 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28438 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28441 [[קטגוריה: שיטות משפט]]
28445 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28448 "modes": ["html2wt"],
28449 "scrubWikitext": true
28452 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28459 Lists: Add space after bullets
28466 <li><span> baz</span></li>
28471 * <span> baz</span>
28475 1. Headings: Add space before/after == (T53744)
28482 <h2><span> baz</span></h2>
28490 == <span> baz</span> ==
28494 2. Headings: Add space before/after == even after hoisted content
28497 "modes": ["html2wt"],
28498 "scrubWikitext": true
28501 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28509 1. Headings: suppress newly created empty headings
28512 "modes": ["html2wt"],
28513 "scrubWikitext": true
28521 2. Headings: don't suppress empty headings if scrubWikitext is false
28531 3. Headings: suppress empty headings on edits
28534 "modes": ["selser"],
28535 "scrubWikitext": true,
28541 ==<span id="x">foo</span>==
28546 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
28549 "modes": ["html2wt"],
28550 "scrubWikitext": true
28553 <h2>foo<br/>bar</h2>
28554 <h2>foo <span><br/>bar</span> baz</h2>
28558 == foo <span> bar</span> baz ==
28562 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
28565 "modes": ["html2wt"],
28566 "scrubWikitext": false
28569 <h2>foo<br/>bar</h2>
28575 1. WT Quote Tags: suppress newly created empty style tags
28578 "modes": ["html2wt"],
28579 "scrubWikitext": true
28587 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
28593 ''<nowiki/>'''''<nowiki/>'''
28597 3. WT Quote Tags: suppress empty style tags on edits
28600 "modes": ["selser"],
28601 "scrubWikitext": true,
28607 '''<span id="x">foo</span>'''
28612 1. Anchors: suppress newly created empty anchors
28615 "modes": ["html2wt"],
28616 "scrubWikitext": true
28619 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28624 2. Anchors: don't suppress empty anchors if scrubWikitext is false
28627 "modes": ["html2wt"],
28628 "scrubWikitext": false
28631 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28637 3. Anchors: suppress empty anchors on edits
28640 "modes": ["selser"],
28641 "scrubWikitext": true,
28647 [[Test|<span id="x">foo</span>]]
28652 3a. Anchors: do not suppress numbered extlinks
28655 "modes": ["wt2wt"],
28656 "scrubWikitext": true
28661 <a rel="mw:ExtLink" href="http://foo.com"></a>
28665 3b. Anchors: do not suppress numbered extlinks
28668 "modes": ["wt2wt"],
28669 "scrubWikitext": true,
28675 [http://foo.com <span id="x">foo</span>]
28681 Normalizations should be restricted to edited content
28684 "modes": ["selser"],
28685 "scrubWikitext": true,
28687 [ "h1", "before", "<i></i>"]
28701 1. Multiple normalizations (html2wt)
28704 "modes": ["html2wt"],
28705 "scrubWikitext": true
28709 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
28710 </a><b><i></i></b>x</p>
28719 2. Multiple normalizations (selser)
28722 "modes": ["selser"],
28723 "scrubWikitext": true,
28725 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
28729 <span id="x">foo</span>
28731 <span id="x">foo</span>
28737 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
28740 "modes": ["html2wt"],
28741 "scrubWikitext": true
28753 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
28760 <nowiki> </nowiki>hi
28762 <nowiki> </nowiki> hello
28766 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
28769 "modes": ["html2wt"],
28770 "scrubWikitext": true
28779 baz bang</td></tr></table>
28785 bar<span>boo</span></p>
28801 bar<span>boo</span>
28805 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
28808 "modes": ["selser"],
28809 "scrubWikitext": true,
28811 [ "p", "html", " a\n b" ]
28822 1. New links that end in spaces
28825 "modes": ["html2wt"],
28826 "scrubWikitext": false
28829 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
28830 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
28831 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
28833 [[Berlin ]]<nowiki/>is the capital of Germany.
28837 [[Boston ]] is a city.
28841 2. New links that end in spaces
28844 "modes": ["html2wt"],
28845 "scrubWikitext": true
28848 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
28849 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
28850 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
28852 [[Berlin]] is the capital of Germany.
28856 [[Boston]] is a city.
28860 1. Table cells with escapable prefixes
28863 "modes": ["html2wt"],
28864 "scrubWikitext": false
28868 <tr><td>a</td></tr>
28869 <tr><td>-</td></tr>
28870 <tr><td>+</td></tr>
28876 |<nowiki>-</nowiki>
28878 |<nowiki>+</nowiki>
28883 2. Table cells with escapable prefixes
28886 "modes": ["html2wt"],
28887 "scrubWikitext": true
28891 <tr><td>a</td></tr>
28892 <tr><td>-</td></tr>
28893 <tr><td>+</td></tr>
28906 3a. Table cells with escapable prefixes after edits
28909 "modes": ["selser"],
28910 "scrubWikitext": true,
28912 [ "table tbody tr:first-child td:first-child", "remove"]
28926 3b. Table cells with escapable prefixes after edits
28929 "modes": ["selser"],
28930 "scrubWikitext": true,
28932 [ "table tbody tr:first-child td:first-child", "html", "-" ],
28939 |<span id="x">foo</span>+
28948 # FIXME: This test will fail because
28949 # normalization doesn't realize that the id attribute
28950 # will eliminate the escapable scenario
28952 4a. Table cells without escapable prefixes after edits
28955 "modes": ["selser"],
28956 "scrubWikitext": true,
28958 [ "#x", "html", "-" ]
28971 ## This tests normalizer's ability to discriminate between
28972 ## cells having identical content.
28974 4b. Table cells without escapable prefixes after edits
28977 "modes": ["selser"],
28978 "scrubWikitext": true,
28980 [ "td", "html", "-" ]
28993 ## This tests normalizer's ability to not be tripped by
28994 ## comments (and whitespace)
28996 4c. Table cells without escapable prefixes after edits
28999 "modes": ["selser"],
29000 "scrubWikitext": true,
29002 [ "table tbody tr td:first-child", "remove" ]
29017 ## This tests normalizer's ability to handle HTML cells
29019 4d. Table cells without escapable prefixes after edits
29022 "modes": ["selser"],
29023 "scrubWikitext": true,
29025 [ "td", "html", "-" ]
29030 <tr><td>a</td></tr>
29034 <tr><td>-</td></tr>
29038 ## T111151 Remove font elements without attributes
29040 5a. font tags without attributes should be dropped in scrubWikitext mode
29043 "modes": ["html2wt"],
29044 "scrubWikitext": true
29048 <font><font>bar</font></font>
29049 <font class="x">boo</font>
29053 <font class="x">boo</font>
29057 5b. font tags should not be dropped without scrubWikitext being enabled
29060 "modes": ["html2wt"],
29061 "scrubWikitext": false
29070 Escape nowiki DOM elements
29074 <nowiki><i>foo</i></nowiki>
29076 <nowiki>''foo''</nowiki>
29079 # This is meant to be an interim fix while we go about figuring out
29080 # how to not introduce these trailing <nowiki/>s in the first place.
29082 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29086 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29088 <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>
29089 <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>
29102 # ---------------------------------------------------
29103 # End of tests spec'ing wikitext serialization norms |
29104 # ---------------------------------------------------
29108 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29116 <td><b>c</b><p>d</p></td>
29135 Anchor without href scenarios
29137 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29140 <a class="no">dice</a>
29145 <span name="foo"></span>
29149 New transclusion added after a list should be serialized after the list
29153 <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>
29159 # -----------------------------------------------------------------
29160 # End of section for Parsoid-only html2wt tests for serialization
29162 # -----------------------------------------------------------------
29164 # -----------------------------------------------------------------
29165 # The following section of tests are primarily to spec behavior of
29166 # the selective serializer. All these tests have manual selser
29167 # changes. The automated selser changes for all tests handle the
29168 # wide variation of changes, but these tests here capture specs
29169 # deterministically.
29170 # ----------------------------------------------------------------
29174 Selser: New comments should not be lost
29177 "modes": ["selser"],
29179 [ "#a", "after", "<!--c1-->" ],
29180 [ "#b", "before", "<!--c2-->" ]
29184 <span id="a">a</span>
29186 <span id="b">b</span>
29188 <span id="a">a</span><!--c1-->
29190 <!--c2--><span id="b">b</span>
29195 Selser: Check for validity of DSR before using it
29198 "modes": ["selser"],
29200 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29204 <span id="a">a</span>
29206 {{DISPLAYTITLE:foo}}
29207 <span id="a">a</span>
29211 1. DOMDiff: Changes to <ref> content should be looked up using id
29214 "modes": ["selser"],
29216 ["#X", "after", "bar"],
29217 ["#Y", "after", "baz"]
29221 X <ref><span id="X">foo</span></ref>
29224 <ref name="a"><span id="Y">foo</span></ref>
29227 X <ref><span id="X">foo</span>bar</ref>
29230 <ref name="a"><span id="Y">foo</span>baz</ref>
29235 2. DOMDiff: Changes to <ref> content should be looked up using id
29238 "modes": ["selser"],
29240 ["#Z", "after", "bar"]
29244 A <ref>foo bar for a</ref>
29245 B <ref group="X" name="b" />
29249 <references group="X">
29250 <ref name="b"><span id="Z">foo</span></ref>
29253 A <ref>foo bar for a</ref>
29254 B <ref group="X" name="b" />
29258 <references group="X">
29259 <ref name="b"><span id="Z">foo</span>bar</ref>
29264 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29267 "modes": ["selser"],
29269 [ "div:first-child", "text", "bar" ]
29273 <div style="{{1x|color:red;}}%">foo</div>
29275 <div style="{{1x|color:red;}}%">bar</div>
29288 <li class="mw-empty-elt"></li>
29289 <li class="mw-empty-elt"></li>
29297 [[File:Thumb.png|thumb]]
29299 <div class="thumb tright">
29300 <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>
29301 <div class="thumbcaption">
29302 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
29309 unclosed internal link XSS (T137264)
29311 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29313 <p>[[#<script>alert(1)</script>|
29316 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29320 Validating that <style> isn't eaten by tidy (T167349)
29322 # Use $wgRawHtml to inject a <style> tag, since you normally can't in wikitext
29326 <html><style>.foo::before { content: "<foo>"; }</style></html>
29327 <html><style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style></html>
29331 <style>.foo::before { content: "<foo>"; }</style>
29332 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29337 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29339 == A&B&C&amp;D&amp;amp;E ==
29340 [[#A&B&C&amp;D&amp;amp;E]]
29342 <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>
29343 <p><a href="#A.26B.26C.26D.26amp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29348 Decoding of HTML entities in indicator names for IDs (T104196)
29352 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29354 1&2&3&4&amp;5=Indicator
29359 HTML5 ids: fallback to legacy
29361 wgFragmentMode=[ 'html5', 'legacy' ]
29373 == Hey < # " > % : ' ==
29374 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29376 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29378 <!-- These two links should produce identical HTML -->
29379 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29382 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
29384 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29385 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29386 <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>
29387 <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>
29388 <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>
29389 <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>
29393 <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>
29394 <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>
29395 <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>
29396 <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>
29397 <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>
29398 <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>
29399 <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>
29400 </p><p>%F0%9F%92%A9 <span id="%F0%9F%92%A9"></span>
29401 </p><p><a href="#%E5%95%A4%E9%85%92">#啤酒</a> <a href="#%E5%95%A4%E9%85%92">#啤酒</a>
29406 HTML5 ids: legacy with a fallback to modern
29408 wgFragmentMode=[ 'legacy', 'html5' ]
29420 == Hey < # " > % : ' ==
29421 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29423 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29425 <!-- These two links should produce identical HTML -->
29426 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29429 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
29431 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29432 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29433 <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>
29434 <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>
29435 <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>
29436 <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>
29440 <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>
29441 <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>
29442 <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>
29443 <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>
29444 <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>
29445 <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>
29446 <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>
29447 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
29448 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
29453 HTML5 ids: no legacy
29455 wgFragmentMode=[ 'html5' ]
29467 == Hey < # " > % : ' ==
29468 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29470 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29472 <!-- These two links should produce identical HTML -->
29473 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29476 <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
29478 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29479 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29480 <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>
29481 <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>
29482 <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>
29483 <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>
29487 <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>
29488 <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>
29489 <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>
29490 <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>
29491 <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>
29492 <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>
29493 <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>
29494 </p><p>%F0%9F%92%A9 <span id="%F0%9F%92%A9"></span>
29495 </p><p><a href="#%E5%95%A4%E9%85%92">#啤酒</a> <a href="#%E5%95%A4%E9%85%92">#啤酒</a>