1 # MediaWiki Parser test cases
2 # Some taken from https://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # (ignored by Parsoid, since it emits <link>s)
18 # ill add inter-language links
19 # (ignored by Parsoid, since it emits <link>s)
20 # subpage enable subpages (disabled by default)
21 # title=[[XXX]] run test using article title XXX
22 # language=XXX set content language to XXX for this test
23 # variant=XXX set the variant of language for this test (eg zh-tw)
24 # disabled do not run test
25 # parsoid parsoid-specific options (not run by PHP parser unless
26 # the test includes an html/php section)
27 # php php-only test (not run by the parsoid parser unless
28 # the test includes an html/parsoid section)
29 # showtitle make the first line the title
30 # showindicators make the first lines the page status indicators
31 # comment run through Linker::formatComment() instead of main parser
32 # local format section links in edit comment text as local links
33 # notoc disable table of contents
34 # thumbsize=NNN set the default thumb size to NNNpx for this test
35 # wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
37 # You can also set the following parser properties via test options:
38 # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
39 # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
42 # For testing purposes, temporary articles can created:
43 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
44 # where '/' denotes a newline.
46 # This is the standard article assumed to exist.
83 MediaWiki:bad image list
85 * [[File:Bad.jpg]] except [[Nasty page]]
112 // For Serbian; localize Template namespace
120 Template:echo_with_span
126 Template:echo_with_div
139 Template:table_attribs
142 |</noinclude>style="color:red;"|Foo
146 Template:table_attribs_2
149 |</noinclude>style="color:red;"|Foo
154 Template:table_attribs_3
157 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo
161 Template:table_attribs_4
163 | style="background-color:#DC241f;" width="10px" |
167 Template:table_attribs_5
170 |</noinclude>style="color:red;"||Bar
174 Template:table_attribs_6
176 style="background: <nowiki>
183 Template:table_attribs_7
186 |</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
190 Template:table_header_cells
192 {{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
198 {{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
202 Template:PartialTable
209 Template:image_attribs
212 [[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
215 ## See T48811 for details
217 Template:mixed_attr_content_template
219 style="color:red;" title="T48811"
225 Template:definition_list
272 Template:EmptyTRWithHTMLAttrTest
275 <tr align="center"></tr>
276 <tr><td>foo</td></tr>
277 <tr align="center"></tr>
278 <tr><td>bar</td></tr>
285 <ref>{{CircularRef}}</ref>
309 <p><span about="#mwt1" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"CircularRef","href":"./Template:CircularRef"},"params":{},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
310 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">Error: Expansion loop detected at <a data-parsoid='{"a":{"href":null},"sa":{"href":"Template:CircularRef"}}'>Template:CircularRef</a></span></li></ol>
316 This is a simple paragraph.
318 <p>This is a simple paragraph.
323 Paragraphs with extra newline spacing
346 Paragraphs with newline spacing with comment lines in between
354 <!--foo--><!--More than 1 comment, still stripped-->
358 <!--foo--> <!----> <!-- bar -->
419 Paragraphs with newline spacing with non-empty white-space lines in between
446 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
454 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
493 Extra newlines: More paragraphs with indented comment
508 Extra newlines followed by heading
523 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
524 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
527 <h1><span class="mw-headline" id="b_2">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
532 Extra newlines between heading and content are swallowed
540 <h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: b">edit</a><span class="mw-editsection-bracket">]</span></span></h1>
541 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
546 Heading with line break in nowiki
550 wgFragmentMode=[ 'html5', 'legacy' ]
555 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
557 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>
561 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span> A <span typeof="mw:Nowiki">B
568 http://fr.wikipedia.org/wiki/🍺
569 <!-- EasterEgg we love beer, better be able be able to link to it -->
571 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
575 # Note that the html+tidy output removes the spaces after the <li>,
576 # which is a bug (https://sourceforge.net/p/tidy/bugs/945/, etc).
577 # This is an issue for all tests with lists. We intentionally do
578 # *not* add html+tidy clauses for these, as we don't want to
579 # document/test the broken behavior. (Parsoid matches the non-tidy
580 # output in these cases.)
589 <li> Item 2</li></ul>
597 * plain''italic''plain
598 * plain''italic''plain''italic''plain
599 * plain'''bold'''plain
600 * plain'''bold'''plain'''bold'''plain
601 * plain''italic''plain'''bold'''plain
602 * plain'''bold'''plain''italic''plain
603 * plain''italic'''bold-italic'''italic''plain
604 * plain'''bold''bold-italic''bold'''plain
605 * plain'''''bold-italic'''italic''plain
606 * plain'''''bold-italic''bold'''plain
607 * plain''italic'''bold-italic'''''plain
608 * plain'''bold''bold-italic'''''plain
609 * plain l'''italic''plain
610 * plain l''''bold''' plain
613 <li> plain<i>italic</i>plain</li>
614 <li> plain<i>italic</i>plain<i>italic</i>plain</li>
615 <li> plain<b>bold</b>plain</li>
616 <li> plain<b>bold</b>plain<b>bold</b>plain</li>
617 <li> plain<i>italic</i>plain<b>bold</b>plain</li>
618 <li> plain<b>bold</b>plain<i>italic</i>plain</li>
619 <li> plain<i>italic<b>bold-italic</b>italic</i>plain</li>
620 <li> plain<b>bold<i>bold-italic</i>bold</b>plain</li>
621 <li> plain<i><b>bold-italic</b>italic</i>plain</li>
622 <li> plain<b><i>bold-italic</i>bold</b>plain</li>
623 <li> plain<i>italic<b>bold-italic</b></i>plain</li>
624 <li> plain<b>bold<i>bold-italic</i></b>plain</li>
625 <li> plain l'<i>italic</i>plain</li>
626 <li> plain l'<b>bold</b> plain</li></ul>
630 # this example taken from the [[simple:Moon]] article (T49326)
632 Italics and possessives (1)
634 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
636 <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
640 # this example taken from [[en:Flaming Pie]] (T51926)
642 Italics and possessives (2)
644 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
646 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
650 # this example taken from [[en:Dictionary]] (T51926)
652 Italics and possessives (3)
654 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''.
656 <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>.
662 ### 2-quote opening sequence tests
665 Italics and bold: 2-quote opening sequence: (2,2)
674 Italics and bold: 2-quote opening sequence: (2,3)
683 Italics and bold: 2-quote opening sequence: (2,4)
693 # same html as previous, but wikitext adjusted to match parsoid html2wt
695 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
697 ''foo<nowiki>''</nowiki>''
703 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
705 Italics and bold: 2-quote opening sequence: (2,5)
718 # same html as previous, but wikitext adjusted to match parsoid html2wt
720 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
722 ''foo'''''<nowiki/>'''
733 ### 3-quote opening sequence tests
737 Italics and bold: 3-quote opening sequence: (3,2)
746 Italics and bold: 3-quote opening sequence: (3,3)
755 Italics and bold: 3-quote opening sequence: (3,4)
763 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
765 Italics and bold: 3-quote opening sequence: (3,5)
778 # same html as previous, but wikitext adjusted to match parsoid html2wt
780 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
782 '''foo'''''<nowiki/>''
793 ### 4-quote opening sequence tests
797 Italics and bold: 4-quote opening sequence: (4,2)
807 # same html as previous, but wikitext adjusted to match parsoid html2wt
809 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
811 <nowiki>''</nowiki>''foo''
818 Italics and bold: 4-quote opening sequence: (4,3)
827 Italics and bold: 4-quote opening sequence: (4,4)
837 # same html as previous, but wikitext adjusted to match parsoid html2wt
839 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
847 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
849 Italics and bold: 4-quote opening sequence: (4,5)
858 <p>'<b>foo</b><i></i>
862 # same html as previous, but wikitext adjusted to match parsoid html2wt
864 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
866 '<nowiki/>'''foo'''''<nowiki/>''
871 <p>'<b>foo</b><i></i>
877 ### 5-quote opening sequence tests
881 Italics and bold: 5-quote opening sequence: (5,2)
891 # same html as previous, but wikitext adjusted to match parsoid html2wt
893 Italics and bold: 5-quote opening sequence: (5,2+3)
902 Italics and bold: 5-quote opening sequence: (5,3)
912 # same html as previous, but wikitext adjusted to match parsoid html2wt
914 Italics and bold: 5-quote opening sequence: (5,3+2)
923 Italics and bold: 5-quote opening sequence: (5,4)
929 <p><i><b>foo'</b></i>
934 Italics and bold: 5-quote opening sequence: (5,5)
943 Italics and bold: 5-quote opening sequence: (5,6)
947 <p><i><b>foo'</b></i>
952 ### multiple quote sequences in a line
956 Italics and bold: multiple quote sequences: (2,4,2)
962 <p><i>foo'<b>bar</b></i>
966 # same html as previous, but wikitext adjusted to match parsoid html2wt
968 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
970 ''foo'<nowiki/>'''bar'''''
972 <p><i>foo'<b>bar</b></i>
977 Italics and bold: multiple quote sequences: (2,4,3)
983 <p><i>foo'<b>bar</b></i>
987 # same html as previous, but wikitext adjusted to match parsoid html2wt
989 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
991 ''foo'<nowiki/>'''bar'''''
993 <p><i>foo'<b>bar</b></i>
998 Italics and bold: multiple quote sequences: (2,4,4)
1004 <p><i>foo'<b>bar'</b></i>
1008 # same html as previous, but wikitext adjusted to match parsoid html2wt
1010 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
1012 ''foo'<nowiki/>'''bar'<nowiki/>'''''
1014 <p><i>foo'<b>bar'</b></i>
1018 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1020 Italics and bold: multiple quote sequences: (3,4,2)
1029 <p><b>foo'</b>bar<i></i>
1033 # same html as previous, but wikitext adjusted to match parsoid html2wt
1035 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1037 '''foo''''bar''<nowiki/>''
1042 <p><b>foo'</b>bar<i></i>
1046 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1048 Italics and bold: multiple quote sequences: (3,4,3)
1057 <p><b>foo'</b>bar<b></b>
1061 # same html as previous, but wikitext adjusted to match parsoid html2wt
1063 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1065 '''foo''''bar'''<nowiki/>'''
1070 <p><b>foo'</b>bar<b></b>
1075 ### other quote tests
1078 Italics and bold: other quote tests: (2,3,5)
1080 ''this is about '''foo's family'''''
1082 <p><i>this is about <b>foo's family</b></i>
1088 Italics and bold: other quote tests: (2,(3,3),2)
1090 ''this is about '''foo's''' family''
1092 <p><i>this is about <b>foo's</b> family</i>
1098 Italics and bold: other quote tests: (3,2,3,2)
1102 '''this is about ''foo'''s family''
1104 <p><b>this is about <i>foo</i></b><i>s family</i>
1109 # same html as previous, but wikitext adjusted to match parsoid html2wt
1111 Italics and bold: other quote tests: (3,2,3+2+2,2)
1113 '''this is about ''foo'''''<nowiki/>''s family''
1115 <p><b>this is about <i>foo</i></b><i>s family</i>
1121 Italics and bold: other quote tests: (3,2,3,3)
1123 '''this is about ''foo'''s family'''
1125 <p>'<i>this is about </i>foo<b>s family</b>
1131 Italics and bold: other quote tests: (3,(2,2),3)
1133 '''this is about ''foo's'' family'''
1135 <p><b>this is about <i>foo's</i> family</b>
1141 Italicized possessive
1143 The ''[[Main Page]]'''s talk page.
1145 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1148 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1152 Parsoid only: Quote balancing context should be restricted to td/th cells on the same wikitext line
1153 (Requires tidy for PHP parser output to be fixed up)
1155 parsoid=wt2html,wt2wt
1172 <tbody><tr><th><i>a</i></th><th><i>b</i></th>
1173 <td><i>a</i></td><td><i>b</i></td></tr>
1182 Non-html5 tags should be accepted
1184 <center>''foo''</center>
1186 <font>''foo''</font>
1187 <strike>''foo''</strike>
1190 <center><i>foo</i></center>
1191 <p><big><i>foo</i></big>
1192 <font><i>foo</i></font>
1193 <strike><i>foo</i></strike>
1199 <wbr> is valid wikitext (T54468)
1207 # <strike> is HTML4, <s> is HTML4/5.
1209 <s> or <strike> for strikethrough
1211 <strike>strike</strike>
1215 <p><strike>strike</strike>
1223 Text-level semantic html elements in wikitext
1226 <strong>text</strong>
1242 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1249 <strong>text</strong>
1265 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1273 # test cases taken from
1274 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1276 Ruby markup (W3C-style)
1278 ; Mono-ruby for individual base characters
1279 : <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1281 : <ruby>今日<rt>きょう</rt></ruby>
1283 : <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1285 : <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1287 : <ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1289 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1290 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1291 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1294 <dl><dt> Mono-ruby for individual base characters</dt>
1295 <dd> <ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1296 <dt> Group ruby</dt>
1297 <dd> <ruby>今日<rt>きょう</rt></ruby></dd>
1298 <dt> Jukugo ruby</dt>
1299 <dd> <ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1300 <dt> Inline ruby</dt>
1301 <dd> <ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1302 <dt> Double-sided ruby</dt>
1303 <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>
1305 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1306 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1307 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1312 # The next two test different paths in the sanitizer.
1314 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1316 <blockquote|>a</blockquote>
1318 <b→> doesn't terminate </b→>
1320 <bä> doesn't terminate </bä>
1322 <boo> doesn't terminate </boo>
1324 <s.foo> doesn't terminate </s.foo>
1328 <p><blockquote|>a</blockquote>
1329 </p><p><b→> doesn't terminate </b→>
1330 </p><p><bä> doesn't terminate </bä>
1331 </p><p><boo> doesn't terminate </boo>
1332 </p><p><s.foo> doesn't terminate </s.foo>
1333 </p><p><sub-ID#1>
1337 # There is a tidy bug here: https://sourceforge.net/p/tidy/bugs/946/
1338 # If the non-word-character tag made it through the sanitizer, tidy
1339 # would munge it up.
1341 Non-word characters don't terminate tag names + tidy
1343 <blockquote|>a</blockquote>
1345 <b→> doesn't terminate </b→>
1347 <bä> doesn't terminate </bä>
1349 <boo> doesn't terminate </boo>
1351 <s.foo> doesn't terminate </s.foo>
1355 <p><blockquote|>a</p>
1356 <p><b→> doesn't terminate </b→></p>
1357 <p><bä> doesn't terminate </bä></p>
1358 <p><boo> doesn't terminate </boo></p>
1359 <p><s.foo> doesn't terminate </s.foo></p>
1360 <p><sub-ID#1></p>
1364 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1365 ### This checks that HTML5 tags (with non-word characters in the tag
1366 ### name) make it safely through the parser -- the Sanitizer will
1367 ### munge them later, as it should.
1370 Non-word characters are valid in extension tags (T19663)
1381 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1385 Isolated close tags should be treated as literal text (T54760)
1393 <p><s.foo>s</p>
1395 <p><s.foo>s</p>
1399 ### Special characters
1403 Bare pipe character (T54363)
1412 Bare pipe character from a template (T54363)
1421 ### <nowiki> test cases
1425 <nowiki> unordered list
1427 <nowiki>* This is not an unordered list item.</nowiki>
1429 <p>* This is not an unordered list item.
1432 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1438 <nowiki>Lorem ipsum dolor
1446 <p>Lorem ipsum dolor
1455 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1465 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1467 <nowiki><span class="error"></nowiki>
1469 <p><span class="error">
1472 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1478 :There is not nowiki.
1479 :There is <nowiki>nowiki</nowiki>.
1481 #There is not nowiki.
1482 #There is <nowiki>nowiki</nowiki>.
1484 *There is not nowiki.
1485 *There is <nowiki>nowiki</nowiki>.
1487 <dl><dd>There is not nowiki.</dd>
1488 <dd>There is nowiki.</dd></dl>
1489 <ol><li>There is not nowiki.</li>
1490 <li>There is nowiki.</li></ol>
1491 <ul><li>There is not nowiki.</li>
1492 <li>There is nowiki.</li></ul>
1495 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1496 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1498 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1499 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1501 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1502 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1506 Entities inside <nowiki>
1508 <nowiki><</nowiki>
1513 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1517 Entities inside template parameters
1523 <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>
1527 Properly escape nowiki when combined with other wiki markup
1531 <p>* </nowiki> tag</p>
1533 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1537 T93824: Put escaped HTML tags inside nowiki
1541 <p><h2>foo</h2></p>
1543 <nowiki><h2>foo</h2></nowiki>
1547 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1551 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1552 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1553 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1555 This text: L'[[Foo]]
1556 This text: L<nowiki>''</nowiki>[[Foo]]
1557 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1560 # This test fails because wikitext whitespace is not normalized before comparing.
1562 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1566 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1569 This text : L<nowiki>''</nowiki>[[Foo]]
1572 # This test and the next one are html2wt only as they test that incorrect wikitext
1573 # passed in template arguments gets escaped or wrapped in nowikis where required.
1575 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1579 <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>
1580 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1582 {{echo|foo{{!}}bar}}
1583 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1587 T53961: Output correct nowikis in template arguments
1591 <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>
1592 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1593 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1594 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1595 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1598 {{echo|<nowiki>a }} b</nowiki>}}
1599 {{echo|<nowiki>a [[ b</nowiki>}}
1600 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1601 {{echo|a <nowiki>}</nowiki>}}
1605 Cases where "!!" needs nowiki protection
1610 <tr><th>this needs protection !! here</th></tr>
1614 <tr><th>this does not need
1615 protection !! here</th></tr>
1619 !<nowiki>this needs protection !! here</nowiki>
1632 Comments and Indent-Pre
1634 <!-- comment 1 --> asdf
1636 <!-- comment 1 --> asdf
1639 <!-- comment 1 --> asdf
1640 <!-- comment 2 -->xyz
1642 <!-- comment 1 --> asdf
1643 <!-- comment 2 --> xyz
1699 asdf<!-- comment 1 -->jkl
1709 <!-- foo --> b <!-- bar -->
1723 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1729 Comment semantics and delimiters
1731 <!-- --><!----><!-----><!------>
1735 <!-- --><!----><!-----><!------>
1739 Comment semantics and delimiters, redux
1741 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1742 -- foo -- funky huh? ... -->
1746 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1747 -- foo -- funky huh? ... -->
1751 Comment semantics and delimiters: directors cut
1753 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1754 everything starting with < followed by !-- until the first -- and > we see,
1755 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1761 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1762 everything starting with < followed by !-- until the first -- and > we see,
1763 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1768 Comment semantics: nesting
1770 <!--<!-- no, we're not going to do anything fancy here -->-->
1775 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1778 # Parsoid closes the unclosed comment, even if it means a slight
1781 Comment semantics: unclosed comment at end
1783 parsoid=wt2html,html2html
1785 <!--This comment will run out to the end of the document
1789 <!--This comment will run out to the end of the document-->
1793 Comment semantics: normalize comments to play nice with XML and browsers
1795 <!-- Browsers --!> think this is closed -->
1796 <!--> This would normally be text -->
1797 <!---> As would this -->
1798 <!-- XML doesn't like trailing dashes -------->
1799 <!-- Nor doubled hyphens -- anywhere in the data -->
1800 But this is not a comment.
1802 <p>But this is not a comment.
1805 <!-- Browsers --!> think this is closed -->
1806 <!--> This would normally be text -->
1807 <!---> As would this -->
1808 <!-- XML doesn't like trailing dashes -------->
1809 <!-- Nor doubled hyphens -- anywhere in the data -->
1810 <p>But this is not a comment.</p>
1814 Comment semantics: round-trip even text which contains encoded -->
1816 <!-- hello & goodbye - > --> --&gt; --&xx -->
1818 <!-- hello & goodbye - > --> --&gt; --&xx -->
1822 Comment in template title
1831 Comment on its own line post-expand
1843 Comment on its own line post-expand with non-significant whitespace
1855 Multiple comments should still parse as SOL-transparent
1857 parsoid=wt2html,wt2wt
1860 <!--c2--><!--c3--><!--c4-->*b
1869 <!--c2--><!--c3--><!--c4-->
1875 ## Make sure ">" gets escaped in comments to avoid XSS
1877 IE conditional comments
1880 <script>alert('hi');</script>
1883 <!--[if lt IE 9]>
1884 <script>alert('hi');</script>
1889 ### paragraph wrapping tests
1904 Block tag on one line (<div>)
1920 No p-wrappable content
1922 <span><div>x</div></span>
1923 <span><s><div>x</div></s></span>
1924 <small><em></em></small><span><s><div>x</div></s></span>
1926 <div><span>x</span></div>
1927 <div><span><s>x</s></span></div>
1928 <div><span><s>x</s></span></div>
1930 <span><div>x</div></span>
1931 <span><s><div>x</div></s></span>
1932 <small><em></em></small><span><s><div>x</div></s></span>
1935 # T177612: Parsoid-only test
1937 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
1939 {{echo|<span><div>x</div></span>}}
1942 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<span><div>x</div></span>"}},"i":0}}]}'><div>x</div></span>
1947 Block tag on one line (<blockquote>)
1949 a <blockquote>foo</blockquote>
1953 a <blockquote>foo</blockquote>
1965 Block tag on both lines (<div>)
1982 Block tag on both lines (<blockquote>)
1984 a <blockquote>foo</blockquote>
1986 b <blockquote>foo</blockquote>
1988 a <blockquote>foo</blockquote>
1989 b <blockquote>foo</blockquote>
2003 Multiple lines without block tags
2027 # Tidy strips out the empty <div> tags. Parsoid doesn't.
2028 # So, we have a separate section for Parsoid. We don't want
2029 # to mimic this stripping behavior in Parsoid. It affects
2030 # editing experience and also requires us to maintain additional
2033 Empty lines between lines with block tags
2071 <div data-parsoid='{"stx":"html"}'></div>
2074 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2077 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2079 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2082 <div data-parsoid='{"stx":"html"}'>e</div>
2085 ## PHP parser emits output which is broken
2087 Unclosed HTML p-tags should be handled properly
2100 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2105 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2106 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2109 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2113 a [[Category:A1]] [[Category:A2]]
2118 <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"/>
2122 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2128 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2132 ### Preformatted text
2141 And a [[Main Page|link]]
2147 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2152 Tabs don't trigger preformatted text
2156 This is preformatted text.
2162 <pre>This is preformatted text.
2167 preformatted text.</p>
2168 <pre>This is preformatted text.
2173 Space before tab needs nowiki pre protection
2179 <nowiki> </nowiki> a
2183 Ident preformatting with inline content
2194 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2211 Regression with preformatted in <center>
2225 T54763: Preformatted in <blockquote>
2231 indented cell (no pre-wrapping!)
2241 <p> indented cell (no pre-wrapping!)
2249 T53086: Double newlines in blockquotes should be turned into paragraphs
2266 T17491: <ins>/<del> in blockquote
2269 Foo <del>bar</del> <ins>baz</ins> quux
2273 <p>Foo <del>bar</del> <ins>baz</ins> quux
2279 # Note that the p-wrapping is newline sensitive, which could be
2280 # considered a bug: tidy will wrap only the 'Foo' in the example
2281 # below in a <p> tag. (see comment 23-25 of T8200)
2283 T17491: <ins>/<del> in blockquote (2)
2285 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2288 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2294 <del>bar</del> <ins>baz</ins> quux</blockquote>
2298 <pre> with attributes (T5202)
2300 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2302 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2307 <pre> with width attribute (T5202)
2309 <pre width="8">Narrow screen goodies</pre>
2311 <pre width="8">Narrow screen goodies</pre>
2316 <pre> with forbidden attribute (T5202)
2318 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2320 <pre width="8">Narrow screen goodies</pre>
2325 Entities inside <pre>
2334 <pre> with forbidden attribute values (T5202)
2336 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2338 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2343 <nowiki> inside <pre> (T15238)
2351 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2359 <pre><nowiki>Foo</nowiki></pre>
2364 <nowiki> inside of #tag:pre
2366 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2368 <pre>Foo →bar</pre>
2371 <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>
2374 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2375 ## aren't enclosed in nowikis.
2377 <nowiki> and <pre> preference (first one wins)
2408 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2413 <p><span typeof="mw:Nowiki">
2421 </pre> inside nowiki
2423 <nowiki></pre></nowiki>
2429 # Parsoid doesn't strip empty tags, like Tidy does.
2431 Empty pre; pre inside other HTML tags (T56946)
2456 <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
2458 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2462 HTML pre followed by indent-pre
2472 # Note that tidy removes the empty <p> tags from the start and end.
2473 # Parsoid does not, by design.
2477 <p><pre>foo</pre></p>
2483 <p class='mw-empty-elt' data-parsoid='{"stx":"html","autoInsertedEnd":true}'></p><pre typeof="mw:Extension/pre" about="#mwt2" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre><p class='mw-empty-elt' data-parsoid='{"autoInsertedStart":true,"stx":"html"}'></p>
2487 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2495 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2505 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2517 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2538 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2542 {{echo| foo}}{{echo| bar}}
2547 {{echo|<!--cmt--> foo}}
2549 <!--cmt-->{{echo| foo}}
2551 {{echo|{{echo| }}bar}}
2569 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2605 ## Hmm, should Parsoid rt this?
2607 Pres with newline attributes
2609 parsoid=wt2html,html2html
2614 <pre class="one two">hi</pre>
2617 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2621 Things that look like <pre> tags aren't treated as such
2623 Barack Obama <President> of the United States
2624 <President></President>
2626 <p>Barack Obama <President> of the United States
2627 <President></President>
2632 Handle broken pre-like tags (T66025)
2636 {{echo|<pre <pre>x</pre>}}
2638 <table><pre </table>
2641 <table><pre </table>
2649 <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>
2658 Parsoid: handle pre with space after attribute
2662 <pre style="width:50%;" >{{echo|foo}}</pre>
2664 <pre style="width:50%;">{{echo|foo}}</pre>
2667 <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>
2670 # TODO / maybe: fix wt2wt for this
2672 Parsoid: Don't paragraph-wrap fosterable content
2698 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2726 #--------------------------------------------------------------------
2727 # Transclusion parameter whitespace stripping tests
2728 # Behavior is different for positional and named parameters
2729 #--------------------------------------------------------------------
2731 Templates: Strip leading and trailing whitespace from named-param values
2735 {{echo|1= {{echo|b}} }}
2748 <ul><li> d</li></ul>
2753 Templates: Don't strip whitespace from positional-param values
2757 {{echo|{{echo|b}} }}
2789 <ul><li> f</li></ul>
2797 Templates: Don't recognize targets split by newlines
2813 Templates: Recognize targets when newlines and comments don't split the target
2818 <!--X--> ech<!--X-->o<!--X-->
2826 <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>
2830 Templates: Handle empty comment-and-ws-only lines correctly
2833 <!--should be ignored-->
2834 <!--should be ignored as well-->
2841 <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>
2845 Templates: Handle comments in the target
2848 <!-- should be ignored -->
2852 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2855 {{echo<!-- should be ignored -->
2858 {{echo<!-- should be ignored -->|foo}}
2860 {{<!-- should be ignored -->echo|foo}}
2869 <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>
2871 <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>
2873 <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>
2875 <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>
2877 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2881 Templates: Handle comments in parameter names (T69657)
2884 <!-- should be ignored -->
2888 <!-- should be ignored -->
2891 {{echo|1<!-- should be ignored -->=foo}}
2893 {{echo|<!-- should be ignored -->1=foo}}
2901 <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>
2903 <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>
2905 <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>
2907 <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>
2911 Templates: Other wikitext in parameter names (T69657)
2918 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2922 Templates: With colons
2926 <p>Template with colon
2929 <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>
2932 #--------------------------------------------------------------------
2933 # Transclusion parameter escaping tests
2934 #--------------------------------------------------------------------
2937 Templates: Parsoid parameter escaping test 1
2939 {{echo|[foo]|{{echo|[bar]}}}}
2943 <p about="#mwt1" typeof="mw:Transclusion"
2944 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2948 Parsoid: Pipes in external links in template parameter
2950 {{echo|[{{echo|http://example.com}} link]}}
2952 <p><a rel="nofollow" class="external text" href="http://example.com">link</a></p>
2954 <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>
2958 Parsoid: pipe in transclusion parameter
2960 {{echo|http://foo.com/a|b}}
2962 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a></p>
2964 <p><a rel="mw:ExtLink" href="http://foo.com/a%7Cb" about="#mwt1"
2965 typeof="mw:Transclusion"
2966 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>
2970 Parsoid: Pipe in external link target and content in template parameter
2972 parsoid=html2wt,wt2wt
2974 {{echo|[http://foo.com/a|b a|b]}}
2976 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a></p>
2978 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2979 typeof="mw:Transclusion"
2980 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2981 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2985 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2989 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2991 <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>
2995 Templates: Don't escape already nowiki-escaped text in template parameters
2997 parsoid=html2wt,wt2wt
2999 {{echo|foo<nowiki>|</nowiki>bar}}
3000 {{echo|<nowiki><div></nowiki>}}
3001 {{echo|<nowiki></nowiki>}}
3003 <p>foo|bar <div></p>
3005 <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>
3006 <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>
3007 <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>
3013 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3015 parsoid=html2wt,wt2wt
3017 {{echo|{{echo|1=bar}}}}
3021 <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>
3026 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3032 <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>
3037 Templates: Preserve blank parameter names
3043 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3047 Templates: Preserve blank parameter names in other positions
3049 {{blank_param|bar|=foo}}
3053 <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
3058 ### Parsoid-centric tests for testing RT edge cases for pre
3062 1a. Indent-Pre and Comments
3075 1b. Indent-Pre and Comments
3088 1c. Indent-Pre and Comments
3101 1d. Indent-Pre and Comments
3102 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3115 2a. Indent-Pre and tables
3136 2b. Indent-Pre and tables
3152 2c. Indent-Pre and tables (T44252)
3169 2d. Indent-Pre and tables
3186 <tbody><tr><td> b</td></tr>
3191 2e. Indent-Pre and table-line syntax
3204 2f. Indent-pre started by table-line syntax
3223 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3228 Text that should be rendered preformatted
3236 <pre>Text that should be rendered preformatted
3245 3a. Indent-Pre and block tags (single-line html)
3249 c <blockquote> foo </blockquote>
3254 c <blockquote> foo </blockquote>
3255 <pre><span> foo </span>
3258 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3259 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3260 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3261 <pre><span> foo </span>
3278 3b. Indent-Pre and block tags (multi-line html)
3283 <pre>a <span>foo</span>
3288 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3289 b <div data-parsoid='{"stx":"html"}'> foo </div>
3299 3c. Indent-Pre and block tags (pre-content on separate line)
3363 4. Indent-Pre and extension tags
3374 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3378 5. Indent-Pre and html pre
3380 <pre class="123">hi</pre>
3382 <pre class="123">hi</pre>
3385 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3389 Render paragraphs when indent-pre is suppressed in blocklevels
3406 4. Multiple spaces at start-of-line
3424 ## NOTE: the leading white-space chars on empty line are significant
3426 5a. White-space in indent-pre
3438 ## NOTE: the leading white-space chars on empty line are significant
3440 5b. White-space in indent-pre
3459 5c. White-space in indent-pre
3472 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3495 7a. Indent-pre and category links
3497 parsoid=wt2html,wt2wt
3499 [[Category:foo]] <!-- No pre-wrapping -->
3500 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3503 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3504 <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 -->
3507 ## We used to, but no longer wt2wt this test since the default serializer
3508 ## will normalize all categories to serialize on their own line.
3509 ## This wikitext usage is going to be fairly uncommon in production and
3510 ## selser will take care of preserving formatting in those scenarios.
3512 7b. Indent-pre and category links
3517 [[Category:foo]] {{echo|b}}
3519 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3520 <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>
3524 Indent-Pre: Newlines in comments shouldn't affect sol state
3538 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3542 HTML-pre: 1. embedded newlines
3577 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3579 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3582 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3587 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3595 HTML-pre: big spaces
3631 <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"}}'>
3650 HTML-pre: 2: indented text
3663 HTML-pre: 3: other wikitext
3682 <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
3691 ### Definition lists
3698 <dl><dt> name </dt>
3699 <dd> Definition</dd></dl>
3704 Definition list for indentation only
3708 <dl><dd> Indented text</dd></dl>
3713 Definition list with no space
3718 <dd>Definition</dd></dl>
3723 Definition list with URL link
3725 ; http://example.com/ : definition
3727 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3728 <dd> definition</dd></dl>
3733 Definition list with bracketed URL link
3735 ;[http://www.example.com/ Example]:Something about it
3737 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3738 <dd>Something about it</dd></dl>
3743 Definition list with wikilink containing colon
3745 ; [[Help:FAQ]]: The least-read page on Wikipedia
3747 <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>
3748 <dd> The least-read page on Wikipedia</dd></dl>
3752 # At Brion's and JeLuF's insistence... :)
3754 Definition list with news link containing colon
3756 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
3758 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3759 <dd> This isn't even a real newsgroup!</dd></dl>
3762 <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>
3766 Malformed definition list with colon
3768 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3770 <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>
3775 Definition lists: colon in external link text
3777 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
3779 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt>
3780 <dd> OK, I made that up</dd></dl>
3785 Definition lists: colon in HTML attribute
3787 ;<b style="display: inline">bold</b>
3789 <dl><dt><b style="display: inline">bold</b></dt></dl>
3794 Definition lists: self-closed tag
3796 ;one<br/>two : two-line fun
3798 <dl><dt>one<br />two </dt>
3799 <dd> two-line fun</dd></dl>
3804 Definition lists: ignore colons inside tags
3806 ;one <b>two : tag <i>fun:</i>:</b>: def
3808 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3814 Definition lists: excess closed tags
3816 ;one</b>two : bad tag fun
3819 <dt>onetwo </dt>
3820 <dd>bad tag fun</dd>
3825 <dd>bad tag fun</dd>
3830 T13748: Literal closing tags
3834 <dd>test test test test test</dd>
3836 <dd>test test test test test</dd>
3841 <dd>test test test test test</dd>
3843 <dd>test test test test test</dd>
3849 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3852 ; term : description
3857 <dl><dt> term </dt>
3858 <dd> description</dd></dl>
3859 <ul><li> unordered</li></ul>
3865 Definition list with empty definition and following paragraph
3877 Nested definition lists using html syntax
3890 Definition Lists: No nesting: Multiple dd's
3903 Definition Lists: Indentation: Regular
3911 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3916 Definition Lists: Indentation: Missing 1st level
3922 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3927 Definition Lists: Indentation: Multi-level indent
3931 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3936 Definition Lists: Hacky use to indent tables
3943 should be left alone
3945 <dl><dd><dl><dd><table>
3950 </td></tr></table></dd></dl></dd></dl>
3952 should be left alone
3957 Definition Lists: Hacky use to indent tables, with comments (T65979)
3965 should be left alone
3968 <dl><dd><dl><dd><table><tr>
3971 </tr></table><!-- bar --></dd></dl></dd></dl>
3973 should be left alone</p>
3977 Definition Lists: Hacky use to indent tables, with comment before table
3983 <dl><dd><dl><dd><!-- foo --><table><tr>
3985 </tr></table></dd></dl></dd></dl>
3988 # The trailing whitespace in this test is to catch a regression in
3989 # Parsoid after T54473.
3991 Definition Lists: Hacky use to indent tables (WS-insensitive)
4000 </td></tr></table></dd></dl>
4004 <tbody><tr><td>a</td></tr>
4005 </tbody></table> </dd></dl>
4008 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4009 ## as an empty dt item. It also ignores all but the last ";" when followed
4010 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4011 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4014 ## Ex: ";;t2 ::d2" is transformed into:
4026 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4027 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4038 ## All Parsoid only definition list tests have this difference.
4040 ## See also: https://phabricator.wikimedia.org/T8569
4041 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4044 Table / list interaction: indented table with lists in table contents
4059 <ul><li> b</li></ul>
4063 <ul><li> d</li></ul>
4064 </td></tr></table></dd></dl>
4069 Table / list interaction: lists nested in tables nested in indented lists
4092 </td></tr></table></dd></dl>
4099 Definition Lists: Nesting: Multi-level (Parsoid only)
4129 Definition Lists: Nesting: Test 2 (Parsoid only)
4156 Definition Lists: Nesting: Test 3 (Parsoid only)
4199 Definition Lists: Nesting: Test 4
4204 <dl><dd><dl><dd><dl><dt>t3</dt>
4205 <dd>d3</dd></dl></dd></dl></dd></dl>
4210 ## The Parsoid team believes the following three test exposes a
4211 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4212 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4213 ## It also exposes a "misfeature" in tidy, which doesn't like
4214 ## <dl> tags with a single <dt> child; it converts the <dt> into
4215 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4217 Definition Lists: Mixed Lists: Test 1
4223 <dl><dd><dl><dt><ul><li> foo</li>
4224 <li> bar</li></ul></dt></dl>
4225 <dl><dt> baz</dt></dl></dd></dl>
4260 Definition Lists: Mixed Lists: Test 2
4265 <ul><li><dl><dd> d1</dd>
4266 <dd> d2</dd></dl></li></ul>
4272 Definition Lists: Mixed Lists: Test 3
4277 <ul><li><dl><dd><dl><dd><dl><dd> d1</dd>
4278 <dd> d2</dd></dl></dd></dl></dd></dl></li></ul>
4284 Definition Lists: Mixed Lists: Test 4
4289 <ul><li><dl><dt>d1 </dt>
4292 <dd>d4</dd></dl></li></ul>
4298 Definition Lists: Mixed Lists: Test 5
4304 <dl><dd> d2</dd></dl></dd></dl></li></ul>
4310 Definition Lists: Mixed Lists: Test 6
4315 <ol><li><ul><li><dl><dd>d1
4316 <dl><dd><dl><dd> d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4322 Definition Lists: Mixed Lists: Test 7
4327 <dl><dd><ul><li> d1</li>
4328 <li> d2</li></ul></dd></dl>
4334 Definition Lists: Mixed Lists: Test 8
4339 <dl><dd><ul><li> d1</li></ul>
4340 <dl><dd><ul><li> d2</li></ul></dd></dl></dd></dl>
4346 Definition Lists: Mixed Lists: Test 9
4350 <ul><li><dl><dt>foo </dt>
4351 <dd>bar</dd></dl></li></ul>
4357 Definition Lists: Mixed Lists: Test 10
4361 <ul><li><ol><li><dl><dt>foo </dt>
4362 <dd>bar</dd></dl></li></ol></li></ul>
4366 # This is a regression test for T175099
4367 # html/php+tidy is insufficient since Tidy covers up the bug.
4368 # But once Tidy is replaced with RemexHTML, html/php+tidy is good enough
4370 Definition Lists: Mixed Lists: Test 11
4377 <ul><li> b</li></ul></dd></dl>
4381 # The Parsoid team disagrees with the PHP parser's seemingly-random
4382 # rules regarding dd/dt on the next two tests. Parsoid is more
4383 # consistent, and recognizes the shared nesting and keeps the
4384 # still-open tags around until the nesting is complete.
4385 # (And tidy again converts <dt> to <dd> before 'bar'.)
4388 Definition Lists: Mixed Lists: Test 12
4393 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4394 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4395 <dl><dt>boo </dt>
4396 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4451 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4452 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4456 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4457 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4466 # Another case where tidy converts a <dt> to a <dd> (but Parsoid doesn't).
4468 # * The test is wrong, there are two colons where there should be :;
4469 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4471 Definition Lists: Weird Ones: Test 1
4473 *#;*::;; foo : bar (who uses this?)
4475 <ul><li><ol><li><dl><dt> foo </dt>
4476 <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>
4495 <dt>bar (who uses this?)</dt>
4527 <dt> foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4528 <dd data-parsoid='{"stx":"row"}'> bar (who uses this?)</dd>
4540 Definition Lists: colons occurring in tags
4558 <dt><span>a:b</span></dt>
4585 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4587 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4588 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4589 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4590 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4592 <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>
4593 <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>
4594 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4598 Definition Lists: colons and tables 1
4610 </td></tr></table></dd></dl>
4614 </td></tr></table></dd></dl>
4618 # Parsoid's output (as documented below) differs from php's in this case.
4619 # This is probably a bug. If we fixup parsoid to match php's output, the
4620 # above test should pass and the below test case can be removed. It is
4621 # unclear which output is more desirable.
4624 Definition Lists: colons and tables 2
4636 </td></tr></table></dd>
4640 </td></tr></table></dd></dl>
4644 Definition Lists: template interaction
4646 ::{{definition_list}}
4649 ::{{definition_list}}
4654 <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">
4655 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4657 <dl><dd data-parsoid='{}'>one
4658 <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">
4659 </span><dd about="#mwt2">two
4661 <dd>three</dd></dl></dd>
4662 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4670 External links: non-bracketed
4672 Non-bracketed: http://example.com
4674 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4678 # parsoid doesn't explicitly mark autonumbered links, see T55505
4680 External links: numbered
4682 Numbered: [http://example.com]
4683 Numbered: [http://example.net]
4684 Numbered: [http://example.com]
4686 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4687 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4688 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4691 <p>Numbered: <a rel="mw:ExtLink" href="http://example.com"></a>
4692 Numbered: <a rel="mw:ExtLink" href="http://example.net"></a>
4693 Numbered: <a rel="mw:ExtLink" href="http://example.com"></a></p>
4697 External links: specified text
4699 Specified text: [http://example.com link]
4701 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4706 External links: trail
4708 Linktrails should not work for external links: [http://example.com link]s
4710 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4715 External links: dollar sign in URL
4717 http://example.com/1$2345
4719 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4723 # parsoid doesn't explicitly mark autonumbered links, see T55505
4725 External links: dollar sign in URL (autonumber)
4727 [http://example.com/1$2345]
4729 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4732 <p><a rel="mw:ExtLink" href="http://example.com/1$2345"></a></p>
4736 External links: open square bracket forbidden in URL (T6377)
4738 parsoid=wt2html,wt2wt,html2html
4740 http://example.com/1[2345
4742 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4745 <p><a rel="mw:ExtLink" href="http://example.com/1">http://example.com/1</a>[2345</p>
4749 External links: open square bracket forbidden in URL (named) (T6377)
4751 parsoid=wt2html,html2html
4753 [http://example.com/1[2345]
4755 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4758 <p><a rel="mw:ExtLink" href="http://example.com/1">[2345</a></p>
4761 # parsoid adds a space before the link name
4763 External links: open square bracket forbidden in URL (named) (T6377)
4766 [http://example.com/1 [2345]
4768 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4773 External links: nowiki in URL link text (T8230)
4775 [http://example.com/ <nowiki>''example site''</nowiki>]
4777 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4782 External links: newline forbidden in text (T8230 regression check)
4784 [http://example.com/ first
4787 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4793 External links: Pipe char between url and text
4795 [http://example.com | link]
4797 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4802 External links: protocol-relative URL in brackets
4804 [//example.com/ Test]
4806 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4810 # parsoid doesn't explicitly mark autonumbered links, see T55505
4812 External links: protocol-relative URL in brackets without text
4816 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4819 <p><a rel="mw:ExtLink" href="//example.com"></a></p>
4823 External links: protocol-relative URL in free text is left alone
4827 <p>//example.com/Foo
4832 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4834 foo//example.com/Foo
4836 <p>foo//example.com/Foo
4840 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4842 External links: with no contents
4844 parsoid=wt2html,wt2wt
4846 [http://en.wikipedia.org/wiki/Foo]
4848 [[wikipedia:Foo|Bar]]
4850 [[wikipedia:Foo|<span>Bar</span>]]
4852 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4853 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4854 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4857 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4858 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4859 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4863 External links: Free with trailing punctuation
4873 http://example.com/url_with_(brackets)
4874 (http://example.com/url_without_brackets)
4875 http://example.com/url_with_entity&
4876 http://example.com/url_with_entity&
4877 http://example.com/url_with_entity&
4878 http://example.com/url_with_entity
4879 http://example.com/url_with_entity 
4880 http://example.com/url_with_entity 
4881 http://example.com/url_with_entity<
4882 http://example.com/url_with_entity<
4883 http://example.com/url_with_entity<
4885 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4886 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4887 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4888 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4889 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4890 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4891 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4892 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4893 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4894 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4895 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4896 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4897 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4898 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4899 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4900 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4901 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4902 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4903 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4906 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>,
4907 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>;
4908 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>\
4909 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>.
4910 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:
4911 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>!
4912 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>?
4913 <a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)
4914 <a rel="mw:ExtLink" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4915 (<a rel="mw:ExtLink" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4916 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4917 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4918 <a rel="mw:ExtLink" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4919 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4920 <a rel="mw:ExtLink" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4921 <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>
4922 <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>
4923 <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>
4924 <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>
4928 External links: tricky Parsoid html2html case
4930 parsoid=wt2html,wt2wt,html2html
4932 http://example.com/url_with_entity&amp;
4934 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4937 <p><a rel="mw:ExtLink" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4941 External links: Free with trailing quotes (T113666)
4943 '''News:''' Stuff here
4947 <p><b>News:</b> Stuff here
4948 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4951 <p><b>News:</b> Stuff here</p>
4952 <p><a rel="mw:ExtLink" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4956 External links: with entity
4958 [http:// www.librarieswithoutborders.org Libraries without borders]
4960 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4963 <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>
4967 External links: Lone protocols are never linked (T105697)
4986 External links: No preceding word characters allowed (T67278)
4988 NOPEhttp://example.com
4989 N0http://example.com
4990 ok:http://example.com
4991 ok-http://example.com
4993 <p>NOPEhttp://example.com
4994 N0http://example.com
4995 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4996 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5001 External links: nofollow domain exception
5003 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
5005 <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>.
5012 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5014 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5019 External image from https
5021 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5023 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
5028 External image (when not allowed)
5030 wgAllowExternalImages=0
5032 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
5034 <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>
5039 Link to non-http image, no img tag
5041 Link to non-http image, no img tag: ftp://example.com/test.jpg
5043 <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>
5048 External links: terminating separator
5050 Terminating separator: http://example.com/thing,
5052 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
5057 External links: intervening separator
5059 Intervening separator: http://example.com/1,2,3
5061 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
5066 External links: old bug with URL in query
5068 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
5070 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
5075 External links: old URL-in-URL bug, mixed protocols
5077 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
5079 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
5083 # Since Parsoid is starting to emit canonical wikitext for links,
5084 # [http://example.com http://example.com] will not RT back to that
5087 External links: URL in text
5091 URL in text: [http://example.com http://example.com]
5093 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5096 <p>URL in text: <a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5100 External links: Clickable images
5102 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
5104 <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>
5107 <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>
5111 External links: raw ampersand
5113 Old & use: http://x&y
5115 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5120 External links: encoded ampersand
5122 Old & use: http://x&y
5124 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
5127 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y">http://x&y</a></p>
5131 External links: encoded equals (T8102)
5133 http://example.com/?foo=bar
5135 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
5138 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
5142 ## Note that parsoid doesn't explicit mark autonumbered links, nor
5143 ## does it number them. As discussed in T55505, we can identify
5144 ## autonumbered links via CSS.
5148 External links: [raw ampersand]
5150 Old & use: [http://x&y]
5152 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5155 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5158 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5159 # mode will return the [raw ampersand] wikitext
5161 External links: [encoded ampersand]
5163 parsoid=wt2html,wt2wt,html2html
5165 Old & use: [http://x&y]
5167 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5170 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" href="http://x&y"></a></p>
5174 External links: [raw equals]
5176 [http://example.com/?foo=bar]
5178 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5181 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5184 # note that parsoid html is identical to [raw equals] case; so html2wt
5185 # mode will return the [raw equals] wikitext
5187 External links: [encoded equals] (T8102)
5189 parsoid=wt2html,wt2wt,html2html
5191 [http://example.com/?foo=bar]
5193 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5196 <p><a rel="mw:ExtLink" href="http://example.com/?foo=bar"></a></p>
5199 # xxx parsoid strips the IDN character, so the round-trip tests will
5200 # obviously fail and are disabled. --cscott
5202 External links: [IDN ignored character reference in hostname; strip it right off]
5204 parsoid=wt2html,wt2wt,html2html
5206 [http://e‌xample.com/]
5208 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5211 <p><a rel="mw:ExtLink" href="http://example.com/"></a></p>
5214 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5215 # Where an external link could easily circumvent the sanitization of the text of
5216 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5217 # test demands a higher standard. That's a bit strange.
5221 # http://example.com -> [http://example.com|http://example.com]
5222 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5224 # The first example is sanitized, but the second is not. Any security benefits
5225 # from this production are trivial to circumvent. Either remove this test and
5226 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5227 # the test accordingly.
5231 # xxx parsoid strips the IDN character, so the round-trip tests will
5232 # obviously fail and are disabled. --cscott
5234 External links: IDN ignored character reference in hostname; strip it right off
5236 parsoid=wt2html,html2html
5238 http://e‌xample.com/
5240 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5243 <p><a rel="mw:ExtLink" href="http://example.com/">http://example.com/</a></p>
5247 External links: www.jpeg.org (T2554)
5251 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5255 # parsoid doesn't explicitly mark autonumbered links, see T55505
5257 External links: URL within URL (T2002)
5259 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5261 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5264 <p><a rel="mw:ExtLink" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5268 T2361: URL inside bracketed URL
5270 [http://www.example.com/foo http://www.example.com/bar]
5272 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5277 T2361: URL within URL, not bracketed
5279 http://www.example.com/foo?=http://www.example.com/bar
5281 <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>
5286 T2289: ">"-token in URL-tail
5288 http://www.example.com/<hello>
5290 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5295 T2289: literal ">"-token in URL-tail
5297 http://www.example.com/<b>html</b>
5299 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5302 <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>
5306 T2289: ">"-token in bracketed URL
5308 [http://www.example.com/<hello> stuff]
5310 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5315 T2289: literal ">"-token in bracketed URL
5317 [http://www.example.com/<b>html</b> stuff]
5319 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5324 T2289: literal double quote at end of URL
5326 http://www.example.com/"hello"
5328 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5333 T2289: literal double quote in bracketed URL
5335 [http://www.example.com/"hello" stuff]
5337 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5342 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5344 [http://www.example.com test]
5346 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5351 External links: link text with spaces
5353 [http://www.example.com a b c]
5354 [http://www.example.com ''a'' ''b'']
5356 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5357 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5362 External links: wiki links within external link (T5695)
5364 parsoid=wt2html,html2html
5366 [http://example.com [[wikilink]] embedded in ext link]
5368 <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>
5371 <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>
5375 T2787: Links with one slash after the url protocol are invalid
5379 [http:/example.com title]
5381 <p>http:/example.com
5382 </p><p>[http:/example.com title]
5387 Bracketed external links with template-generated invalid target
5389 [{{echo|http:/example.com}} title]
5391 <p>[http:/example.com title]
5395 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5397 Broken wikilinks (but not external links) prevent templates from closing
5401 [http://example.com x
5403 {{echo|[http://example.com x}}
5409 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5410 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5412 </p><p>{{echo|[[Foo}}
5415 <p>[<a rel="mw:ExtLink" href="http://example.com">http://example.com</a> x</p>
5416 <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>
5418 <p>{{echo|[[Foo}}</p>
5422 Wikilinks with embedded newlines are not broken
5433 <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>
5445 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5449 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5450 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5454 T4702: Mismatched <i>, <b> and <a> tags are invalid
5456 ''[http://example.com text'']
5457 [http://example.com '''text]'''
5458 ''Something [http://example.com in italic'']
5459 ''Something [http://example.com mixed''''', even bold]'''
5460 '''''Now [http://example.com both''''']
5462 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5463 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5464 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5465 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5466 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5474 http://www.example.com/?title=AT%26T
5476 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5479 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5482 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5483 # % is actually legal in HTML5. Any change in output would need testing though.
5485 T6781, T7267: %25 in URL
5487 http://www.example.com/?title=100%25_Bran
5489 <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>
5492 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5496 T6781, T7267: %28, %29 in URL
5498 http://www.example.com/?title=Ben-Hur_%281959_film%29
5500 <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>
5503 <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>
5508 T6781: %26 in autonumber URL
5510 [http://www.example.com/?title=AT%26T]
5512 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5515 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T"></a></p>
5519 T6781, T7267: %26 in autonumber URL
5521 [http://www.example.com/?title=100%25_Bran]
5523 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5526 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=100%25_Bran"></a></p>
5530 T6781, T7267: %28, %29 in autonumber URL
5532 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5534 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5537 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5542 T6781: %26 in bracketed URL
5544 [http://www.example.com/?title=AT%26T link]
5546 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5549 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=AT%26T">link</a></p>
5553 T6781, T7267: %25 in bracketed URL
5555 [http://www.example.com/?title=100%25_Bran link]
5557 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5562 T6781, T7267: %28, %29 in bracketed URL
5564 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5566 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5569 <p><a rel="mw:ExtLink" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5573 External link containing a period in the anchor. (T65947)
5575 [//foo.org/bar#baz. bang]
5577 [//foo.org/bar. bang]
5579 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5580 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5583 <p><a rel="mw:ExtLink" href="//foo.org/bar#baz.">bang</a></p>
5584 <p><a rel="mw:ExtLink" href="//foo.org/bar.">bang</a></p>
5588 External link containing a single quote. (T65947)
5592 [//foo.org/bar'baz bang]
5594 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5595 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5598 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz"></a></p>
5599 <p><a rel="mw:ExtLink" href="//foo.org/bar'baz">bang</a></p>
5603 External link containing double-single-quotes in text '' (T6598 sanity check)
5605 Some [http://example.com/ pretty ''italics'' and stuff]!
5607 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5612 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5614 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5616 <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>
5621 External link containing double-single-quotes with no space separating the url from text in italics
5623 [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]].]
5625 <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>
5628 <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>
5630 <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>
5634 External link with comments in link text
5636 [http://www.google.com Google <!-- comment -->]
5638 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5641 <p><a rel="mw:ExtLink" href="http://www.google.com">Google <!-- comment --></a></p>
5645 External link to bare IPv4 address
5647 [http://192.168.0.1 Link]
5649 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5652 <p><a rel="mw:ExtLink" href="http://192.168.0.1">Link</a></p>
5656 URL-encoding in URL functions (single parameter)
5658 {{localurl:Some page|amp=&}}
5660 <p>/index.php?title=Some_page&amp=&
5665 URL-encoding in URL functions (multiple parameters)
5667 {{localurl:Some page|q=?&=&}}
5669 <p>/index.php?title=Some_page&q=?&amp=&
5676 http://example.com/index.php?foozoid%5B%5D=bar
5678 http://example.com/index.php?foozoid[]=bar
5680 <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>
5681 </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>
5684 <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>
5686 <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>
5690 IPv6 urls, autolink format (T23261)
5692 http://[2404:130:0:1000::187:2]/index.php
5694 Examples from RFC 2373, section 2.2:
5695 * http://[1080::8:800:200C:417A]/unicast
5696 * http://[FF01::101]/multicast
5697 * http://[::1]/loopback
5698 * http://[::]/unspecified
5699 * http://[::13.1.68.3]/ipv4compat
5700 * http://[::FFFF:129.144.52.38]/ipv4compat
5702 Examples from RFC 2732, section 2:
5703 * http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5704 * http://[1080:0:0:0:8:800:200C:417A]/index.html
5705 * http://[3ffe:2a00:100:7031::1]
5706 * http://[1080::8:800:200C:417A]/foo
5707 * http://[::192.9.5.5]/ipng
5708 * http://[::FFFF:129.144.52.38]:80/index.html
5709 * http://[2010:836B:4179::836B:4179]
5712 <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>
5713 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5715 <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>
5716 <li> <a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5717 <li> <a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5718 <li> <a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5719 <li> <a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5720 <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>
5721 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5723 <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>
5724 <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>
5725 <li> <a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5726 <li> <a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5727 <li> <a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5728 <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>
5729 <li> <a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5732 <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>
5734 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5735 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5736 <li> <a rel="mw:ExtLink" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5737 <li> <a rel="mw:ExtLink" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5738 <li> <a rel="mw:ExtLink" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5739 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5740 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5742 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5743 <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>
5744 <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>
5745 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5746 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5747 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5748 <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>
5749 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5753 IPv6 urls, bracketed format (T23261)
5755 [http://[2404:130:0:1000::187:2]/index.php test]
5757 Examples from RFC 2373, section 2.2:
5758 * [http://[1080::8:800:200C:417A] unicast]
5759 * [http://[FF01::101] multicast]
5760 * [http://[::1]/ loopback]
5761 * [http://[::] unspecified]
5762 * [http://[::13.1.68.3] ipv4compat]
5763 * [http://[::FFFF:129.144.52.38] ipv4compat]
5765 Examples from RFC 2732, section 2:
5766 * [http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5767 * [http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5768 * [http://[3ffe:2a00:100:7031::1] 3]
5769 * [http://[1080::8:800:200C:417A]/foo 4]
5770 * [http://[::192.9.5.5]/ipng 5]
5771 * [http://[::FFFF:129.144.52.38]:80/index.html 6]
5772 * [http://[2010:836B:4179::836B:4179] 7]
5775 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5776 </p><p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2373">RFC 2373</a>, section 2.2:
5778 <ul><li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5779 <li> <a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5780 <li> <a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5781 <li> <a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5782 <li> <a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5783 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5784 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5786 <ul><li> <a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5787 <li> <a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5788 <li> <a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5789 <li> <a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5790 <li> <a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5791 <li> <a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5792 <li> <a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5795 <p><a rel="mw:ExtLink" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5797 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink">RFC 2373</a>, section 2.2:</p>
5798 <ul><li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5799 <li> <a rel="mw:ExtLink" href="http://[FF01::101]">multicast</a></li>
5800 <li> <a rel="mw:ExtLink" href="http://[::1]/">loopback</a></li>
5801 <li> <a rel="mw:ExtLink" href="http://[::]">unspecified</a></li>
5802 <li> <a rel="mw:ExtLink" href="http://[::13.1.68.3]">ipv4compat</a></li>
5803 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5805 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink">RFC 2732</a>, section 2:</p>
5806 <ul><li> <a rel="mw:ExtLink" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5807 <li> <a rel="mw:ExtLink" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5808 <li> <a rel="mw:ExtLink" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5809 <li> <a rel="mw:ExtLink" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5810 <li> <a rel="mw:ExtLink" href="http://[::192.9.5.5]/ipng">5</a></li>
5811 <li> <a rel="mw:ExtLink" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5812 <li> <a rel="mw:ExtLink" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5816 Non-extlinks in brackets
5825 [{{echo|foo}} ''bar'']
5826 [{{echo|foo}}l's] errand
5827 [{{echo|foo}}l's errand]
5829 [url=http://example.com]
5830 [http:// bare protocols don't count]
5843 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5844 [http:// bare protocols don't count]
5852 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span>]
5853 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> bar]
5854 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}"}'>foo</span> <i>bar</i>]
5855 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span>] errand
5856 [<span typeof="mw:Placeholder" data-parsoid='{"src":"{{echo|foo}}l's"}'>fool's</span> errand]
5857 [<span typeof="mw:Placeholder" data-parsoid='{"src":"url={{echo|foo}}"}'>url=foo</span>]
5858 [url=<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>]
5859 [http:// bare protocols don't count]</p>
5863 Percent encoding in external links
5865 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5867 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5870 <p><a rel="mw:ExtLink"
5871 href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5875 Use url link syntax for links where the content is equal the link target
5879 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5882 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a></p>
5886 Parenthesis in external links, especially URL links
5890 http://example.com/test)
5892 http://example.com/(test)
5894 http://example.com/((test)
5896 (http://example.com/(test))
5898 (http://example.com/(test)))))
5900 http://example.com/a)b
5902 [http://example.com) foo]
5904 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5905 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5906 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5907 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5908 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5909 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5910 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5911 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5914 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a>)</p>
5915 <p><a rel="mw:ExtLink" href="http://example.com/test">http://example.com/test</a>)</p>
5916 <p><a rel="mw:ExtLink" href="http://example.com/(test)">http://example.com/(test)</a></p>
5917 <p><a rel="mw:ExtLink" href="http://example.com/((test)">http://example.com/((test)</a></p>
5918 <p>(<a rel="mw:ExtLink" href="http://example.com/(test))">http://example.com/(test))</a></p>
5919 <p>(<a rel="mw:ExtLink" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5920 <p><a rel="mw:ExtLink" href="http://example.com/a)b">http://example.com/a)b</a></p>
5921 <p><a rel="mw:ExtLink" href="http://example.com)">foo</a></p>
5925 Parenthesis in external links, w/ transclusion or comment
5927 (http://example.com/{{echo|hi}})
5929 (http://example.com<!-- hi -->)
5931 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5932 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5935 <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>
5937 <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>
5941 Serialize <a> tags with invalid link targets as plain text
5943 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5945 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5946 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5947 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5948 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5951 <nowiki>*</nowiki>text
5952 <nowiki>[[foo]]</nowiki>
5953 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5957 mw:ExtLink -vs- mw:WikiLink (T94723)
5961 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5962 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5963 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5964 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5966 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5967 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5975 [[:en:European_Robin|European Robin]]
5976 [[:en:European_Robin|European Robin]]
5980 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5984 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5986 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5997 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5999 Normal text. '''''Bold italic text.''''' Normal text.
6001 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
6002 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
6007 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
6008 # parser strips. The wikitext contains just the first half of the bold
6011 Unclosed and unmatched quotes
6013 '''''Bold italic text '''with bold deactivated''' in between.'''''
6015 '''''Bold italic text ''with italic deactivated'' in between.'''''
6019 ..spanning two paragraphs (should not work).'''
6021 '''Bold tag left open
6023 ''Italic tag left open
6027 <!-- Unmatching number of opening, closing tags: -->
6028 '''This year''''s election ''should'' beat '''last year''''s.
6030 ''Tom'''s car is bigger than ''Susan'''s.
6032 Plain ''italic'''s plain
6034 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6035 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6036 </p><p><b>Bold text..</b>
6037 </p><p>..spanning two paragraphs (should not work).
6038 </p><p><b>Bold tag left open</b>
6039 </p><p><i>Italic tag left open</i>
6041 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6042 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6043 </p><p>Plain <i>italic'</i>s plain
6046 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
6047 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
6048 </p><p><b>Bold text..</b>
6049 </p><p>..spanning two paragraphs (should not work).<b></b>
6050 </p><p><b>Bold tag left open</b>
6051 </p><p><i>Italic tag left open</i>
6054 <!-- Unmatching number of opening, closing tags: -->
6055 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
6056 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
6057 </p><p>Plain <i>italic'</i>s plain
6064 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
6067 # This should not produce <table></table> as <table><tr><td></td></tr></table>
6068 # is the bare minimum required by the spec, see:
6069 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
6070 # Parsoid team replies: empty table tags are legal in HTML5
6072 A table with no data.
6085 A table with stray table end tags on start tag line (wt2html)
6089 {|style="color: red;"|}
6091 {|style="color: red;" |}
6095 {|style="color: red;"|} id="foo"
6099 {|style="color: red;" |} id="foo"
6103 <table style="color: red;"></table>
6105 <table style="color: red;">
6111 <table style="color: red;" id="foo">
6117 <table style="color: red;" id="foo">
6126 A table with no data (take 2)
6134 # A table with nothing but a caption is invalid XHTML, we might want to render
6135 # this as <p>caption</p>
6136 # Parsoid team replies: table with only a caption is legal in HTML5
6138 A table with nothing but a caption
6146 </caption><tr><td></td></tr></table>
6149 <table><caption> caption</caption></table>
6153 A table with caption with default-spaced attributes and a table row
6156 |+ style="color: red;" | caption1
6162 <caption style="color: red;"> caption1
6171 A table with captions with non-default spaced attributes and a table row
6174 |+style="color: red;"|caption2
6175 |+ style="color: red;"| caption3
6181 <caption style="color: red;">caption2
6183 <caption style="color: red;"> caption3
6192 Table td-cell syntax variations
6196 | foo bar foo || baz
6197 | style='color:red;' | baz
6198 | style='color:red;' || baz
6205 <td> foo bar foo </td>
6208 <td style="color:red;"> baz
6210 <td> style='color:red;' </td>
6238 Simple table but with multiple dashes for row wikitext
6257 Multiplication table
6259 {| border="1" cellpadding="2"
6260 |+Multiplication table
6262 ! × !! 1 !! 2 !! 3
6280 <table border="1" cellpadding="2">
6281 <caption>Multiplication table
6328 Accept "||" in table headings
6343 Accept "!!" in table data
6357 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6362 Accept "||" in indented table headings
6372 </th></tr></table></dd></dl>
6377 Accept "!!" in templates
6391 <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>
6395 Accept "!!" in table headings after newline
6412 <p>b!!c</p></th></tr>
6417 Accept "!!" in table data of mixed wikitext / html syntax
6421 <tr><td>b!!c</td></tr>
6434 <tbody><tr><th>a</th></tr>
6435 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6440 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6457 Accept "| !" at start of line in tables (ignore !-attribute)
6461 | !style="color:red" | bar
6473 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 +/-
6477 |style='color:red;'|+1
6478 |style='color:blue;'|-1
6490 <td style="color:red;">+1
6492 <td style="color:blue;">-1
6516 |rowspan=2| Cell 2, row 1 (and 2)
6527 <td rowspan="2"> Cell 2, row 1 (and 2)
6545 {| bgcolor=#ABCDEF border=2
6550 |the original table again
6558 <table bgcolor="#ABCDEF" border="2">
6566 <td>the original table again
6572 Invalid attributes in table cell (T3830)
6586 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6590 | title="foo<nowiki>|</nowiki>" |bar
6591 | title="foo<nowiki>|</nowiki>" bar
6598 <td title="foo|">bar
6600 <td> title="foo|" bar
6605 <tbody><tr><td title="foo">bar</td>
6606 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6607 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6611 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6612 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6613 # *2wt modes will fail.
6615 Table security: embedded pipes
6617 parsoid=wt2html,html2html
6620 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6624 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6625 <td>]" onmouseover="alert(document.cookie)">test
6633 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" href="ftp://%7Cx" data-parsoid='{"stx":"url","a":{"href":"ftp://%7Cx"},"sa":{"href":"ftp://|x"}}'>ftp://%7Cx</a></td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'>]" onmouseover="alert(document.cookie)">test</td></tr></tbody></table>
6637 Element attributes with double ! should not be broken up by <th>
6640 ! hi <div class="!!">ha</div> ho
6645 <th> hi <div class="!!">ha</div> ho
6650 <tbody><tr><th> hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6655 ! and || in element attributes should not be parsed as <th>/<td>
6658 | <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6663 <td> <div style="color: red !important;" data-contrived="put this here ||">hi</div>
6668 <tbody><tr><td> <div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6672 # FIXME: The output seems broken. Filed as T110268.
6674 ! and || in td attributes should not be parsed as <th>/<td>
6679 | style="color: red !important;" data-contrived="put this here ||" | foo
6684 <td> style="color: red !important;" data-contrived="put this here </td>
6690 <tbody><tr><td> style="color: red !important;" data-contrived="put this here </td><td data-parsoid='{"stx":"row","a":{"\"":null},"sa":{"\"":""},"autoInsertedEnd":true}'> foo</td></tr>
6695 Break on | in element attribute in template
6697 parsoid=wt2html,html2html
6699 {{echo|1=<div class="hi|ho">ha</div>}}
6701 <p>ho">ha</div>
6704 <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>
6708 Break on | in element attribute name in template
6710 {{echo|<div cla|ss="hiho">ha</div>}}
6712 <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>
6716 Don't break on | in extension attribute in template
6718 {{echo|<ref name="hi|ho">ha</ref>}}
6722 <p><span about="#mwt2" class="mw-ref" id="cite_ref-hi|ho_1-0" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" 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|ho-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
6724 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-hi|ho-1" id="cite_note-hi|ho-1"><a href="./Main_Page#cite_ref-hi|ho_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-hi|ho-1" class="mw-reference-text">ha</span></li></ol>
6727 ## We don't support roundtripping of these attributes in Parsoid.
6728 ## Selective serialization takes care of preventing dirty diffs.
6729 ## But, on edits, we dirty-diff the invalid attribute text.
6731 Invalid text in table attributes should be discarded
6735 {| <span>boo</span> style='border:1px solid black'
6736 | <span>boo</span> style='color:blue' | 1
6737 |<span>boo</span> style='color:blue'| 2
6740 <table style="border:1px solid black">
6742 <td style="color:blue"> 1
6744 <td style="color:blue"> 2
6748 <table style="border:1px solid black">
6750 <td style="color:blue"> 1</td>
6751 <td style="color:blue"> 2</td>
6757 Invalid text in table attributes should be preserved by selective serializer
6760 "modes": ["selser"],
6762 ["td:first-child", "text", "abc"],
6763 ["td + td", "text", "xyz"]
6767 {| <span>boo</span> style='border:1px solid black'
6768 | <span>boo</span> style='color:blue' | 1
6769 |<span>boo</span> style='color:blue'| 2
6772 {| <span>boo</span> style='border:1px solid black'
6773 | <span>boo</span> style='color:blue' |abc
6774 |<span>boo</span> style='color:blue'|xyz
6779 1. Template-generated table cell attributes and cell content
6784 || {{table_attribs_5}}
6785 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6786 |align=center {{table_attribs}}
6787 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6792 <td style="color:red;">Foo
6794 <td style="color:red;">Foo
6796 <td> style="color:red;"</td>
6799 <td style="color:red;">Foo
6801 <td align="center" style="color:red;">Foo
6803 <td align="center" style="color:red;">Foo
6809 2. Template-generated table cell attributes and cell content
6812 |{{table_attribs_2}}
6817 <td style="color:red;">Foo
6825 <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>
6826 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6831 3. Template-generated table cell attributes and cell content
6834 !align=center {{table_header_cells}}
6836 |align=center {{table_cells}}
6841 <th align="center" style="color:red;">Foo</th>
6842 <th style="color:red;"><i>Bar</i></th>
6843 <th style="color:brown;"><i>Foo</i> and Baz
6846 <td align="center" style="color:red;">Foo</td>
6847 <td style="color:red;"><i>Bar</i></td>
6848 <td style="color:brown;"><i>Foo</i> and Baz
6853 <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>
6854 <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>
6859 4. Template-generated table cell attributes and cell content inside a templated table
6862 !align=center {{table_header_cells}}
6864 |align=center {{table_cells}}
6869 <th align="center" style="color:red;">Foo</th>
6870 <th style="color:red;"><i>Bar</i></th>
6871 <th style="color:brown;"><i>Foo</i> and Baz
6874 <td align="center" style="color:red;">Foo</td>
6875 <td style="color:red;"><i>Bar</i></td>
6876 <td style="color:brown;"><i>Foo</i> and Baz
6880 <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}}]}'>
6881 <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>
6883 <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>
6887 ## Edge case fix to prevent future regressions
6889 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6892 |{{table_attribs_7}}
6897 <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>
6899 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
6903 Table with row followed by newlines and table heading
6905 parsoid=wt2html,html2html
6923 Table with empty line following the start tag
6925 parsoid=wt2html,html2html
6943 Table attributes with empty value
6945 parsoid=wt2html,html2html
6958 <tbody><tr><td style=""> hello</td></tr>
6963 Wikitext table with a lot of comments
6986 Wikitext table comments represented in parsoid dom
6988 {|<!--c1--><!--c2-->
6999 <table><!--c1--><!--c2-->
7000 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
7001 <td data-parsoid='{"autoInsertedEnd":true}'> x</td></tr>
7006 Wikitext table with double-line table cell
7023 Table cell with a single comment
7040 Table-cell after a comment-only-empty-line
7057 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
7059 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'> b</td></tr>
7065 Build table with {{!}}
7067 {{{!}} class="wikitable"
7070 {{!}}- style="color:red;"
7071 {{!}} data {{!}}{{!}} style="color:red;" {{!}} second data
7074 <table class="wikitable">
7080 <tr style="color:red;">
7082 <td style="color:red;"> second data
7088 Build table with pipe as data
7090 {| class="wikitable"
7093 |- style="color:red;"
7094 | data || style="color:red;" | second data
7096 | style="color:red;" | data with | || style="color:red;" | second data with |
7098 || data with | ||| second data with |
7101 <table class="wikitable">
7107 <tr style="color:red;">
7109 <td style="color:red;"> second data
7112 <td style="color:red;"> data with | </td>
7113 <td style="color:red;"> second data with |
7116 <td> data with | </td>
7117 <td> second data with |
7123 Build table with wikilink
7125 {| class="wikitable"
7126 ! header || second header
7127 |- style="color:red;"
7128 | data [[Main Page|linktext]] || second data [[Main Page|linktext]]
7130 | data || second data [[Main Page|link|text with pipe]]
7133 <table class="wikitable">
7138 <tr style="color:red;">
7139 <td> data <a href="/wiki/Main_Page" title="Main Page">linktext</a> </td>
7140 <td> second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
7144 <td> second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
7149 # The expected HTML structure in this test is debatable. The PHP parser does
7150 # not parse this kind of table at all. The main focus for Parsoid is on
7151 # round-tripping, so this output is ok for now. TODO: revisit!
7153 Wikitext table with html-syntax row
7163 <td>foo</td></tr></tbody></table>
7167 Implicit <td> after a |-
7169 parsoid=wt2html,html2html
7184 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7185 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7187 </tr></tbody></table>
7191 Lists should be recognized in an implicit <td> context
7193 parsoid=wt2html,html2html
7210 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7211 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7213 </tr></tbody></table>
7217 Table cells not properly parsed in an implicit-td context
7221 {{table_attribs_4}} || a || b
7226 <td style="background-color:#DC241f;" width="10px"></td>
7233 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7234 <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>
7238 Parsoid: Round-trip tables directly followed by content (T53219)
7240 parsoid=wt2html,wt2wt
7265 Parsoid: Default to a newline after tables in new content (T53219)
7270 <tr><td>foo</td></tr></tbody></table> bar
7272 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7277 <nowiki> </nowiki>bar
7285 Parsoid: newline inducing block nodes don't suppress <nowiki>
7297 Parsoid: Row-syntax table headings followed by comment & table cells
7299 parsoid=wt2html,wt2wt
7303 <!-- foo --> || baz || quux
7317 <tbody><tr><th> foo </th><th> bar
7318 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7323 Parsoid: Recover better from broken table attributes
7343 <p>foo</p></td></tr>
7348 Tables: Digest broken attributes on table and tr tag
7359 <tr class='mw-empty-elt'></tr>
7360 <tr class='mw-empty-elt'></tr>
7364 # T137406: Whitespace in the HTML
7366 1. Generate correct wikitext for tables with thead/tbody/tfoot
7371 <caption>Test</caption>
7412 <caption>Test</caption>
7432 # T137406: No whitespace in the HTML
7434 2. Generate correct wikitext for tables with thead/tbody/tfoot
7438 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7448 Testing serialization after deletion in references
7457 hi <ref><div id="x">ho</div></ref>
7467 Testing serialization after deletion of table cells
7470 "modes": ["wt2wt", "selser"],
7478 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7488 Testing selser after addition of new row before first row (T125419)
7491 "modes": ["wt2wt", "selser"],
7493 [ "tr", "before", "<tr><td>X</td></tr>" ]
7509 Serialize new table rows in a HTML table using HTML tags
7512 "modes": ["wt2wt", "selser"],
7514 [ "tr", "before", "<tr><td>X</td></tr>" ]
7518 <table><tr><td>a</td></tr></table>
7520 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7524 Serialize new table cells in a HTML row using HTML tags
7527 "modes": ["wt2wt", "selser"],
7529 [ "td", "before", "<td>X</td>" ]
7533 <table><tr><td>a</td></tr></table>
7535 <table><tr><td>X</td><td>a</td></tr></table>
7539 Wikitext tables can be nested inside HTML tables
7543 <table data-parsoid='{"stx":"html"}'>
7546 <tr><td>foo</td></tr>
7561 Serialize wikitext list items as HTML list items when embedded in a HTML list
7565 <ul data-parsoid='{"stx": "html"}'>
7566 <li data-parsoid='{}'>a</li>
7576 # SSS FIXME: Is this actually a good thing given the
7577 # odd nested list output that is generated by MW?
7578 # <ul><li>foo<ul>..</ul></li></ul> instead of
7579 # <ul><li>foo</li><ul>..</ul></ul>
7581 Wikitext lists can be nested inside HTML lists
7585 <ul data-parsoid='{"stx": "html"}'>
7586 <li data-parsoid='{"stx": "html"}'>a
7591 <ul data-parsoid='{"stx": "html"}'>
7614 Plain link, capitalized
7618 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7623 Plain link, uncapitalized
7627 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7634 [[Main Page|The Main Page]]
7636 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7641 Piped link with comment in link text
7643 [[Main Page|The Main<!--front--> Page]]
7645 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7650 Piped link with multiple pipe characters in link text
7652 [[Main Page||The|Main|Page|]]
7654 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7657 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7661 Piped link with no link text
7663 [[Thomas Bek (bishop of St David's)|]]
7665 <p>[[Thomas Bek (bishop of St David's)|]]
7668 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7672 Piped link with empty link text
7674 [[Main Page|<nowiki/>]] - empty nowiki
7675 [[Main Page| ]] - empty space
7676 [[Main Page| ]] - empty non breaking space
7678 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7679 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7680 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7683 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7684 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7685 <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>
7693 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7698 Broken link with fragment
7700 [[Zigzagzogzagzig#zug]]
7702 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7707 Special page link with fragment
7709 [[Special:Version#anchor]]
7711 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7716 Nonexistent special page link with fragment
7718 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7720 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7727 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7729 <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>
7736 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7738 <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>!!!
7749 T45661: Piped links with identical prefixes
7751 [[prefixed article|prefixed articles with spaces]]
7753 [[prefixed article|prefixed articlesaoeu]]
7755 [[Main Page|Main Page test]]
7757 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7758 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7759 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7765 Link with HTML entity in suffix / tail
7767 [[Main Page]]", [[Main Page]]a
7769 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7772 <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>
7776 Link with 3 brackets
7787 Link with 4 brackets
7791 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7796 Piped link with 3 brackets
7798 [[[main page|the main page]]]
7800 <p>[[[main page|the main page]]]
7805 Piped link with extlink-like text
7808 [[Main Page|This is a [bar]]]
7811 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7812 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7813 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7816 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7817 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7818 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7822 Link with multiple pipes
7824 [[Main Page|The|Main|Page]]
7826 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7831 Anchor containing a #. (T65430)
7833 wgFragmentMode=[ 'html5', 'legacy' ]
7835 [[Main Page#And#Link]]
7837 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7840 <p><a rel="mw:WikiLink" href="./Main_Page#And#Link" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#And#Link"},"sa":{"href":"Main Page#And#Link"}}'>Main Page#And#Link</a></p>
7846 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7848 <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>
7853 Link with space in namespace
7855 [[User talk:Foo bar]]
7857 <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>
7862 MemoryAlpha:AlphaTest
7864 This is an article in the MemoryAlpha namespace
7865 (which shadows the memoryalpha interwiki link).
7869 Namespace takes precedence over interwiki link (T53680)
7871 [[MemoryAlpha:AlphaTest]]
7873 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7877 # The previous test doesn't work correctly in html2*, due to not recognizing the
7878 # link as an internal one. This one checks for the correct behavior.
7880 Link to namespace preferred over interwiki with correct rel attribute
7882 parsoid=html2wt,html2html
7884 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7886 [[MemoryAlpha:AlphaTest]]
7890 Piped link to namespace
7892 [[Meta:Disclaimers|The disclaimers]]
7894 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7901 [[Usually caused by a typo (oops}]]
7903 <p>[[Usually caused by a typo (oops}]]
7910 Just a test of an article title containing a percent.
7914 Link containing % (not as a hex sequence)
7917 [[7% Solution|7%25 Solution]]
7919 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7920 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7923 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7924 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7927 # note that the parsoid HTML is identical to the previous test output,
7928 # so the previous test ensures that the html2wt mode will generate the
7929 # "not as a hex sequence" wikitext.
7931 Link containing % as a single hex sequence interpreted to char
7933 parsoid=wt2wt,wt2html,html2html
7936 [[7%25 Solution|7%25 Solution]]
7938 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7939 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7942 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7943 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7947 Link containing % as a double hex sequence interpreted to hex sequence
7951 <p>[[7%2525 Solution]]
7955 ## Example for such a section: == < ==
7957 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7959 wgFragmentMode=[ 'html5', 'legacy' ]
7961 [[%23%3c]][[%23%3e]]
7963 <p><a href="#<">#<</a><a href="#>">#></a>
7966 <p><a rel="mw:WikiLink" href="./Main_Page#<" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#<"},"sa":{"href":"%23%3c"}}'>#<</a><a rel="mw:WikiLink" href="./Main_Page#>" title="Main Page" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#>"},"sa":{"href":"%23%3e"}}'>#></a></p>
7969 ## Example for such a section: == < ==
7971 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7973 wgFragmentMode=[ 'legacy' ]
7975 [[%23%3c]][[%23%3e]]
7977 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7982 Link containing "<#" and ">#" as a hex sequences
7984 [[%3c%23]][[%3e%23]]
7986 <p>[[%3c%23]][[%3e%23]]
7991 Link containing an equals sign
7993 [[Special:BookSources/isbn=4-00-026157-6]]
7995 <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>
7998 <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>
8004 Just a test of an article title containing a tilde.
8007 # note that links containing signatures, like [[Foo~~~~]], are
8008 # massaged by the pre-save transform (PST) and so the tildes are never
8009 # seen by the parser.
8011 Link containing a tilde
8015 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
8018 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
8022 Link containing double-single-quotes '' (T6598)
8024 [[Lista d''e paise d''o munno]]
8026 <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>
8029 <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>
8033 Link containing double quotes and spaces
8037 <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>
8040 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
8044 File containing double quotes and spaces
8046 [[File:Cool "Gator".png]]
8048 <p><figure-inline 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></figure-inline></p>
8052 Redirect containing double quotes and spaces
8054 #REDIRECT [[Cool "Gator"]]
8056 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
8060 Link containing double-single-quotes '' in text (T6598 sanity check)
8062 Some [[Link|pretty ''italics'' and stuff]]!
8064 <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>!
8067 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
8071 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
8073 ''Some [[Link|pretty ''italics'' and stuff]]!''
8075 <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>
8080 Link with double quotes in title part (literal) and alternate part (interpreted)
8082 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
8086 [[''Pentecoste''|Pentecoste]]
8088 [[''Pentecoste''|''Pentecoste'']]
8090 <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>
8091 </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>
8092 </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>
8093 </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>
8096 <p><figure-inline 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></figure-inline></p>
8097 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
8098 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
8099 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
8103 Broken image links with HTML captions (T41700)
8105 [[File:Nonexistent|<script></script>]]
8106 [[File:Nonexistent|100x100px|<script></script>]]
8107 [[File:Nonexistent|<]]
8108 [[File:Nonexistent|a<i>b</i>c]]
8110 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8111 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
8112 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
8113 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
8116 <p><figure-inline 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></figure-inline>
8117 <figure-inline 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></figure-inline>
8118 <figure-inline 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></figure-inline>
8119 <figure-inline 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></figure-inline></p>
8125 [[http://www.example.com]]
8127 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
8130 <p>[<a rel="mw:ExtLink" href="http://www.example.com"></a>]</p>
8134 Plain link to URL with link text
8136 [[http://www.example.com Link text]]
8138 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
8143 Plain link to protocol-relative URL
8145 [[//www.example.com]]
8147 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8150 <p>[<a rel="mw:ExtLink" href="//www.example.com"></a>]</p>
8154 Plain link to protocol-relative URL with link text
8156 [[//www.example.com Link text]]
8158 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8163 Plain link to page with question mark in title
8169 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8170 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8174 # I'm fairly sure the expected result here is wrong.
8175 # We want these to be URL links, not pseudo-pages with URLs for titles....
8176 # However the current output is also pretty screwy.
8179 # I'm changing it to match the current output--it arguably makes more
8180 # sense in the light of the test above. Old expected result was:
8181 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8183 # But I think this test is bordering on "garbage in, garbage out" anyway.
8188 Piped link to URL: [[http://www.example.com|an example URL]]
8190 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8193 <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>
8197 Plain link in template argument
8201 {{echo|[http://www.example.com |123]}}
8203 {{echo|[[http://www.example.com |123]]}}
8205 {{echo|[[http://www.example.com |123]}}
8207 {{echo|[http://www.example.com |123]]}}
8209 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8210 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8211 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8212 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8215 <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>
8217 <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>
8219 <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>
8221 <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>
8225 T2002: [[page|http://url/]] should link to page, not http://url/
8227 [[Main Page|http://url/]]
8229 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8232 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8235 # Parsoid does not mark self-links, by design.
8237 T2337: Escaped self-links should be bold
8241 [[Bug462]] [[Bug462]]
8243 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8246 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a></p>
8248 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8252 Self-link to section should not be bold
8256 [[Main Page#section]]
8258 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8269 Self-link to numeric title
8275 <p><a class="mw-selflink selflink">0</a>
8280 Link to numeric-equivalent title
8286 <p><a href="/wiki/00" title="00">00</a>
8291 <nowiki> inside a link
8293 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8295 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8300 Non-breaking spaces in title
8302 [[ Main Page ]]
8304 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8308 # Add new article for the test below so that it doesn't red-link
8316 Multiple spaces in titles should normalize to a single underscore
8318 parsoid=wt2html,wt2wt
8324 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8325 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8326 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8329 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8330 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8331 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8336 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8342 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8347 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8353 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8358 Internal link with en linktrail: no apostrophes (T29473)
8364 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8369 Internal link with ca linktrail with apostrophes (T29473)
8375 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8380 Internal link with kaa linktrail with apostrophes (T29473)
8386 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8391 Link with multiple ":" in a subpage-supporting namespace (T65636)
8393 [[User:Foo/Test/63636:Bar|Test]]
8395 <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>
8398 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8401 ## Mainly a sanity check for Parsoid
8403 Handle title parsing for subpages
8423 Link to a subpage from a namespace other than main
8430 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8433 <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>
8437 Ensure that transclusion titles are not url-decoded
8439 subpage title=[[Test]]
8442 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8444 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8447 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8451 Purely hash wikilink
8453 title=[[User:Test/123]]
8458 <p><a href="#a">b</a>
8461 <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>
8465 Serialization of purely hash wikilink
8467 title=[[User:Test/123]]
8471 <p><a href="#a">[[</a></p>
8473 [[#a|<nowiki>[[</nowiki>]]
8475 <p><a href="#a">[[</a>
8480 1. Interaction of linktrail and template encapsulation
8484 <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>
8488 2. Interaction of linktrail and template encapsulation
8492 {{echo|Some [[Fool]]}}s
8494 <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>
8498 3. Interaction of linktrail and template encapsulation
8502 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8504 <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>
8514 Internal link with is link prefix
8518 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8520 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8531 Internal link with is link trail and link prefix
8535 [[mótmælendatrú|xxx]]ar
8537 mótmælenda[[söfnuður]]
8538 mótmælenda[[söfnuður|söfnuðir]]
8539 mótmælenda[[söfnuður|söfnuðir]]xxx
8541 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8542 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8543 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8544 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8545 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8550 Parsoid link trail escaping
8552 parsoid=html2wt,html2html
8554 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8560 Parsoid link prefix escaping
8563 parsoid=html2wt,html2html
8565 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8567 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8571 Parsoid link bracket escaping
8573 parsoid=html2wt,html2html
8575 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8576 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8577 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8578 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8579 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8580 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8588 [[[<nowiki/>[[Test]]]]]
8592 [[[[[<nowiki/>[[Test]]]]]]]
8596 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8604 [http://wp.org ''foo'']
8606 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8607 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8608 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8609 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8614 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8616 [[Foo|{{echo|a}} b {{echo|c}}]]
8618 <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>
8622 Link with angle bracket after anchor
8624 wgFragmentMode=[ 'html5', 'legacy' ]
8628 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8631 <p><a rel="mw:WikiLink" href="./Foo#<bar>" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#<bar>"},"sa":{"href":"Foo#<bar>"}}'>Foo#<bar></a></p>
8635 Link with angle bracket after anchor (legacy)
8637 wgFragmentMode=[ 'legacy' ]
8641 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8646 ### Interwiki links (see maintenance/interwiki.sql)
8650 Inline interwiki link
8652 parsoid=wt2html,wt2wt,html2html
8654 [[MeatBall:SoftSecurity]]
8656 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8659 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8663 Inline interwiki link with empty title (T4372)
8665 parsoid=wt2html,wt2wt,html2html
8669 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8672 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8675 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8677 Interwiki link encoding conversion (T3636)
8679 parsoid=wt2html,wt2wt
8681 *[[Wikipedia:ro:Olteniţa]]
8682 *[[Wikipedia:ro:Olteniţa]]
8684 <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>
8685 <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>
8689 <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>
8690 <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>
8694 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8695 <li><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/ro:Olteniţa" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a></li>
8700 Interwiki link with fragment (T4130)
8702 [[MeatBall:SoftSecurity#foo]]
8704 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8709 Link scenarios with escaped fragments
8711 wgFragmentMode=[ 'html5', 'legacy' ]
8714 [[Foo#Is this great?]]
8715 [[meatball:Foo#Is this great?]]
8717 <p><a href="#Is_this_great?">#Is this great?</a>
8718 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8719 <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>
8722 <p><a rel="mw:WikiLink" href="./Main_Page#Is_this_great?" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Is_this_great?"},"sa":{"href":"#Is this great?"}}'>#Is this great?</a>
8723 <a rel="mw:WikiLink" href="./Foo#Is_this_great?" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo#Is_this_great?"},"sa":{"href":"Foo#Is this great?"}}'>Foo#Is this great?</a>
8724 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?" title="meatball:Foo" data-parsoid='{"stx":"simple","a":{"href":"http://www.usemod.com/cgi-bin/mb.pl?Foo#Is_this_great?"},"sa":{"href":"meatball:Foo#Is this great?"},"isIW":true}'>meatball:Foo#Is this great?</a></p>
8728 Link scenarios with escaped fragments (legacy)
8730 wgFragmentMode=[ 'legacy' ]
8733 [[Foo#Is this great?]]
8734 [[meatball:Foo#Is this great?]]
8736 <p><a href="#Is_this_great.3F">#Is this great?</a>
8737 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8738 <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>
8742 # Ideally the wikipedia: prefix here should be proto-relative too
8743 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8744 # define the 'en' prefix, and originally the test used 'wikipedia',
8745 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8748 Different interwiki prefixes mapping to the same URL
8756 [[:wikipedia:Foo|Foo]]
8758 [[wikipedia:en:Foo]]
8760 [[:wikipedia:en:Foo]]
8764 <p><a rel="mw:WikiLink/Interwiki" 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>
8766 <p><a rel="mw:WikiLink/Interwiki" 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>
8768 <p><a rel="mw:WikiLink/Interwiki" 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>
8770 <p><a rel="mw:WikiLink/Interwiki" 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>
8772 <p><a rel="mw:WikiLink/Interwiki" 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>
8774 <p><a rel="mw:WikiLink/Interwiki" 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>
8776 <p><a rel="mw:WikiLink/Interwiki" 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>
8780 Interwiki links that cannot be represented in wiki syntax
8783 [[meatball:ok#foo|ok with fragment]]
8784 [[meatball:ok_as_well?|ok ending with ? mark]]
8785 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8786 [http://de.wikipedia.org/wiki/#foo is just fragment]
8789 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8790 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8791 <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>
8792 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8793 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8796 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8797 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8798 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok_as_well?" title="meatball:ok as well?">ok ending with ? mark</a>
8799 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8800 <a rel="mw:ExtLink" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8804 Interwiki links: trail
8806 [[wikipedia:Foo|Ba]]r
8808 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8811 <p><a rel="mw:WikiLink/Interwiki" 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>
8815 Local interwiki link
8817 parsoid=wt2html,wt2wt,html2html
8819 [[local:Template:Foo]]
8821 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8824 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8827 # Parsoid does not mark self-links, by design.
8829 Local interwiki link: self-link to current page
8832 parsoid=wt2html,wt2wt,html2html
8836 <p><a class="mw-selflink selflink">local:Main Page</a>
8839 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8843 Local interwiki link: prefix only (T66167)
8845 parsoid=wt2html,wt2wt,html2html
8849 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8852 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8856 Local interwiki link: with additional interwiki prefix (T63357)
8858 parsoid=wt2html,wt2wt,html2html
8860 [[local:meatball:Hello]]
8862 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8865 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8869 Multiple local interwiki link prefixes
8871 [[local:local:local:local:mi:local:Foo]]
8873 parsoid=wt2html,wt2wt,html2html
8875 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8878 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8882 ### Interlanguage links
8883 ### Language links (so that searching for '### language' matches..)
8895 <p>Blah blah blah</p>
8896 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8899 ## parsoid html2wt will lose the space variations
8901 Interlanguage link with spacing
8903 parsoid=wt2html,wt2wt,html2html
8911 <p>Blah blah blah</p>
8912 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8916 Double interlanguage link
8925 <p>Blah blah blah</p>
8926 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8927 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8930 ## parsoid html2wt will lose the space variations
8932 Interlanguage link variations
8934 parsoid=wt2html,wt2wt,html2html
8944 <p>Blah blah blah</p>
8945 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8946 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8947 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8951 Escaping of interlanguage links (T129218, T156308)
8955 [[ : zh : Chinese ]]
8958 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8959 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8963 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8964 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8968 Multiple colons escaping interlanguage links
8976 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8981 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8983 [[:::es:Spanish]]</p>
8986 ## parsoid html2wt will normalize the space to _
8988 Space and question mark encoding in interlanguage links (T95473)
8990 parsoid=wt2html,wt2wt,html2html
8998 <p>Blah blah blah</p>
8999 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
9003 Interlanguage link, with prefix links
9013 <p>Blah blah blah</p>
9014 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9018 Double interlanguage link, with prefix links (T10897)
9029 <p>Blah blah blah</p>
9030 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
9031 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
9035 "Extra" interlanguage links (T34189 / gerrit 111390)
9043 <p>Blah blah blah</p>
9044 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
9047 ## PHP parser tests script needs an update
9048 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9050 Language links render as inline links if $wgInterwikiMagic=false
9052 wgInterwikiMagic=false
9053 parsoid=wt2html,wt2wt,html2html
9058 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9061 ## PHP parser tests script needs an update
9062 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
9064 Language links render as inline links in the Talk namespace
9067 parsoid=wt2html,wt2wt,html2html
9072 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
9076 Parsoid-specific test: Wikilinks with should RT properly
9082 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
9087 Parsoid T55221: Wikilinks should be properly entity-escaped
9089 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
9091 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9092 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
9094 He&nbsp;llo [[Foo|He&nbsp;llo]]
9096 He&nbsp;llo He&nbsp;llo
9098 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
9099 </p><p>He&nbsp;llo He&nbsp;llo
9103 # html2wt will fail because of title normalization without data-parsoid
9105 Parsoid: handle constructor well
9107 parsoid=wt2html,wt2wt
9113 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
9114 </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>
9117 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
9119 <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>
9128 # Note that `ko` isn't a known interlanguage prefix
9130 Parsoid: recognize interlanguage links without a target page
9140 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
9142 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9145 # Note that `ko` isn't a known interwiki prefix
9147 Parsoid: recognize interwiki links without a target page
9149 parsoid=wt2html,wt2wt,html2html
9155 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9156 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9159 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9160 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9164 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9168 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9171 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9175 Interlanguage link with preceding local interwiki link (T70085)
9177 parsoid=wt2html,wt2wt,html2html
9180 [[local:es:Spanish]]
9183 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9187 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9191 Looks like an interlanguage link, but is actually a local interwiki
9193 parsoid=wt2html,wt2wt,html2html
9199 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9203 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9207 ### Redirects, Parsoid-only
9211 1. Simple redirect to page
9213 #REDIRECT [[Main Page]]
9215 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9219 2. Other redirect variants
9221 #REDIRECT [[Main_Page]]
9223 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9226 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9227 # This tests the Parsoid bail-out code.
9229 3. Other redirect variants
9233 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9235 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9239 4. Redirect to a templated destination
9241 #REDIRECT [[{{echo|Foo}}bar]]
9243 <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"}]]}'/>
9249 parsoid=wt2html,wt2wt
9254 <li>REDIRECT [[]]</li></ol>
9258 Optional colon in #REDIRECT
9260 # the colon is archaic syntax. we support it for wt2html, but we
9261 # don't care that it roundtrips back to the modern syntax.
9262 parsoid=wt2html,html2html
9264 #REDIRECT:[[Main Page]]
9266 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9270 Whitespace in #REDIRECT with optional colon
9272 # the colon and gratuitous whitespace is archaic syntax. we support
9273 # it for wt2html, but we don't care that it roundtrips back to the
9274 # modern syntax (without extra whitespace)
9275 parsoid=wt2html,html2html
9282 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9286 Piped link in #REDIRECT
9288 # content after piped link is ignored. we support this syntax,
9289 # but don't care that the piped link is lost when we roundtrip this.
9292 #REDIRECT [[Main Page|bar]]
9294 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9298 Redirect to category (T104502)
9300 parsoid=wt2html,wt2wt
9302 #REDIRECT [[Category:Foo]]
9304 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9308 Redirect to category with URL encoding (T104502)
9312 #REDIRECT [[Category%3AFoo]]
9314 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9318 Redirect to category page
9320 #REDIRECT [[:Category:Foo]]
9322 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9326 Redirect to image page (1)
9328 #REDIRECT [[File:Wiki.png]]
9330 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9334 Redirect to image page (2)
9336 #REDIRECT [[Image:Wiki.png]]
9338 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9341 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9342 # Next test confirms this.
9344 Redirect to language (1) (T104918)
9346 parsoid=wt2html,wt2wt,html2html
9348 #REDIRECT [[en:File:Wiki.png]]
9350 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9354 Redirect to language (2) (T104918)
9356 #REDIRECT [[:en:File:Wiki.png]]
9358 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9362 Redirect to interwiki (T104918)
9364 #REDIRECT [[meatball:File:Wiki.png]]
9366 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9370 Non-English #REDIRECT
9374 #TILVÍSUN [[Main Page]]
9376 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9380 Redirect syntax under text isn't considered a redirect
9383 #redirect [[Main Page]]
9386 <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>
9394 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9401 Redirect followed by block on the same line
9405 #REDIRECT [[Main Page]]<!-- haha -->== hi ==
9407 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi"> hi </h2>
9411 Redirect followed by a newline
9413 #REDIRECT [[Main Page]]
9416 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9421 Redirect followed by multiple newlines
9423 #REDIRECT [[Main Page]]
9428 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9435 Drop duplicate redirects
9439 <link rel="mw:PageProp/redirect" href="./Foo"/>
9440 <link rel="mw:PageProp/redirect" href="./Bar"/>
9441 <link rel="mw:PageProp/redirect" href="./Baz"/>
9460 Broken br tag sanitization
9468 # TODO: Fix html2html mode (T53055)!
9470 Parsoid: Broken br tag recognition
9483 Incorrecly removing closing slashes from correctly formed XHTML
9485 <br style="clear:both;" />
9487 <p><br style="clear:both;" />
9492 Failing to transform badly formed HTML into correct XHTML
9494 <br style="clear: left;">
9495 <br style="clear: right;">
9496 <br style="clear: both;">
9498 <p><br style="clear: left;" />
9499 <br style="clear: right;" />
9500 <br style="clear: both;" />
9504 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9505 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9507 Handling html with a div self-closing tag
9516 <p><div title />
9520 <p><div title=bar />
9521 <div title=bar/>
9523 <div title="bar/"></div>
9527 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9528 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9529 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9530 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9531 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9532 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9536 Handling html with a br self-closing tag
9563 Horizontal ruler (should it add that extra space?)
9578 Horizontal ruler -- 4+ dashes render hr
9587 Horizontal ruler -- eats additional dashes on the same line
9596 Horizontal ruler -- does not collapse dashes on consecutive lines
9607 Horizontal ruler -- <4 dashes render as plain text
9616 Horizontal ruler -- Supports content following dashes on same line
9628 ### Block-level elements
9637 <ul><li>Common list</li>
9639 <li>item 3</li></ul>
9650 <ol><li>Numbered list</li>
9652 <li> item 3</li></ol>
9666 ***#Number on level 4
9668 **#Number on level 3
9669 **#Number on level 3
9673 #** Level 3, but ordered
9676 <ol><li> with numbers</li></ol>
9677 <ul><li> and bullets</li></ul>
9678 <ol><li> and numbers</li></ol></li>
9680 <ul><li>bullet level 2
9681 <ul><li>bullet level 3
9682 <ol><li>Number on level 4</li></ol></li></ul></li>
9684 <ol><li>Number on level 3</li>
9685 <li>Number on level 3</li></ol></li></ul>
9686 <ol><li>number level 2</li></ol></li>
9688 <ul><li><ul><li> Level 3</li></ul></li></ul></li></ul>
9689 <ol><li><ul><li><ul><li> Level 3, but ordered</li></ul></li></ul></li></ol>
9694 1. Nested mixed wikitext and html list
9697 * <ul><li>ho</li></ul>
9702 <li> <ul><li>ho</li></ul></li>
9704 <ul><li> ho</li></ul></li></ul>
9708 <li> <ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9710 <ul><li> ho</li></ul></li></ul>
9714 2. Nested mixed wikitext and html list (incompatible)
9717 : {{echo|<li>ho</li>}}
9720 <dd> <li>ho</li></dd></dl>
9724 <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>
9734 <ul><li>bar</li></ul></li></ul>
9744 <ul><li><ul><li>foo</li></ul></li>
9750 Nested lists 3 (first element empty)
9756 <ul><li>bar</li></ul></li></ul>
9761 Nested lists 4 (first element empty)
9766 <ul><li><ul><li></li></ul></li>
9772 Nested lists 5 (both elements empty)
9777 <ul><li><ul><li></li></ul></li>
9783 Nested lists 6 (both elements empty)
9789 <ul><li></li></ul></li></ul>
9794 Nested lists 7 (skip initial nesting levels)
9798 <ul><li><ul><li><ul><li> foo</li></ul></li></ul></li></ul>
9803 Nested lists 8 (multiple nesting transitions)
9811 <ul><li><ul><li> bar</li></ul></li>
9812 <li> baz</li></ul></li>
9818 Nested lists 9 (extension interaction)
9824 <ul><li data-parsoid='{}'><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-parsoid='{}' data-mw='{"name":"references","attrs":{}}'></ol></li></ul>
9828 1. Lists with start-of-line-transparent tokens before bullets: Comments
9841 2. Lists with start-of-line-transparent tokens before bullets: Template close
9846 <ul><li>foo bar</li>
9852 List items are not parsed correctly following a <pre> block (T2785)
9858 <ul><li> <pre>foo</pre></li>
9859 <li> <pre>bar</pre></li>
9863 <ul><li> <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9864 <li> <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9869 List items from template
9880 * notSOL{{inner list}}
9883 <ul><li> item 1</li>
9884 <li> item 2</li></ul>
9885 <ul><li> item 0</li>
9887 <li> item 2</li></ul>
9888 <ul><li> item 0</li>
9891 <li> item 2</li></ul>
9896 List interrupted by empty line or heading
9904 <ul><li> foo</li></ul>
9905 <ul><li><ul><li> bar</li></ul></li></ul>
9906 <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>
9907 <ul><li> Another list item</li></ul>
9912 Multiple list tags generated by templates
9933 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9936 <!--This line will NOT split the list-->
9938 <!--This line will NOT split the list either-->
9940 <!--foo--> <!----> <!--This line NOT split the list either-->
9951 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9954 <!--This line will NOT split the list-->
9956 <!--This line will NOT split the list either-->
9958 <!--foo--> <!----> <!--This line NOT split the list
9971 (The PHP parser relies on Tidy for the hack)
9973 parsoid=wt2html,wt2wt
9977 * {{echo|<li>templated li-hack}}
9978 * <!--foo--> <li> unsupported li-hack with preceding comments
9981 <li><li>not a li-hack
9988 <li>templated li-hack</li>
9989 <li>unsupported li-hack with preceding comments</li>
9992 <li>not a li-hack</li>
9996 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"* "}'>li-hack</li>
9997 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,,"pi":[[{"k":"1"}]]}' data-mw='{"parts":["* ",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>templated li-hack"}},"i":0}}]}'>templated li-hack</li>
9998 <li data-parsoid='{"autoInsertedEnd":true}'> <!--foo--> </li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'> unsupported li-hack with preceding comments</li></ul>
10000 <ul data-parsoid='{"stx":"html"}'>
10001 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
10008 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
10035 Parsoid: Test of whitespace serialization with Templated bullets
10042 <li class="mw-empty-elt"> </li><li about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"bullet","href":"./Template:Bullet"},"params":{},"i":0}}]}'> Bar</li>
10046 # ------------------------------------------------------------------------
10047 # The next set of tests are about Parsoid's ability to handle badly nested
10048 # tags (parse, minimize scope of fixup, and roundtrip back)
10049 # ------------------------------------------------------------------------
10052 Unbalanced closing block tags break a list
10053 (php parser relies on Tidy to fix up)
10071 # Parsoid fails this test, but it might be tricky to support properly.
10074 Unbalanced closing non-block tags don't break a list
10075 (php parser relies on Tidy to fix up)
10082 <li><span>a</span></li>
10083 <li><span>b</span></li>
10097 Unclosed formatting tags that straddle lists are closed and reopened
10098 (php parser relies on Tidy to fix up)
10100 parsoid=wt2html,wt2wt,html2html
10110 <ol><li> <s> a</s></li>
10111 <li><s> b </s></li></ol>
10116 1. List embedded in a formatting tag
10123 <li><small>foo</small></li>
10133 ## Ugly Parsoid output here
10134 ## Not sure what the right output is.
10136 2. List embedded in a formatting tag
10143 <li><small>a</small></li>
10144 <li><small>b</small></li>
10151 <li><small>b</small></li>
10155 # Ugly Parsoid and PHP parser output here
10156 # Not sure if we want to make this a test!
10159 ## 3. Unclosed formatting tags in list elements
10163 ## !! html/php+tidy
10165 ## <li><small>a</small></li>
10166 ## <li><small><small>b</small></small></li>
10170 ## <li><small>a</small></li>
10172 ## <li><small>b</small></li>
10176 # This is a bug in the PHP parser + tidy combination.
10177 # (The </tr> tag gets parsed as text and html-escaped by PHP,
10178 # and then fostered out of the table by tidy.)
10179 # We believe the Parsoid output to be correct.
10181 Table with missing opening <tr> tag
10183 parsoid=wt2html,wt2wt
10201 # Note that the current date is hard-coded as
10202 # 1970-01-01T00:02:03Z (a Thursday)
10203 # when running parser tests. The timezone is also fixed to GMT, so
10204 # local date will be identical to current date.
10207 Magic Word: {{CURRENTDAY}}
10216 Magic Word: {{CURRENTDAY2}}
10225 Magic Word: {{CURRENTDAYNAME}}
10234 Magic Word: {{CURRENTDOW}}
10243 Magic Word: {{CURRENTMONTH}}
10252 Magic Word: {{CURRENTMONTH1}}
10261 Magic Word: {{CURRENTMONTHABBREV}}
10263 {{CURRENTMONTHABBREV}}
10270 Magic Word: {{CURRENTMONTHNAME}}
10272 {{CURRENTMONTHNAME}}
10279 Magic Word: {{CURRENTMONTHNAMEGEN}}
10281 {{CURRENTMONTHNAMEGEN}}
10288 Magic Word: {{CURRENTTIME}}
10297 Magic Word: {{CURRENTHOUR}}
10306 Magic Word: {{CURRENTWEEK}} (T6594)
10315 Magic Word: {{CURRENTYEAR}}
10324 Magic Word: {{CURRENTTIMESTAMP}}
10326 {{CURRENTTIMESTAMP}}
10333 Magic Words LOCAL (UTC)
10337 * {{LOCALMONTHNAME}}
10338 * {{LOCALMONTHNAMEGEN}}
10339 * {{LOCALMONTHABBREV}}
10348 * {{LOCALTIMESTAMP}}
10363 <li> 19700101000203</li></ul>
10368 Magic Word: {{FULLPAGENAME}}
10370 title=[[User:Ævar Arnfjörð Bjarmason]]
10371 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10375 <p>User:Ævar Arnfjörð Bjarmason
10380 Magic Word: {{FULLPAGENAMEE}}
10382 title=[[User:Ævar Arnfjörð Bjarmason]]
10383 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10387 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10392 Magic Word: {{TALKSPACE}}
10394 title=[[User:Ævar Arnfjörð Bjarmason]]
10395 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10404 Magic Word: {{TALKSPACE}}, same namespace
10406 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10407 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10416 Magic Word: {{TALKSPACE}}, main namespace
10418 title=[[Parser Test]]
10419 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10428 Magic Word: {{TALKSPACEE}}
10430 title=[[User:Ævar Arnfjörð Bjarmason]]
10431 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10440 Magic Word: {{SUBJECTSPACE}}
10442 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10443 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10452 Magic Word: {{SUBJECTSPACE}}, same namespace
10454 title=[[User:Ævar Arnfjörð Bjarmason]]
10455 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10464 Magic Word: {{SUBJECTSPACE}}, main namespace
10466 title=[[Parser Test]]
10467 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10475 Magic Word: {{SUBJECTSPACEE}}
10477 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10478 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10487 Magic Word: {{NAMESPACE}}
10489 title=[[User:Ævar Arnfjörð Bjarmason]]
10490 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10499 Magic Word: {{NAMESPACEE}}
10501 title=[[User:Ævar Arnfjörð Bjarmason]]
10502 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10511 Magic Word: {{NAMESPACENUMBER}}
10513 title=[[User:Ævar Arnfjörð Bjarmason]]
10514 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10516 {{NAMESPACENUMBER}}
10523 Magic Word: {{SUBPAGENAME}}
10525 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10526 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10535 Magic Word: {{SUBPAGENAMEE}}
10537 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10538 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10547 Magic Word: {{ROOTPAGENAME}}
10549 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10550 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10554 <p>Ævar Arnfjörð Bjarmason
10559 Magic Word: {{ROOTPAGENAMEE}}
10561 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10562 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10566 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10571 Magic Word: {{BASEPAGENAME}}
10573 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10574 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10578 <p>Ævar Arnfjörð Bjarmason
10583 Magic Word: {{BASEPAGENAMEE}}
10585 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10586 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10590 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10595 Magic Word: {{TALKPAGENAME}}
10597 title=[[User:Ævar Arnfjörð Bjarmason]]
10598 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10602 <p>User talk:Ævar Arnfjörð Bjarmason
10607 Magic Word: {{TALKPAGENAMEE}}
10609 title=[[User:Ævar Arnfjörð Bjarmason]]
10610 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10614 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10619 Magic Word: {{SUBJECTPAGENAME}}
10621 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10622 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10624 {{SUBJECTPAGENAME}}
10626 <p>User:Ævar Arnfjörð Bjarmason
10631 Magic Word: {{SUBJECTPAGENAMEE}}
10633 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10634 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10636 {{SUBJECTPAGENAMEE}}
10638 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10643 Magic Word: {{NUMBEROFFILES}}
10645 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10654 Magic Word: {{PAGENAME}}
10656 title=[[User:Ævar Arnfjörð Bjarmason]]
10657 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10661 <p>Ævar Arnfjörð Bjarmason
10666 Magic Word: {{PAGENAME}} with metacharacters
10668 title=[['foo & bar = baz']]
10669 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10673 <p><i>'foo & bar = baz'</i>
10676 <p><i>'foo & bar = baz'</i></p>
10680 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10682 title=[[*RFC 1234 http://example.com/]]
10683 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10687 <p>*RFC 1234 http://example.com/
10690 <p>*RFC 1234 http://example.com/</p>
10694 Magic Word: {{PAGENAMEE}}
10696 title=[[User:Ævar Arnfjörð Bjarmason]]
10697 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10701 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10706 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10708 title=[[*RFC 1234 http://example.com/]]
10709 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10713 <p>*RFC_1234_http://example.com/
10716 <p>*RFC_1234_http://example.com/</p>
10720 Magic Word: {{REVISIONID}}
10722 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10729 flags=vary-revision-id
10733 Magic Word: {{SCRIPTPATH}}
10735 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10743 Magic Word: {{STYLEPATH}}
10745 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10754 Magic Word: {{SERVER}}
10756 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10760 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10765 Magic Word: {{SERVERNAME}}
10767 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10776 Magic Word: {{SITENAME}}
10778 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10787 Magic Word: {{PAGELANGUAGE}}
10790 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10799 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10801 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10810 Case-sensitive magic words, when cased differently, should just be template transclusions
10817 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10818 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10819 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10820 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10825 Case-insensitive magic words should still work with weird casing.
10835 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10839 # From plwiki:PLOS_ONE
10841 Parsoid: Page property magic word with magic word contents
10843 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10845 <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>"}]]}'/>
10848 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10849 # But, this is a limitation of our representation and is documented in
10850 # TemplateHandler.js in processSpecialMagicWord
10852 Parsoid: Template-generated DISPLAYTITLE
10854 {{{{echo|DISPLAYTITLE}}:Foo}}
10858 wgAllowDisplayTitle=true
10859 wgRestrictDisplayTitle=false
10864 <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"}]]}'/>
10868 Namespace 1 {{ns:1}}
10877 Namespace 1 {{ns:01}}
10886 Namespace 0 {{ns:0}} (T6783)
10894 Namespace 0 {{ns:00}} (T6783)
10902 Namespace -1 {{ns:-1}}
10911 Namespace User {{ns:User}}
10920 Namespace User talk {{ns:User_talk}}
10929 Namespace User talk {{ns:uSeR tAlK}}
10938 Namespace File {{ns:File}}
10947 Namespace File {{ns:Image}}
10956 Namespace (lang=de) Benutzer {{ns:User}}
10967 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10973 <p>Benutzer Diskussion
10980 {{urlencode:hi world?!}}
10981 {{urlencode:hi world?!|WIKI}}
10982 {{urlencode:hi world?!|PATH}}
10983 {{urlencode:hi world?!|QUERY}}
10993 Magic Word: prioritize type info over data-parsoid
10997 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
11003 Magic Word: serialize on separate line (parsoid)
11005 parsoid=wt2wt,html2wt
11011 foo<meta property="mw:PageProp/notoc"/>bar
11015 Magic Word: rt non-english wikis
11022 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
11026 __proto__ is treated as normal wikitext (T105997)
11038 Magic links: internal link to RFC (T2479)
11042 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
11045 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
11049 Magic links: RFC (T2479)
11053 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11056 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a></p>
11060 Magic links: RFC (T67278)
11062 This is RFC 822 but thisRFC 822 is not RFC 822linked.
11064 <p>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a> but thisRFC 822 is not RFC 822linked.
11067 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
11071 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
11073 RFC      822
11077 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
11082 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink">RFC <span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#0160;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span><span typeof="mw:Entity" data-parsoid='{"src":"&#Xa0;","srcContent":" "}'> </span> 822</a>
11088 Magic links: ISBN (T3937)
11092 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
11095 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
11099 Magic links: ISBN (T67278)
11101 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
11103 <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.
11106 <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>
11110 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
11112 ISBN      978 0 316 09811 3
11118 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
11125 <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>
11133 Magic links: PMID incorrectly converts space to underscore
11137 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11140 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink">PMID 1234</a></p>
11144 Magic links: PMID (T67278)
11146 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
11148 <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.
11151 <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>
11155 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
11157 PMID      1234
11161 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
11166 <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>
11171 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
11172 # since these are ExtLinkText, not MagicLinkText
11174 Magic links: use appropriate serialization for "almost" magic links.
11176 X[[Special:BookSources/0978739256|foo]]
11178 X[https://tools.ietf.org/html/rfc1234 foo]
11180 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11181 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11184 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11185 <p>X<a rel="mw:ExtLink" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11189 Magic links: All disabled (T47942)
11191 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11197 <p>ISBN 0-306-40615-2
11208 Nonexistent template
11210 {{thistemplatedoesnotexist}}
11212 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11217 Template with invalid target containing tags
11219 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11221 <p>{{a<b>b</b>|foo|a=b|a = b}}
11226 Template with invalid target containing unclosed tag
11228 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11230 <p>{{a<b>|foo|a=b|a = b}}</b>
11235 Template with invalid target containing wikilink
11239 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11242 <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>
11246 Template with just whitespace in it, T70421
11250 <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>
11256 This is a test template
11264 <p>This is a test template
11269 Template with explicit namespace
11273 <p>This is a test template
11281 This is a test template with parameter {{{param}}}
11287 {{paramtest|param=foo}}
11289 <p>This is a test template with parameter foo
11294 Template:paramtestnum
11296 [[{{{1}}}|{{{2}}}]]
11300 Template unnamed parameter
11302 {{paramtestnum|Main Page|the main page}}
11304 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11309 Template:templatesimple
11315 Template:templateredirect
11317 #redirect [[Template:templatesimple]]
11321 Template:templateasargtestnum
11327 Template:templateasargtest
11329 {{template{{{templ}}}}}
11333 Template:templateasargtest2
11339 Template with template name as unnamed argument
11341 {{templateasargtestnum|templatesimple}}
11348 Template with template name as argument
11350 {{templateasargtest|templ=simple}}
11357 Template with template name as argument (2)
11359 {{templateasargtest2|templ=templatesimple}}
11366 Template:templateasargtestdefault
11368 {{{{{templ|templatesimple}}}}}
11378 Template with default value
11380 {{templateasargtestdefault}}
11387 Template with default value (value set)
11389 {{templateasargtestdefault|templ=templa}}
11398 {{templateredirect}}
11403 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11407 Template with argument in separate line
11409 {{ templateasargtest |
11417 Template with complex template as argument
11420 param ={{ templateasargtest |
11421 templ = simple }}}}
11423 <p>This is a test template with parameter (test)
11428 Templates with templated name
11430 {{{{echo|echo}}|foo}}
11431 {{{{echo|inner list}} }}
11435 <ul><li> item 1</li></ul>
11438 <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>
11439 <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>
11442 ## Regression test; the output here isn't really that interesting.
11444 Templates with templated name and top level template args
11446 {{1{{2{{{3}}}|4=5}}}}
11448 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"1{{2{{{3}}}|4=5}}"},"params":{},"i":0}}]}'>{{1{{2{{{3}}}|4=5}}}}</p>
11451 # Parsoid markup is deliberate "broken". This is an edge case.
11452 # See long comment in TemplateHandler.js:convertAttribsToString.
11454 Templates with invalid templated targets
11465 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11470 Template with thumb image (with link in description)
11472 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11474 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>
11477 <p>This is a test template with parameter</p>
11478 <div class="thumb tright">
11479 <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>
11480 <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>
11484 <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>
11488 Template:complextemplate
11490 {{{1}}} {{paramtest|
11491 param ={{{param}}}}}
11495 Template with complex arguments
11498 param ={{ templateasargtest |
11499 templ = simple }}|[[Template:complextemplate|link]]}}
11501 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11506 T2553: link with two variables in a piped link
11509 |[[{{{1}}}|{{{2}}}]]
11514 <td>[[{{{1}}}|{{{2}}}]]
11519 <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>
11525 Abort table cell attribute parsing on wikilink
11528 | testing [[one|two]] | three || four
11529 | testing one two | three || four
11530 | testing="[[one|two]]" | three || four
11535 <td> testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
11541 <td> testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" | three </td>
11547 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> | three </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'> four</td>
11548 <td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'> four</td>
11549 <td> testing="<a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a>" | three </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'> four</td></tr>
11554 Don't abort table cell attribute parsing if wikilink is found in template arg
11557 | Test {{#tag:ref|One two "[[three]]" four}}
11561 <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>
11566 Magic variable as template parameter
11568 {{paramtest|param={{SITENAME}}}}
11570 <p>This is a test template with parameter MediaWiki
11577 [[{{{param}}}|link]]
11581 Template parameter as link source
11583 {{linktest|param=Main Page}}
11585 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11590 Template:paramtest2
11592 including another template, {{paramtest|param={{{arg}}}}}
11596 Template passing argument to another template
11598 {{paramtest2|arg='hmm'}}
11600 <p>including another template, This is a test template with parameter 'hmm'
11611 Template as link source
11615 [[{{linktest2}}|Main Page]]
11617 [[{{linktest2}}]]Page
11619 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11620 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11621 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11639 Template infinite loop
11643 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11648 Template from main namespace
11667 T2529: Template with table, not included at beginning of line
11686 T2523: Template shouldn't eat newline (or add an extra one before table)
11706 T2041: Template parameters shown as broken links
11715 Template with targets containing wikilinks
11721 {{[[{{echo|foo}}]]}}
11723 {{{{echo|[[foo}}]]}}
11725 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11726 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11730 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11731 <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>
11732 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11742 Templates: Double quotes as template target
11749 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11753 ## This test is about making sure Parsoid's data-mw is well formed in the
11754 ## face of multiple templates with intersecting and overlapping ranges. The
11755 ## wikitext itself is wretched.
11757 Templates with intersecting and overlapping ranges
11782 <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":""}]]}'>
11784 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11786 <tbody><tr><td>hi</td></tr>
11791 Template:MSGNW test
11793 ''None'' of '''this''' should be
11795 but rather passed unmodified
11803 # hmm, fix this or just deprecate msgnw and document its behavior?
11807 {{msgnw:MSGNW test}}
11809 <p>''None'' of '''this''' should be
11811  but rather passed unmodified
11812 {{test}}
11816 <!-- comment -->
11823 {{int:youhavenewmessages|lots of money|not!}}
11825 <p>You have lots of money (not!).
11830 int keyword - non-existing message
11841 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11845 <includeonly> and <noinclude> being included
11856 <onlyinclude>Foo</onlyinclude>bar
11860 <onlyinclude> being included
11872 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11876 <onlyinclude> and <includeonly> being included
11885 <includeonly> and <noinclude> on a page
11887 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11894 Un-closed <noinclude>
11901 <onlyinclude> on a page
11903 <onlyinclude>Foo</onlyinclude>bar
11910 Un-closed <onlyinclude>
11917 Self-closed noinclude, includeonly, onlyinclude tags
11928 Unbalanced includeonly and noinclude tags
11932 |b</noinclude></noinclude>
11933 |c</noinclude></includeonly>
11934 |d</includeonly></includeonly>
11943 <td>c</includeonly>
11945 <td>d</includeonly></includeonly>
11951 Template:Includeonly section
11954 ==Includeonly section==
11960 T8563: Edit link generation for section shown by <includeonly>
11962 {{includeonly section}}
11964 <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>
11965 <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>
11969 # Uses same input as the contents of [[Template:Includeonly section]]
11971 T8563: Section extraction for section shown by <includeonly>
11976 ==Includeonly section==
11984 T8563: Edit link generation for section suppressed by <includeonly>
11987 ==Includeonly section==
11991 <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>
11996 T8563: Section extraction for section suppressed by <includeonly>
12001 ==Includeonly section==
12009 Un-closed <includeonly>
12014 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
12017 ## We used to, but no longer wt2wt this test since the default serializer
12018 ## will normalize the include directives to serialize on their own line.
12019 ## Selser will take care of preserving formatting in scenarios where they
12020 ## intermingled with other wikitext.
12022 Includes and comments at SOL
12024 parsoid=wt2html,html2html
12026 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
12030 </noinclude>* stuff
12033 <includeonly>can have stuff</includeonly>=== here ===
12036 <h2><span class="mw-headline" id="hu">hu</span></h2>
12039 <ul><li> stuff</li>
12040 <li> here</li></ul>
12041 <h3><span class="mw-headline" id="here">here</span></h3>
12044 <!-- comment --><meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/><!-- comment --><meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><!-- comment --><h2 id="hu"> hu </h2>
12046 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
12048 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li> stuff</li>
12049 <li> here</li></ul>
12051 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>can have stuff</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><h3 id="here"> here </h3>
12055 # TODO: test with DOM fragment reuse!
12057 Parsoid: DOM fragment reuse
12059 parsoid=wt2wt,wt2html
12061 a{{echo|b<table></table>c}}d
12073 <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>
12075 <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">
12076 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
12077 </span><p about="#mwt2">cd</p>
12079 <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">
12081 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
12083 </span><p about="#mwt3">b</p>
12087 Parsoid: Merge double tds (T52603)
12092 |{{echo|{{!}} foo}}
12096 <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>
12101 Parsoid: Merge double tds in nested transclusion content (T52603)
12107 |{{echo|{{!}} foo}}
12111 <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}}]}'>
12113 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
12119 ### <includeonly> and <noinclude> in attributes
12122 0. includeonly around the entire attribute
12124 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
12126 <p><span id="v2">bar</span>
12131 1. includeonly in html attr key
12133 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
12135 <p><span id="foo">bar</span>
12140 2. includeonly in html attr value
12142 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
12143 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
12145 <p><span id="v1">bar</span>
12146 <span id="v1">bar</span>
12151 3. includeonly in part of an attr value
12153 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
12155 <p><span style="color:red;">bar</span>
12160 4. includeonly in table attributes
12184 ### Preprocessor precedence tests
12185 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
12187 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
12189 Preprocessor precedence 1: link is rightmost opening
12195 But close-brace is not a valid character in a link title:
12198 However, we can still tell this was handled as a link in the preprocessor:
12199 {{echo|[[Foo}}|bar]]|bat}}
12201 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12202 </p><p>But close-brace is not a valid character in a link title:
12204 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12208 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12209 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12210 <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>
12214 Preprocessor precedence 2: template is rightmost opening
12223 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12227 Preprocessor precedence 3: language converter is rightmost opening
12243 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12244 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12245 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12249 Preprocessor precedence 4: left-most angle bracket
12260 Template:Precedence5
12266 Preprocessor precedence 5: tplarg takes precedence over template
12268 {{Precedence5|Bullet}}
12270 <ul><li> Bar</li></ul>
12273 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li> Bar</li></ul>
12277 Preprocessor precedence 6: broken link is rightmost opening
12283 {{echo|[[Foo|bar|bat=baz}}
12286 </p><p>{{echo|[[Foo|bar|bat=baz}}
12289 <p>{{echo|[[Foo}}</p>
12290 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12293 # This next test exposes a difference between PHP and Parsoid:
12294 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12295 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12296 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12297 # outer `[[Foo` extends until the `y]]`
12298 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12299 # intermediate result (after template expansion), and link processing
12300 # happens on this intermediate result, which moves the wikilink
12301 # boundary leftward to `[[Foo|Bar]]`
12302 # 2b) Parsoid works in a single step, so it's going to keep the
12303 # wikilink as extending to the `y]]`
12304 # 3a) Then PHP does linktrail processing which slurps up the trailing
12305 # `xy` inside the link.
12306 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12307 # `z` inside the link.
12308 # This is "correct" behavior. Parsoid's basic worldview is that the
12309 # `]]` inside the template shouldn't be allowed to leak out to affect
12310 # the surrounding wikilink. PHP may match Parsoid (in the future)
12311 # if you use {{#balance}} (T114445).
12314 Preprocessor precedence 7: broken template is rightmost opening
12320 [[Foo|{{echo|Bar]]-x}}-y]]-z
12322 Careful: linktrails can move the end of the wikilink:
12323 [[Foo|{{echo|y']]a}}l]]l
12325 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12326 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12327 </p><p>Careful: linktrails can move the end of the wikilink:
12328 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12331 <p>[[Foo|{{echo|Bar]]</p>
12332 <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>
12333 <p>Careful: linktrails can move the end of the wikilink:
12334 <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>
12338 Preprocessor precedence 8: broken language converter is rightmost opening
12349 Template:Preprocessor_precedence_9
12354 ;7: {{{{{{{4}}}}}}}
12358 Preprocessor precedence 9: groups of braces
12360 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12366 <ul><li> Bar</li></ul>
12370 <dd> {Bullet}</dd></dl>
12373 <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}}]}'>
12378 </dl><ul about="#mwt1">
12380 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12389 Template:Preprocessor_precedence_10
12396 ;6: -{{{{{{4}}}}}}-
12397 ;7: -{{{{{{{5}}}}}}}-
12401 Preprocessor precedence 10: groups of braces with leading dash
12405 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12411 <ul><li> Bar-</li></ul>
12418 <ul><li> Bar-</li></ul>
12422 <dd> raw2</dd></dl>
12425 <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}}]}'>
12427 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12430 </dl><ul about="#mwt1">
12432 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12436 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12439 </dl><ul about="#mwt1">
12441 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12445 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12450 Preprocessor precedence 11: found during visual diff testing
12452 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12454 {{echo|-{{echo|-{{echo|x}}}}}}
12456 {{echo|-{{echo|x}}}}
12458 <p><span>-<span>-x</span></span>
12463 <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>
12465 <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>
12467 <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>
12471 Preprocessor precedence 12: broken language converter closed by brace.
12475 This form breaks the template, which is unfortunate:
12476 * {{echo|foo-{bar}bat}}
12478 But if the broken language converter markup is inside an extension
12479 tag, nothing bad happens:
12480 * <nowiki>foo-{bar}bat</nowiki>
12481 * {{echo|<nowiki>foo-{bar}bat</nowiki>}}
12482 * <pre>foo-{bar}bat</pre>
12483 * {{echo|<pre>foo-{bar}bat</pre>}}
12485 <tag>foo-{bar}bat</tag>
12486 {{echo|<tag>foo-{bar}bat</tag>}}
12489 <p>This form breaks the template, which is unfortunate:</p>
12491 <li>{{echo|foo-{bar}bat}}</li>
12493 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12495 <li>foo-{bar}bat</li>
12496 <li>foo-{bar}bat</li>
12517 <p>This form breaks the template, which is unfortunate:</p>
12519 <li>{{echo|foo-{bar}bat}}</li>
12521 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12523 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12524 <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>
12525 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12526 <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>
12528 <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>
12532 Preprocessor precedence 13: broken language converter in external link
12536 * [http://example.com/-{foo Example in URL]
12537 * [http://example.com Example in -{link} description]
12538 * {{echo|[http://example.com/-{foo Breaks template, however]}}
12541 <li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12542 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12543 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12547 <li><a rel="mw:ExtLink" href="http://example.com/-{foo">Example in URL</a></li>
12548 <li><a rel="mw:ExtLink" href="http://example.com">Example in -{link} description</a></li>
12549 <li>{{echo|<a rel="mw:ExtLink" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12554 Preprocessor precedence 14: broken language converter in comment
12556 * <!--{{foo}}--> ...should be ok
12557 * <!---{{foo}}--> ...extra dashes
12558 * {{echo|foo<!-- -{bar} -->bat}} ...should be ok
12561 <li>...should be ok</li>
12562 <li>...extra dashes</li>
12563 <li>foobat ...should be ok</li>
12567 <li><!--{{foo}}--> ...should be ok</li>
12568 <li><!---{{foo}}--> ...extra dashes</li>
12569 <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>
12574 Preprocessor precedence 15: broken brace markup in headings
12576 wgFragmentMode=[ 'html5', 'legacy' ]
12580 __NOTOC__ __NOEDITSECTION__
12589 ===5 foo{{{bar 5===
12594 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12596 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12598 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12600 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12602 <h3><span id="5_foo.7B.7B.7Bbar_5"></span><span class="mw-headline" id="5_foo{{{bar_5">5 foo{{{bar 5</span></h3>
12604 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12607 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12608 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12610 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12612 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12614 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12616 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12618 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12623 Preprocessor precedence 16: matching closing braces to opening braces
12628 -{{{echo|foo}}bar}-
12633 <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>
12637 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12646 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12650 ### Token Stream Patcher tests
12652 ### These tests won't always pass wt2wt and other modes because
12653 ### on serialization, the table will be output on a new line.
12654 ### For now, we are blacklisting them, and using this to test selser.
12658 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12660 parsoid=wt2html,wt2wt
12662 {{echo|}}{| width = '100%'
12666 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12667 <tbody><tr><td>foo</td></tr>
12671 ## We used to, but no longer wt2wt this test since the default serializer
12672 ## will normalize the include directives to serialize on their own line.
12673 ## Selser will take care of preserving formatting in scenarios where they
12674 ## intermingled with other wikitext.
12676 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12680 <includeonly>a</includeonly>{| {{{b}}}
12684 <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":""}]]}'>
12685 <tbody><tr><td>c</td></tr>
12690 Table wikitext syntax outside wiki-tables
12694 ! not a table heading
12697 | class="foo bar" | baz
12705 ! not a table heading
12708 | class="foo bar" | baz
12717 ### Testing parsing of templates where a template arg
12718 ### has the same name as the template itself.
12724 {{{quote|{{{1}}}}}}
12728 Templates: Template Name/Arg clash: 1. Use of positional param
12737 Templates: Template Name/Arg clash: 2. Use of named param
12739 {{quote|quote=foo}}
12746 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12755 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12759 Templates: 1. Simple use
12768 Templates: 2. Inside a block tag
12770 <div>{{echo|Foo}}</div>
12771 <blockquote>{{echo|Foo}}</blockquote>
12774 <blockquote>Foo</blockquote>
12784 Templates: P-wrapping: 1a. Templates on consecutive lines
12795 Templates: P-wrapping: 1b. Templates on consecutive lines
12809 Templates: P-wrapping: 1c. Templates on consecutive lines
12812 {{echo|bar}} <div>baz</div>
12825 Templates: P-wrapping: 1d. Template preceded by comment-only line
12834 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12838 Templates: Inline Text: 1. Multiple template uses
12840 {{echo|Foo}}bar{{echo|baz}}
12847 Templates: Inline Text: 2. Back-to-back template uses
12849 {{echo|Foo}}{{echo|bar}}
12856 Templates: Block Tags: 1. Multiple template uses
12858 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12860 <div>Foo</div><div>bar</div><div>baz</div>
12865 Templates: Block Tags: 2. Back-to-back template uses
12867 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12869 <div>Foo</div><div>bar</div>
12873 # This is an edge case relating to paragraph wrapping.
12875 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12880 <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
12885 Templates: Links: 1. Simple example
12887 {{echo|[[Foo|bar]]}}
12889 <p><a href="/wiki/Foo" title="Foo">bar</a>
12894 Templates: Links: 2. Generation of link href
12896 [[{{echo|Foo}}|bar]]
12898 <p><a href="/wiki/Foo" title="Foo">bar</a>
12903 Templates: Links: 3. Generation of part of a link href
12905 [[Fo{{echo|o}}|bar]]
12907 [[Foo{{echo|bar}}]]
12909 [[Foo{{echo|bar}}baz]]
12911 [[Foo{{echo|bar}}|bar]]
12913 [[:Foo{{echo|bar}}]]
12915 [[:Foo{{echo|bar}}|bar]]
12917 <p><a href="/wiki/Foo" title="Foo">bar</a>
12918 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12919 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12920 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12921 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12922 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12927 Templates: Links: 4. Multiple templates generating link href
12929 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12931 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12936 Templates: Links: 5. Generation of link text
12938 [[Foo|{{echo|bar}}]]
12940 <p><a href="/wiki/Foo" title="Foo">bar</a>
12945 Templates: Links: 5. Nested templates (only outermost template should be marked)
12947 {{echo|[[{{echo|Foo}}|bar]]}}
12949 <p><a href="/wiki/Foo" title="Foo">bar</a>
12954 Templates: HTML Tag: 1. Generation of HTML attr. key
12956 <div {{echo|style}}="color:red;">foo</div>
12958 <div style="color:red;">foo</div>
12963 Templates: HTML Tag: 2. Generation of HTML attr. value
12965 <div style={{echo|'color:red;'}}>foo</div>
12967 <div style="color:red;">foo</div>
12972 Templates: HTML Tag: 3. Generation of HTML attr key and value
12974 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12976 <div style="color:red;">foo</div>
12981 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12983 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12985 <div title="This is a long title with just one piece templated">foo</div>
12990 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12992 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12994 <div title="This is a long title with just one piece templated">foo</div>
12999 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
13001 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
13003 <div title="This is a long title with just one piece templated">foo</div>
13007 # SSS FIXME: While it is great we added support for all this,
13008 # do we want to make this part of the spec? Maybe we want to
13009 # deprecate this kind of usage in the future?
13011 Templates: HTML Tag: 7. Generation of partial attribute key string
13013 <div st{{echo|yle}}="color:red;">foo</div>
13015 <div style="color:red;">foo</div>
13020 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13022 <div {{echo|1=id="v1"}}>bar</div>
13024 <div id="v1">bar</div>
13029 Templates: HTML Tag: 9. Multiple template-generated attributes
13031 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13033 <div id="v1" title="foo">bar</div>
13038 Templates: Support for templates generating attributes and content
13040 {| {{mixed_attr_content_template}}
13045 <table style="color:red;" title="T48811">
13055 <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|}"]}'>
13064 1. Entities and nowikis inside templated attributes should be handled correctly
13066 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13068 <div style="background:#f9f9f9;">foo</div>
13071 <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>
13075 2. Entities and nowikis inside templated attributes should be handled correctly
13078 |{{table_attribs_3}}
13083 <td style="background:#f9f9f9;">Foo
13088 <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>
13093 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13096 |{{table_attribs_3}}
13101 <td style="background:#f9f9f9;">Foo
13105 <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}}]}'>
13106 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13112 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13115 | {{table_attribs_6}} hi
13120 <td style="background: red;"> hi
13125 <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>
13130 Templates: HTML Tables: 1. Generating start of a HTML table
13132 {{echo|<table><tr><td>foo</td>}}</tr></table>
13134 <table><tr><td>foo</td></tr></table>
13139 Templates: HTML Tables: 2a. Generating middle of a HTML table
13141 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13143 <table><tr><td>foo</td></tr></table>
13148 Templates: HTML Tables: 2b. Generating middle of a HTML table
13150 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13152 <table><tr><td>foo</td></tr></table>
13157 Templates: HTML Tables: 3. Generating end of a HTML table
13159 <table><tr>{{echo|<td>foo</td></tr></table>}}
13161 <table><tr><td>foo</td></tr></table>
13166 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13168 {{echo|<table>}}<tr><td>foo</td></tr></table>
13170 <table><tr><td>foo</td></tr></table>
13175 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13177 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13179 <table><tr><td>foo</td></tr></table>
13184 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13186 <table><tr>{{echo|<td>}}foo</td></tr></table>
13188 <table><tr><td>foo</td></tr></table>
13193 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13195 <table><tr><td>foo{{echo|</td>}}</tr></table>
13197 <table><tr><td>foo</td></tr></table>
13202 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13204 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13206 <table><tr><td>foo</td></tr></table>
13211 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13213 <table><tr><td>foo</td></tr>{{echo|</table>}}
13215 <table><tr><td>foo</td></tr></table>
13220 Templates: HTML Tables: 5. Proper fostering of categories from inside
13222 parsoid=wt2html,wt2wt
13224 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13225 <!--Two categories (T52330)-->
13226 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13228 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13229 <!--Two categories (T52330)-->
13230 <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>
13234 Templates: Wiki Tables: 1a. Fostering of entire template content
13242 <tr><td></td></tr></table>
13254 Templates: Wiki Tables: 1b. Fostering of entire template content
13267 <tr><td></td></tr></table>
13281 Templates: Wiki Tables: 2. Fostering of partial template content
13291 <tr><td></td></tr></table>
13304 Templates: Wiki Tables: 3. td-content via multiple templates
13307 {{echo|{{pipe}}a}}{{echo|b}}
13318 Templates: Wiki Tables: 4. Templated tags, no content
13324 <tr><td></td></tr></table>
13329 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13343 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13356 ## This test case is very specific to Parsoid's internals
13357 ## and is hence only tested for Parsoid's code. Parsoid uses
13358 ## a <meta> marker tag for <ref> tags and they are expanded
13359 ## much later. We are verifying that this <meta> tag usage
13360 ## doesn't prevent foster parenting.
13362 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13364 {{PartialTable}}<ref>foo</ref>
13369 <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">
13373 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
13377 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13387 <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{{!}}}"]}'>
13388 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13392 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13397 Templates: Lists: Multi-line list-items via templates
13399 *{{echo|a {{nonexistent|
13401 *{{echo|b {{nonexistent|
13404 <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>
13405 <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>
13410 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13412 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13414 <p><i>ab</i>c<i>d</i>e
13419 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13420 (PHP parser generates misnested html)
13422 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13424 <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>
13428 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13429 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13431 parsoid=wt2html,wt2wt
13433 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13435 <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>
13436 <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>
13437 <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>
13441 Templates: Ugly nesting: 4. Divs opened/closed across templates
13443 a<div>b{{echo|c</div>d}}e
13454 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
13460 |{{echo|foo</table>}}
13464 <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|}"]}'>
13468 <td>foo</td></tr></tbody></table><span about="#mwt1">
13469 </span><span about="#mwt1">|bar</span><span about="#mwt1">
13474 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
13484 <td>1. {{echo|foo </table>}}</td>
13486 <td>2. {{echo|baz </table>}}</td>
13499 <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>"]}'>
13504 <td>1. foo </td></tr></tbody></table></td>
13506 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
13507 </span><span about="#mwt2">
13508 </span><span about="#mwt2">
13509 </span><span about="#mwt2">abc</span><span about="#mwt2">
13510 </span><span about="#mwt2">
13511 </span><span about="#mwt2">
13512 </span><span about="#mwt2">
13513 </span><span about="#mwt2">
13514 </span><span about="#mwt2">
13515 </span><span about="#mwt2">xyz</span><span about="#mwt2">
13516 </span><span about="#mwt2">
13521 Templates: Ugly templates: 3. newline-only template parameter
13530 # This looks like a bug: a single newline triggers p/br for some reason.
13532 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13541 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13542 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13544 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13550 <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
13551 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13555 # T66017 -- ugly wikitext with fostered content generates two template ranges
13556 # that are "identical" and generate nesting cycles in the algorithm
13558 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13560 {{echo|<table><tr><td><table>}}
13564 <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"}'>
13565 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13566 </table></td></tr></tbody></table>
13570 Templates: Parameters substituted at the top-level
13572 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13576 <p><i>who</i> me? <b>never!</b>
13580 <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>
13582 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13586 Templates: Param with empty arg in the final position
13590 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13594 Parser Functions: 1. Simple example
13603 Parser Functions: 2. Nested use (only outermost should be marked up)
13612 ### Pre-save transform tests
13615 pre-save transform: subst:
13621 This is a test template
13625 pre-save transform: normal template
13635 pre-save transform: nonexistent template
13639 {{thistemplatedoesnotexist}}
13641 {{thistemplatedoesnotexist}}
13645 pre-save transform: subst magic variables
13654 # This is T2089, which I fixed. -- wtm
13656 pre-save transform: subst: templates with parameters
13660 {{subst:paramtest|param="something else"}}
13662 This is a test template with parameter "something else"
13666 Template:nowikitest
13668 <nowiki>'''not wiki'''</nowiki>
13672 pre-save transform: nowiki in subst (T3188)
13676 {{subst:nowikitest}}
13678 <nowiki>'''not wiki'''</nowiki>
13682 Template:commenttest
13684 This template has <!-- a comment --> in it.
13688 pre-save transform: comment in subst (T3936)
13692 {{subst:commenttest}}
13694 This template has <!-- a comment --> in it.
13698 pre-save transform: unclosed tag
13702 <nowiki>'''not wiki'''
13704 <nowiki>'''not wiki'''
13708 pre-save transform: mixed tag case
13712 <NOwiki>'''not wiki'''</noWIKI>
13714 <NOwiki>'''not wiki'''</noWIKI>
13718 pre-save transform: unclosed comment in <nowiki>
13722 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13724 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13727 # Leading @ in this template definition works around a limitation
13728 # in parsoid's parserTests which otherwise strips the <span> from the
13729 # result (confusing it for a template wrapper)
13733 @<span onmouseover="alert('crap')">Oh no</span>
13737 (confirming safety of fix for subst T3936)
13739 {{Template:dangerous}}
13741 <p>@<span>Oh no</span>
13746 pre-save transform: comment containing gallery (T7024)
13750 <!-- <gallery>data</gallery> -->
13752 <!-- <gallery>data</gallery> -->
13756 pre-save transform: comment containing extension
13760 <!-- <tag>data</tag> -->
13762 <!-- <tag>data</tag> -->
13766 pre-save transform: comment containing nowiki
13770 <!-- <nowiki>data</nowiki> -->
13772 <!-- <nowiki>data</nowiki> -->
13776 pre-save transform: <noinclude> in subst (T5298)
13786 pre-save transform: <onlyinclude> in subst (T5298)
13790 {{subst:Includes2}}
13798 {{<includeonly>subst:</includeonly>Includes}}
13802 Template:SafeSubstTest
13804 {{<includeonly>safesubst:</includeonly>Includes}}
13808 T24297: safesubst: works during PST
13812 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13818 T24297: safesubst: works during normal parse
13827 subst: does not work during normal parse
13831 <p>{{subst:Includes}}
13836 pre-save transform: context links ("pipe trick")
13840 [[Article (context)|]]
13843 [[Bar:Article (context)|]]
13844 [[:Bar:Article (context)|]]
13846 [[|Article (context)]]
13850 [[Article (context)|Article]]
13851 [[Bar:Article|Article]]
13852 [[:Bar:Article|Article]]
13853 [[Bar:Article (context)|Article]]
13854 [[:Bar:Article (context)|Article]]
13856 [[Article (context)]]
13857 [[Bar:X (Y) Z|X (Y) Z]]
13858 [[:Bar:X (Y) Z|X (Y) Z]]
13862 pre-save transform: context links ("pipe trick") with interwiki prefix
13866 [[interwiki:Article|]]
13867 [[:interwiki:Article|]]
13868 [[interwiki:Bar:Article|]]
13869 [[:interwiki:Bar:Article|]]
13871 [[interwiki:Article|Article]]
13872 [[:interwiki:Article|Article]]
13873 [[interwiki:Bar:Article|Bar:Article]]
13874 [[:interwiki:Bar:Article|Bar:Article]]
13878 pre-save transform: context links ("pipe trick") with parens in title
13880 pst title=[[Somearticle (context)]]
13884 [[Article (context)|Article]]
13888 pre-save transform: context links ("pipe trick") with comma in title
13890 pst title=[[Someplace, Somewhere]]
13893 [[Otherplace, Elsewhere|]]
13894 [[Otherplace, Elsewhere, Anywhere|]]
13896 [[Otherplace, Somewhere|Otherplace]]
13897 [[Otherplace, Elsewhere|Otherplace]]
13898 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13902 pre-save transform: context links ("pipe trick") with parens and comma
13904 pst title=[[Someplace (IGNORED), Somewhere]]
13907 [[Otherplace (place), Elsewhere|]]
13909 [[Otherplace, Somewhere|Otherplace]]
13910 [[Otherplace (place), Elsewhere|Otherplace]]
13914 pre-save transform: context links ("pipe trick") with comma and parens
13916 pst title=[[Who, me? (context)]]
13919 [[Me, Myself, and I (1937 song)|]]
13921 [[Yes, you. (context)|Yes, you.]]
13922 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13926 pre-save transform: context links ("pipe trick") with namespace
13928 pst title=[[Ns:Somearticle]]
13932 [[Ns:Article|Article]]
13936 pre-save transform: context links ("pipe trick") with namespace and parens
13938 pst title=[[Ns:Somearticle (context)]]
13942 [[Ns:Article (context)|Article]]
13946 pre-save transform: context links ("pipe trick") with namespace and comma
13948 pst title=[[Ns:Somearticle, Context, Whatever]]
13952 [[Ns:Article, Context, Whatever|Article]]
13956 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13958 pst title=[[Ns:Somearticle, Context (context)]]
13962 [[Ns:Article (context)|Article]]
13966 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13968 pst title=[[Ns:Somearticle (IGNORED), Context]]
13972 [[Ns:Article, Context|Article]]
13976 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13980 [[Article(context)|]]
13981 [[Bar:Article(context)|]]
13982 [[:Bar:Article(context)|]]
13983 [[|Article(context)]]
13987 [[Article(context)|Article]]
13988 [[Bar:Article(context)|Article]]
13989 [[:Bar:Article(context)|Article]]
13990 [[Article(context)]]
13991 [[Bar:X(Y)Z|X(Y)Z]]
13992 [[:Bar:X(Y)Z|X(Y)Z]]
13996 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
14000 [[Article (context)|]]
14001 [[Bar:Article (context)|]]
14002 [[:Bar:Article (context)|]]
14003 [[|Article (context)]]
14007 [[Article (context)|Article]]
14008 [[Bar:Article (context)|Article]]
14009 [[:Bar:Article (context)|Article]]
14010 [[Article (context)]]
14011 [[Bar:X (Y) Z|X (Y) Z]]
14012 [[:Bar:X (Y) Z|X (Y) Z]]
14016 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14020 [[Article(context)|]]
14021 [[Bar:Article(context)|]]
14022 [[:Bar:Article(context)|]]
14023 [[|Article(context)]]
14027 [[Article(context)|Article]]
14028 [[Bar:Article(context)|Article]]
14029 [[:Bar:Article(context)|Article]]
14030 [[Article(context)]]
14031 [[Bar:X(Y)Z|X(Y)Z]]
14032 [[:Bar:X(Y)Z|X(Y)Z]]
14036 pre-save transform: context links ("pipe trick") with commas (T23660)
14040 [[Article (context), context|]]
14041 [[Article (context),context|]]
14042 [[Bar:Article (context), context|]]
14043 [[Bar:Article (context),context|]]
14044 [[:Bar:Article (context), context|]]
14045 [[:Bar:Article (context),context|]]
14047 [[Article (context), context|Article]]
14048 [[Article (context),context|Article]]
14049 [[Bar:Article (context), context|Article]]
14050 [[Bar:Article (context),context|Article]]
14051 [[:Bar:Article (context), context|Article]]
14052 [[:Bar:Article (context),context|Article]]
14056 Parsoid: backwards pipe trick
14063 <p>[[|<b>bar</b>]]</p>
14067 pre-save transform: trim trailing empty lines
14071 Empty lines are trimmed
14077 Empty lines are trimmed
14081 pre-save transform: Signature expansion
14088 * <noinclude>~~~</noinclude>
14089 * <includeonly>~~~</includeonly>
14090 * <onlyinclude>~~~</onlyinclude>
14092 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14093 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14094 * 00:02, 1 January 1970 (UTC)
14095 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14096 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14097 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14102 ParserOutput flags from signature expansion (T84843)
14109 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14110 flags=user-signature
14115 pre-save transform: Signature expansion in nowiki tags (T2093)
14121 <nowiki>~~~~</nowiki>
14123 <includeonly><nowiki>~~~~</nowiki></includeonly>
14125 <noinclude><nowiki>~~~~</nowiki></noinclude>
14127 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14129 {{subst:Foo}} shall be converted to FOO
14131 As well as inside noinclude/onlyinclude
14132 <noinclude>{{subst:Foo}}</noinclude>
14133 <onlyinclude>{{subst:Foo}}</onlyinclude>
14135 But not inside includeonly
14136 <includeonly>{{subst:Foo}}</includeonly>
14140 <nowiki>~~~~</nowiki>
14142 <includeonly><nowiki>~~~~</nowiki></includeonly>
14144 <noinclude><nowiki>~~~~</nowiki></noinclude>
14146 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14148 FOO shall be converted to FOO
14150 As well as inside noinclude/onlyinclude
14151 <noinclude>FOO</noinclude>
14152 <onlyinclude>FOO</onlyinclude>
14154 But not inside includeonly
14155 <includeonly>{{subst:Foo}}</includeonly>
14159 Parsoid: Recognize nowiki with trailing space in tags
14163 <nowiki ><div>[[foo]]</nowiki >
14171 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14178 Parsoid: Recognize nowiki with odd capitalization
14182 <noWikI ><div>[[foo]]</Nowiki >
14184 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14189 Parsoid: Escape nowiki with trailing space in tags
14193 <p><nowiki > foo </nowiki ></p>
14194 <p>a<nowiki />b</p>
14195 <p>c<nowiki/ >d</p>
14197 <nowiki > foo </nowiki >
14205 Parsoid: Escape weird noWikI capitalizations
14209 <p><noWikI > foo </NoWikI ></p>
14211 <noWikI > foo </NoWikI >
14215 ### Message transform tests
14218 message transform: magic variables
14228 message transform: should not transform wiki markup
14238 message transform: <noinclude> in transcluded template (T6926)
14248 message transform: <onlyinclude> in transcluded template (T6926)
14258 {{#special:}} page name, known
14262 {{#special:Recentchanges}}
14264 Special:RecentChanges
14268 {{#special:}} page name with subpage, known
14272 {{#special:Recentchanges/param}}
14274 Special:RecentChanges/param
14278 {{#special:}} page name, unknown
14282 {{#special:foobar nonexistent}}
14284 Special:Foobar nonexistent
14288 {{#speciale:}} page name, known
14292 {{#speciale:Recentchanges}}
14294 Special:RecentChanges
14298 {{#speciale:}} page name with subpage, known
14302 {{#speciale:Recentchanges/param}}
14304 Special:RecentChanges/param
14308 {{#speciale:}} page name, unknown
14312 {{#speciale:foobar nonexistent}}
14314 Special:Foobar_nonexistent
14320 ### For Parsoid-specific tests, see
14321 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14326 parsoid=wt2html,wt2wt,html2html
14328 [[Image:foobar.jpg]]
14330 <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>
14333 <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>
14337 Serialize simple image with span wrapper
14341 <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>
14343 [[File:Foobar.jpg]]
14347 Simple image (using File: namespace, now canonical)
14349 [[File:Foobar.jpg]]
14351 <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>
14354 <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>
14358 Right-aligned image
14360 [[File:Foobar.jpg|right]]
14362 <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>
14365 <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>
14371 [[File:Foobar.jpg|right|Caption text]]
14373 <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>
14376 <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>
14380 Image with caption, T55312 #1
14382 [[File:Foobar.jpg|right|Caption page stuff]]
14384 <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>
14387 <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>
14391 Image with caption, T55312 #2
14393 [[File:Foobar.jpg|right|Caption page=]]
14395 <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>
14398 <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>
14402 Image with caption, T55312 #3
14404 [[File:Foobar.jpg|right|Caption page=stuff]]
14406 <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>
14409 <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>
14413 Image caption with pipe entity
14415 [[File:Foobar.jpg|thumb|one | two]]
14416 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14418 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one | two</div></div></div>
14419 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>one <i>two</i> | three</div></div></div>
14422 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <span typeof="mw:Entity">|</span> two</figcaption></figure>
14423 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>one <i>two</i> <span typeof="mw:Entity">|</span> three</figcaption></figure>
14427 Allow empty links in image captions (T62753)
14431 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14436 <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>
14439 <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>
14441 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14442 </figcaption></figure>
14446 Titles in unlinked images (T23454)
14448 [[File:Foobar.jpg|link=|stuff]]
14450 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14455 Link with empty target
14464 Image with link trail
14466 Linktrails should not work for images: [[File:Foobar.jpg]]s
14468 <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
14471 <p>Linktrails should not work for images: <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>s</p>
14475 Image with empty attribute
14477 parsoid=wt2html,wt2wt,html2html
14479 [[File:Foobar.jpg|right||Caption text]]
14481 <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>
14484 <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>
14488 1. Block image with individual attributes from templates
14490 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14492 <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>
14495 <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>
14499 2. Block Image with individual attributes from templates
14501 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14503 <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>
14506 <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>
14510 3. Inline image with individual attributes from templates
14512 [[File:Foobar.jpg|{{echo|50px}}]]
14514 <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>
14517 <p><figure-inline 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></figure-inline></p>
14520 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14521 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14523 Image with multiple attributes from the same template
14525 [[File:Foobar.jpg|{{image_attribs}}]]
14527 <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>
14530 <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>
14534 Image with link tails
14538 123[[File:Foobar.jpg]]456
14539 123[[File:Foobar.jpg|right]]456
14540 123[[File:Foobar.jpg|thumb]]456
14542 <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
14544 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
14545 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
14548 <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>
14550 <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>
14552 <div class="thumb tright">
14553 <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>
14554 <div class="thumbcaption">
14555 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
14561 <p>123<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>456</p>
14562 <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>
14563 <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>
14567 Image with multiple captions -- only last one is accepted
14569 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14571 <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>
14574 <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>
14578 Image with multiple widths -- use last
14580 [[File:Foobar.jpg|200px|300px|caption]]
14582 <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>
14585 <p><figure-inline 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></figure-inline></p>
14589 Image with multiple alignments -- use first (T50664)
14593 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14595 [[File:Foobar.jpg|middle|text-top|caption]]
14597 <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>
14598 <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>
14601 <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>
14602 <p><figure-inline 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></figure-inline></p>
14606 Image with width attribute at different positions
14608 [[File:Foobar.jpg|200px|right|Caption]]
14609 [[File:Foobar.jpg|right|200px|Caption]]
14610 [[File:Foobar.jpg|right|Caption|200px]]
14612 <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>
14613 <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>
14614 <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>
14617 <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>
14618 <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>
14619 <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>
14622 # a sad bit of backward-compatibility
14624 Image with size specified with pxpx (T15500, T53628)
14626 parsoid=wt2html,wt2wt,html2html
14628 [[File:Foobar.jpg|20pxpx]]
14629 [[File:Foobar.jpg|200x20pxpx]]
14631 <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>
14632 <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>
14635 <p><figure-inline 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></figure-inline> <figure-inline 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></figure-inline></p>
14639 Image with link parameter, wiki target
14641 [[File:Foobar.jpg|link=Main Page]]
14643 <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>
14646 <p><figure-inline 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></figure-inline></p>
14649 # parsoid T51293 (part 1)
14651 Image with link parameter, URL target
14653 [[File:Foobar.jpg|link=http://example.com/]]
14655 <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>
14658 <p><figure-inline 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></figure-inline></p>
14661 # parsoid T51293 (part 2)
14663 Image with link parameter, protocol-less URL target
14665 [[File:Foobar.jpg|link=//example.com/]]
14667 <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>
14670 <p><figure-inline 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></figure-inline></p>
14674 Escaping non-block captions (T107435)
14677 "modes": ["wt2wt"],
14679 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14683 [[Image:Foobar.jpg|caption]]
14685 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14688 # wgExternalLinkTarget not supported by Parsoid
14690 Image with link parameter, wgExternalLinkTarget
14692 [[Image:foobar.jpg|link=http://example.com/]]
14694 wgExternalLinkTarget='foobar'
14696 <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>
14701 Image with link parameter, wgNoFollowLinks set to false
14703 [[Image:foobar.jpg|link=http://example.com/]]
14705 wgNoFollowLinks=false
14707 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14712 Image with link parameter, wgNoFollowDomainExceptions
14714 [[Image:foobar.jpg|link=http://example.com/]]
14716 wgNoFollowDomainExceptions='example.com'
14718 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14722 # wgExternalLinkTarget not supported by Parsoid
14724 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14726 [[Image:foobar.jpg|link=http://example.com/|Title]]
14728 wgExternalLinkTarget='foobar'
14730 <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>
14735 Image with empty link parameter
14737 [[File:Foobar.jpg|link=]]
14739 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14742 <p><figure-inline 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></figure-inline></p>
14746 Image with link parameter (wiki target) and unnamed parameter
14748 [[File:Foobar.jpg|link=Main_Page|Title]]
14750 <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>
14753 <p><figure-inline 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></figure-inline></p>
14757 Image with link parameter (URL target) and unnamed parameter
14759 [[File:Foobar.jpg|link=http://example.com/|Title]]
14761 <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>
14764 <p><figure-inline 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></figure-inline></p>
14768 Thumbnail image with link parameter
14771 parsoid=wt2html,wt2wt,html2html
14773 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14775 <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>
14778 <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>
14782 Manually-specified thumbnail image
14786 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14788 <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>
14791 <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>
14795 Manually-specified thumbnail image with explicit link to wiki page
14798 parsoid=wt2html,wt2wt,html2html
14800 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14802 <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>
14805 <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>
14809 Manually-specified thumbnail image with explicit link to url
14812 parsoid=wt2html,wt2wt,html2html
14814 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14816 <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>
14819 <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>
14823 Manually-specified thumbnail image with explicit no link
14826 parsoid=wt2html,wt2wt,html2html
14828 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14830 <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>
14833 <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>
14837 Manually-specified thumbnail image with explicit link and alt text
14840 parsoid=wt2html,wt2wt,html2html
14842 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14844 <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>
14847 <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>
14851 Image with frame and link
14853 parsoid=wt2html,wt2wt,html2html
14855 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14857 <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>
14860 <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>
14864 Image with frame and link and explicit alt
14866 parsoid=wt2html,wt2wt,html2html
14868 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14870 <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>
14873 <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>
14877 Image with wiki markup in implicit alt
14879 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14881 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14883 <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>
14884 </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>
14887 <p><figure-inline 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></figure-inline></p>
14889 <p><figure-inline 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></figure-inline></p>
14893 Alt image option should handle most kinds of wikitext without barfing
14895 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14897 <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>
14900 <figure class="mw-default-size" typeof="mw:Image/Thumb mw:ExpandedAttrs" about="#mwt2" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"This is the image caption"},{"ck":"alt","ak":"alt=This is a [[link]] and a {{echo|''bold template''}}."}]}' data-mw='{"attribs":[["thumbnail",{"html":"thumb"}],["alt",{"html":"alt=This is a <a rel=\"mw:WikiLink\" href=\"./Link\" title=\"Link\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./Link\"},\"sa\":{\"href\":\"link\"},\"dsr\":[65,73,2,2]}'>link</a> and a <i about=\"#mwt1\" typeof=\"mw:Transclusion\" data-parsoid='{\"dsr\":[80,106,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&apos;&apos;bold template&apos;&apos;\"}},\"i\":0}}]}'>bold template</i>."}]]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{}}'><img alt="This is a link and a bold template." resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"alt":"This is a link and a bold template.","resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"alt":"alt=This is a [[link]] and a {{echo|''bold template''}}.","resource":"Image:Foobar.jpg"}}'/></a><figcaption>This is the image caption</figcaption></figure>
14904 Image with table with attributes in caption
14906 parsoid=wt2html,html2html
14908 [[File:Foobar.jpg|thumb|
14915 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{| class=\"123\" |\n|- class=\"456\" |\n| ha\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
14916 <table class="123">
14917 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14920 </figcaption></figure>
14924 Image with table with rows from templates in caption
14926 [[File:Foobar.jpg|thumb|
14932 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"\n{|\n{{echo|{{!}} hi}}\n|}\n"}]}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption>
14934 <tbody about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"{{!}} hi"}},"i":0}},"\n"]}'><tr><td> hi</td></tr>
14936 </figcaption></figure>
14940 Image with nested tables in caption
14942 [[File:Foobar.jpg|thumb|Foo<br />
14951 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"caption","ak":"Foo<br/>\n{|\n|\n{|\n|z\n|}\n|}\n"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"25","width":"220"},"sa":{"resource":"File:Foobar.jpg"}}'/></a><figcaption data-parsoid='{"dsr":[null,50,null,null]}'>Foo<br data-parsoid='{"stx":"html","selfClose":true}'/>
14955 <tbody><tr><td>z</td></tr>
14956 </tbody></table></td></tr>
14958 </figcaption></figure>
14961 ###################
14962 # Conflicting image format options.
14963 # First option specified should 'win'.
14964 # All three cases in each test should be identical.
14967 Image with 'frameless' first.
14969 parsoid=wt2html,wt2wt,html2html
14971 [[File:Foobar.jpg|frameless|caption]]
14973 [[File:Foobar.jpg|frameless|frame|caption]]
14975 [[File:Foobar.jpg|frameless|thumb|caption]]
14977 <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>
14978 </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>
14979 </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>
14982 <p><figure-inline 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></figure-inline></p>
14983 <p><figure-inline 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></figure-inline></p>
14984 <p><figure-inline 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></figure-inline></p>
14988 Image with 'frame' first.
14990 parsoid=wt2html,wt2wt,html2html
14992 [[File:Foobar.jpg|frame|caption]]
14993 [[File:Foobar.jpg|frame|frameless|caption]]
14994 [[File:Foobar.jpg|frame|thumb|caption]]
14996 <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>
14997 <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>
14998 <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>
15001 <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>
15002 <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>
15003 <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>
15007 Image with 'thumb' first.
15009 parsoid=wt2html,wt2wt,html2html
15011 [[File:Foobar.jpg|thumb|caption]]
15012 [[File:Foobar.jpg|thumb|frameless|caption]]
15013 [[File:Foobar.jpg|thumb|frame|caption]]
15015 <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>
15016 <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>
15017 <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>
15020 <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>
15021 <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>
15022 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
15025 ###################
15027 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15028 # and https://phabricator.wikimedia.org/T64258
15029 # Foobar has actual size of 1941x220
15030 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15031 # a scalable format.
15032 # 2. Framed images always ignore size options; always render at default size.
15033 # 3. "Unspecified format" and border are the only types which can be
15037 Image: unspecified format and border enlarge
15039 parsoid=wt2html,wt2wt,html2html
15041 [[File:Foobar.jpg|2000px]]
15043 [[File:Foobar.jpg|border|2000px]]
15045 <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>
15046 </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>
15049 <p><figure-inline 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></figure-inline></p>
15050 <p><figure-inline 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></figure-inline></p>
15054 Image: "unspecified format" and border reduce
15056 parsoid=wt2html,wt2wt,html2html
15058 [[File:Foobar.jpg|1000px]]
15060 [[File:Foobar.jpg|border|1000px]]
15062 <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>
15063 </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>
15066 <p><figure-inline 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></figure-inline></p>
15067 <p><figure-inline 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></figure-inline></p>
15071 Image: thumbs reduce
15073 parsoid=wt2html,wt2wt,html2html
15075 [[File:Foobar.jpg|thumb|50px]]
15077 <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>
15080 <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>
15084 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15086 parsoid=wt2html,wt2wt,html2html
15088 [[File:Foobar.jpg|thumb|2000px]]
15090 [[File:Foobar.svg|thumb|2000px]]
15092 <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>
15093 <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>
15096 <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>
15097 <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>
15101 Image: frameless can reduce in size
15103 parsoid=wt2html,wt2wt,html2html
15105 [[File:Foobar.jpg|frameless|50px]]
15107 <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>
15110 <p><figure-inline 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></figure-inline></p>
15114 Image: bitmap frameless can't be enlarged past original size, but vector can
15116 parsoid=wt2html,wt2wt,html2html
15118 [[File:Foobar.jpg|frameless|2000px]]
15120 [[File:Foobar.svg|frameless|2000px]]
15122 <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>
15123 </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>
15126 <p><figure-inline 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></figure-inline></p>
15127 <p><figure-inline 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></figure-inline></p>
15131 Image: framed images are always unscaled.
15133 parsoid=wt2html,wt2wt,html2html
15135 [[File:Foobar.jpg|frame]]
15137 [[File:Foobar.jpg|frame|50px]]
15139 [[File:Foobar.jpg|frame|50x50px]]
15141 [[File:Foobar.jpg|frame|2000px]]
15143 <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>
15144 <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>
15145 <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>
15146 <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>
15149 <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>
15150 <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>
15151 <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>
15152 <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>
15155 ###################
15158 Link to image page- image page normally doesn't exists, hence edit link
15159 Add test with existing image page
15160 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15164 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15169 T20784 Link to non-existent image page with caption should use caption as link text
15171 [[:Image:test|caption]]
15173 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15178 Frameless image caption with a free URL
15180 [[File:Foobar.jpg|http://example.com]]
15182 <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>
15185 <p><figure-inline 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></figure-inline></p>
15189 Thumbnail image caption with a free URL
15193 [[File:Foobar.jpg|thumb|http://example.com]]
15195 <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>
15198 <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>
15202 Thumbnail image caption with a free URL and explicit alt
15205 parsoid=wt2html,wt2wt,html2html
15207 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15209 <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>
15212 <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>
15216 SVG thumbnails with no language set
15219 [[File:Foobar.svg|thumb|caption]]
15221 <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>
15224 <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>
15228 SVG thumbnails with language de
15230 parsoid=wt2html,wt2wt,html2html
15232 [[File:Foobar.svg|thumb|caption|lang=de]]
15234 <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>
15237 <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>
15241 SVG thumbnails with invalid language code
15243 parsoid=wt2html,wt2wt,html2html
15245 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15247 <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>
15250 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.svg"><img resource="./File:Foobar.svg" src="//example.com/images/thumb/f/ff/Foobar.svg/220px-Foobar.svg.png" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid:language:code</figcaption></figure>
15254 T3887: A ISBN with a thumbnail
15256 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15258 <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>
15261 <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>
15265 T3887: A RFC with a thumbnail
15267 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15269 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
15272 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>This is <a href="https://tools.ietf.org/html/rfc12354" rel="mw:ExtLink">RFC 12354</a></figcaption></figure>
15276 T3887: A mailto link with a thumbnail
15278 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15280 <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>
15283 <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>
15286 # Pending resolution to T2368
15288 T2648: Frameless image caption with a link
15290 [[File:Foobar.jpg|text with a [[link]] in it]]
15292 <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>
15295 <p><figure-inline 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></figure-inline></p>
15299 T2648: Frameless image caption with a link (suffix)
15301 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15303 <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>
15306 <p><figure-inline 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></figure-inline></p>
15310 T2648: Frameless image caption with an interwiki link
15312 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15314 <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>
15317 <p><figure-inline 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:WikiLink/Interwiki\" 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></figure-inline></p>
15321 T2648: Frameless image caption with a piped interwiki link
15323 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15325 <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>
15328 <p><figure-inline 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:WikiLink/Interwiki\" 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></figure-inline></p>
15332 T107474: Frameless image caption with <nowiki>
15334 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15336 <p><figure-inline 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></figure-inline></p>
15340 Escape HTML special chars in image alt text
15342 [[File:Foobar.jpg|& < > "]]
15344 <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>
15347 <p><figure-inline 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></figure-inline></p>
15351 Escape HTML special chars in image alt text with LanguageConverter
15355 [[File:Foobar.jpg|& < > "]]
15357 <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>
15360 <p><figure-inline 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></figure-inline></p>
15364 Entities in file name and attributes
15366 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15368 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15371 <p><figure-inline 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></figure-inline></p>
15375 T2499: Alt text should have Ӓ, not &1234;
15377 [[File:Foobar.jpg|♀]]
15379 <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>
15382 <p><figure-inline 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></figure-inline></p>
15386 Broken image caption with link
15388 parsoid=wt2html,wt2wt,html2html
15390 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15392 <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.
15395 <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>
15399 Image caption containing another image
15401 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15403 <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>
15406 <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 <figure-inline 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></figure-inline> inside it!</figcaption></figure>
15410 Image: caption containing a newline
15412 [[File:Foobar.jpg|This
15415 <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>
15418 <p><figure-inline 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></figure-inline></p>
15422 Image: caption containing leading space
15423 (The leading space should not trigger nowiki escaping in wt2wt mode)
15425 [[File:Foobar.jpg|thumb| bar]]
15427 <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>
15430 <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>
15434 Image: caption containing a table
15436 parsoid=wt2html,wt2wt,html2html
15438 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15444 and some more text.]]
15446 <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>
15449 <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
15452 <tr><th>Foo </th><th>Bar</th></tr>
15455 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15459 T5090: External links other than http: in image captions
15461 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15463 <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>
15466 <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>
15472 parsoid=wt2html,wt2wt,html2html
15474 [[Image:foobar.jpg|a|class=b]]
15476 <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>
15479 <p><figure-inline 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></figure-inline></p>
15483 Localized image handling (1).
15485 parsoid=wt2html,wt2wt,html2html
15488 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15490 <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>
15493 <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>
15497 Localized image handling (2).
15500 parsoid=wt2html,wt2wt,html2html
15503 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15505 <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>
15508 <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>
15512 Localized image handling (3).
15517 <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>
15519 [[File:Foobar.jpg|بندانگشتی]]
15523 "border", "frameless" and "class" attributes on an image.
15526 parsoid=wt2html,wt2wt,html2html
15528 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15530 <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>
15533 <p><figure-inline 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></figure-inline></p>
15536 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15538 Invalid image attributes (T64500)
15541 parsoid=wt2html,wt2wt,html2html
15543 [[File:Foobar.jpg|thumb|float|left|caption]]
15545 [[File:Foobar.jpg|thumb|righ|caption]]
15547 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15549 <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>
15550 <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>
15551 <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>
15554 <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>
15555 <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>
15556 <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>
15562 #REDIRECT [[File:Barfoo.jpg]]
15565 # FIXME: Parsoid should run this test -- but we'd need to teach the
15566 # mockAPI about the redirected Barfoo.jpg image.
15570 [[Image:Barfoo.jpg]]
15572 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15577 Missing image with uploads disabled
15581 [[File:Foobaz.jpg]]
15583 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15586 <p><figure-inline 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></figure-inline></p>
15589 # Parsoid-specific testing for images
15590 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15591 # Currently imperfect due to a flaw in the Parsoid testrunner
15593 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15597 Parsoid-specific image handling - simple image with size and middle alignment
15599 [[File:Foobar.jpg|middle|50px]]
15601 <p><figure-inline 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></figure-inline></p>
15605 Parsoid-specific image handling - simple image with size, middle alignment,
15606 non-standard namespace alias
15608 parsoid=wt2wt,wt2html,html2html
15610 [[Image:Foobar.jpg|middle|50px]]
15612 <p><figure-inline 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></figure-inline></p>
15616 Parsoid-specific image handling - simple image with size and middle alignment
15619 [[File:Foobar.jpg|50px|middle]]
15621 <p><figure-inline 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></figure-inline></p>
15625 Parsoid-specific image handling - simple image with size and middle alignment
15626 and non-standard namespace name
15628 parsoid=wt2html,wt2wt,html2html
15630 [[Image:Foobar.jpg|50px|middle]]
15632 <p><figure-inline 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></figure-inline></p>
15636 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15638 [[File:Foobar.jpg|500x10px|baseline|caption]]
15640 <p><figure-inline 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></figure-inline></p>
15644 Parsoid-specific image handling - simple image with border and size spec
15646 [[File:Foobar.jpg|50px|border|caption]]
15648 <p><figure-inline 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></figure-inline></p>
15652 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15654 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15656 <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>
15660 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15663 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15665 <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>
15669 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15671 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15673 <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>
15677 Parsoid-specific image handling - thumbnail with specific size, halign,
15678 valign, and caption (existing content)
15680 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15682 <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>
15686 Parsoid-specific image handling - framed image with specific size and caption
15689 parsoid=wt2html,wt2wt,html2html
15691 [[File:Foobar.jpg|frame|500x50px|caption]]
15693 <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>
15697 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15700 parsoid=wt2html,wt2wt,html2html
15702 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15704 <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>
15708 Parsoid-specific image handling - frameless image with specific size, border, and caption
15710 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15712 <p><figure-inline 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></figure-inline></p>
15716 Parsoid-specific image handling - simple image with a formatted caption
15718 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15720 <p><figure-inline 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></figure-inline></p>
15724 Parsoid-specific image handling - caption with a template in it
15726 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15728 <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>
15732 Parsoid-specific image handling - caption with unbalanced tags in it
15734 parsoid=wt2html,wt2wt,html2html
15737 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15741 <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>
15746 Parsoid-specific image handling - empty caption (1)
15748 parsoid=wt2html,wt2wt
15750 [[File:Foobar.jpg|thumb|]]
15752 <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>
15755 # empty captions don't get serialized unless we're in the "round trip" case
15757 Parsoid-specific image handling - empty caption (2)
15761 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15762 <a href="./File:Foobar.jpg">
15763 <img resource="./File:Foobar.jpg"
15764 src="//example.com/images/3/3a/Foobar.jpg"
15765 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15766 height="25" width="220"/>
15768 <figcaption></figcaption>
15771 [[File:Foobar.jpg|thumb]]
15775 Parsoid-specific image handling - whitespace caption
15777 [[File:Foobar.jpg|thumb| ]]
15779 <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>
15783 Parsoid-specific image handling - lang option
15786 [[File:Foobar.svg|lang=de|caption]]
15790 <figure-inline 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></figure-inline>
15794 ## Edge case bugs in Parsoid from T93580
15796 T93580: 1. Templated <ref> inside block images
15798 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15802 <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>
15804 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">foo</span></li></ol>
15808 T93580: 2. <ref> inside inline images
15810 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15814 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: <ref>foo</ref>"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Extension/ref\" data-parsoid='{\"dsr\":[64,78,5,6]}' data-mw='{\"name\":\"ref\",\"body\":{\"id\":\"mw-reference-text-cite_note-1\"},\"attrs\":{}}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15816 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
15820 T93580: 3. Templated <ref> inside inline images
15822 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15826 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"caption","ak":"Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}"}]}' data-mw='{"caption":"Undisplayed caption in inline image with ref: <span about=\"#mwt2\" class=\"mw-ref\" id=\"cite_ref-1\" rel=\"dc:references\" typeof=\"mw:Transclusion mw:Extension/ref\" data-parsoid='{\"dsr\":[64,96,null,null],\"pi\":[[{\"k\":\"1\"}]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"echo\",\"href\":\"./Template:Echo\"},\"params\":{\"1\":{\"wt\":\"&lt;ref>{{echo|foo}}&lt;/ref>\"}},\"i\":0}}]}'><a href=\"./Main_Page#cite_note-1\" style=\"counter-reset: mw-Ref 1;\" data-parsoid=\"{}\"><span class=\"mw-reflink-text\" data-parsoid=\"{}\">[1]</span></a></span>"}'><a href="./File:Foobar.jpg" data-parsoid='{"a":{"href":"./File:Foobar.jpg"},"sa":{"href":"File:Foobar.jpg"}}'><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"File:Foobar.jpg"}}'/></a></figure-inline></p>
15828 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
15835 Subpage test/subpage
15843 subpage title=[[Subpage test]]
15847 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15852 Subpage noslash link
15854 subpage title=[[Subpage test]]
15858 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15863 Subpage test/1/2/subpage
15869 Relative subpage noslash link
15871 parsoid=wt2wt,wt2html,html2html
15872 subpage title=[[Subpage test/1/2/3/4]]
15878 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15879 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15882 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15883 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15887 Parsoid: dot-slash prefixed wikilinks
15897 </p><p>[[././baz/]]
15902 </p><p>[[././baz/]]
15907 Render invalid page names as plain text (T53090)
15919 [[foo[http://example.com]xyz]]
15921 [[{{echo|./../foo}}|bar]]
15922 [[{{echo|foo/.}}|bar]]
15923 [[{{echo|foo/..}}|bar]]
15924 [[{{echo|foo~~~~bar}}]]
15925 [[{{echo|foo>bar}}]]
15926 [[{{echo|foo././bar}}]]
15927 [[{{echo|foo{bar}}]]
15928 [[{{echo|foo}bar}}]]
15929 [[{{echo|foo[bar}}]]
15930 [[{{echo|foo]bar}}]]
15931 [[{{echo|foo<bar}}]]
15933 <p>[[./../foo|bar]]
15943 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15944 </p><p>[[./../foo|bar]]
15957 <p>[[./../foo|bar]]
15967 [[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
15969 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15970 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15971 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15972 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15973 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15974 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15975 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15976 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15977 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15978 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15979 [[<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>
15987 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15992 T2561: {{/Subpage}}
15994 subpage title=[[Page]]
15998 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
16006 Category:MediaWiki User's Guide
16014 [[:Category:MediaWiki User's Guide]]
16016 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16025 [[Category:MediaWiki User's Guide]]
16027 cat=MediaWiki_User's_Guide sort=
16029 <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"}}'/>
16033 PAGESINCATEGORY invalid title fatal (r33546 fix)
16035 {{PAGESINCATEGORY:<bogus>}}
16042 Category with different sort key
16046 [[Category:MediaWiki User's Guide|Foo]]
16048 cat=MediaWiki_User's_Guide sort=Foo
16050 <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"}}'/>
16054 Category with identical sort key
16058 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16060 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16062 <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"}}'/>
16066 Category with empty sort key
16071 [[Category:MediaWiki User's Guide|]]
16073 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16077 Category with empty sort key and parentheses
16082 [[Category:Foo (bar)|]]
16084 [[Category:Foo (bar)|Foo]]
16088 Category with link tail
16093 123[[Category:Foo]]456
16095 123[[Category:Foo]]456
16099 Category with template
16104 [[Category:{{echo|Foo}}]]
16106 [[Category:{{echo|Foo}}]]
16110 Category with template in sort key
16115 [[Category:Foo|{{echo|Bar}}]]
16117 [[Category:Foo|{{echo|Bar}}]]
16121 Category with template in sort key and title
16126 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16128 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16131 ## We used to, but no longer wt2wt this test since the default serializer
16132 ## will normalize all categories to serialize on their own line.
16133 ## This wikitext usage is going to be fairly uncommon in production and
16134 ## selser will take care of preserving formatting in those scenarios.
16136 Category / paragraph interactions
16140 Foo [[Category:Baz]] Bar
16142 Foo [[Category:Baz]]
16150 [[Category:Baz]] Bar
16163 {{echo|[[Category:Baz]]}}
16176 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16177 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16178 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16179 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16180 <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>
16181 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16184 ## We used to, but no longer wt2wt this test since the default serializer
16185 ## will normalize all categories to serialize on their own line.
16186 ## This wikitext usage is going to be fairly uncommon in production and
16187 ## selser will take care of preserving formatting in those scenarios.
16189 ## The whitespace on the empty line is part of the test. Please do not delete
16191 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16197 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16199 {{echo|[[Category:Foo]] and so should this!}}
16201 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16206 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16208 <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>
16211 ## Parsoid will not try to wt2wt this while preserving newlines because
16212 ## it suppresses excess newlines within list items -- and we don't want to
16213 ## introduce a special case just for categories, which is, in reality somewhat
16214 ## odd behavior -- categories are unlikely to be used in list items like this
16215 ## in top-level pages and are only likely to show up in template-generated
16216 ## list items where this RT-ing is a non-issue.
16218 ## The whitespace on the empty line is part of the test. Please do not delete
16220 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16226 [[Category:Foo]] and this should be part of the same list item
16229 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16231 <ul><li>This and this should be part of the same list item</li>
16232 <li>So should this and this should be part of the same list item</li></ul>
16235 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16236 <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>
16240 ## Newlines and categories that follow the last item of a list
16241 ## are treated differently because this (list followed by categories)
16242 ## is an extremely common pattern on wikis.
16244 3. Categories and newlines: newline suppression for last list item should RT properly
16257 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16259 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16260 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16264 4. Categories and newlines: newline suppression for last list item should RT properly
16272 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16274 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16277 ## only wt2html for this to make sure the algo only applies to the rightmost path
16279 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16292 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16294 <ul><li> d</li></ul></li></ul>
16295 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16298 ## We used to, but no longer wt2wt this test since the default serializer
16299 ## will normalize all categories to serialize on their own line.
16300 ## This wikitext usage is going to be fairly uncommon in production and
16301 ## selser will take care of preserving formatting in those scenarios.
16303 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16307 * a [[Category:Foo]]
16309 <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>
16312 # This test also demonstrates because of newline+category tunneling
16313 # through the list hander, template wrapping doesn't expand to the
16314 # containing list when the list item swallows the category.
16316 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16321 <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
16322 </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>
16326 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16330 {{echo|[[Category:Foo]]
16334 <ul><li> a</li></ul>
16336 <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">
16337 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16338 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16342 9. Categories and newlines: should behave properly with linkprefix (T87753)
16357 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16358 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16362 10. No regressions on internal links following category (T174639)
16364 parsoid=wt2html,html2html
16366 [[Category:Foo]]<div>a
16371 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16374 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16376 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16379 # Note that Parsoid differs slightly from PHP due to T175421
16381 11. Special case where only newlines separate links (T175416)
16383 parsoid=wt2html,html2html
16387 [[Foo]][[es:Alimento]]
16392 <a href="/wiki/Foo" title="Foo">Foo</a>
16393 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16396 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16398 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16400 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16404 Category links with multiple namespaces
16406 [[Category:Project:Foo]]
16408 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16412 Parsoid: Serialize link to category page with colon escape
16418 [[:Category:Foo|Bar]]
16421 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16422 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16426 # We used to, but no longer wt2wt this test since the default serializer
16427 # will normalize all categories to serialize on their own line.
16428 # This wikitext usage is going to be fairly uncommon in production and
16429 # selser will take care of preventing whitespace insertion if this
16430 # occurs in an article.
16432 # html2html disabled for the same reason (whitespace insertion between
16435 # html2wt disabled because it localizes the "Category" namespace.
16437 Link prefix/suffixes aren't applied to category links
16447 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16451 Link prefix/suffixes aren't applied to language links
16461 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16465 Parsoid: Serialize link to file page with colon escape
16471 [[:File:Foo.png|Bar]]
16474 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16475 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16480 Parsoid: Serialize a genuine category link without colon escape
16485 [[Category:Foo|Bar]]
16487 <link rel="mw:PageProp/Category" href="./Category:Foo">
16488 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16492 Normalize hrefs properly before testing for invalid link targets (T72894)
16496 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16498 [[Category:Toxine bactérienne]]
16502 Parsoid: Defaultsort
16504 {{DEFAULTSORT:Foo}}
16506 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16509 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16510 # But, this is a limitation of our representation and is documented in
16511 # TemplateHandler.js in processSpecialMagicWord
16513 Parsoid: Defaultsort (template-generated)
16515 {{{{echo|DEFAULTSORT}}:Foo}}
16517 <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"}]]}'/>
16521 ### Inter-language links
16524 Interlanguage links
16532 es:Alimento fr:Nourriture zh:食品
16534 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16535 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16536 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16540 Duplicate interlanguage links (T26502)
16551 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16552 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16553 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16554 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16561 Basic section headings
16568 ===Smaller headline===
16571 <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>
16574 <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>
16577 <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>
16583 Section headings with TOC
16586 === Subheadline 1 ===
16587 ===== Skipping a level =====
16588 ====== Skipping a level ======
16592 ===Another headline===
16594 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16596 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16598 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16600 <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>
16602 <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>
16609 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16611 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16617 <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>
16618 <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>
16619 <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>
16620 <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>
16621 <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>
16624 <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>
16629 TOC anchors don't collide
16637 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16639 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16640 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16641 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16642 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16646 <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>
16647 <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>
16648 <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>
16649 <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>
16653 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16654 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16656 Handling of sections up to level 6 and beyond
16661 == Level 2 Heading==
16662 === Level 3 Heading===
16663 ==== Level 4 Heading====
16664 ===== Level 5 Heading=====
16665 ====== Level 6 Heading======
16666 ======= Level 7 Heading=======
16667 ======== Level 8 Heading========
16668 ========= Level 9 Heading=========
16669 ========== Level 10 Heading==========
16671 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16673 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16675 <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>
16677 <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>
16679 <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>
16681 <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>
16683 <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>
16684 <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>
16685 <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>
16686 <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>
16687 <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>
16701 <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>
16702 <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>
16703 <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>
16704 <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>
16705 <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>
16706 <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>
16707 <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>
16708 <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>
16709 <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>
16710 <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>
16713 <h1 id="Level_1_Heading" data-parsoid='{}'> Level 1 Heading</h1>
16714 <h2 id="Level_2_Heading" data-parsoid='{}'> Level 2 Heading</h2>
16715 <h3 id="Level_3_Heading" data-parsoid='{}'> Level 3 Heading</h3>
16716 <h4 id="Level_4_Heading" data-parsoid='{}'> Level 4 Heading</h4>
16717 <h5 id="Level_5_Heading" data-parsoid='{}'> Level 5 Heading</h5>
16718 <h6 id="Level_6_Heading" data-parsoid='{}'> Level 6 Heading</h6>
16719 <h6 id="=_Level_7_Heading=" data-parsoid='{}'><span id=".3D_Level_7_Heading.3D" typeof="mw:FallbackId"></span>= Level 7 Heading=</h6>
16720 <h6 id="==_Level_8_Heading==" data-parsoid='{}'><span id=".3D.3D_Level_8_Heading.3D.3D" typeof="mw:FallbackId"></span>== Level 8 Heading==</h6>
16721 <h6 id="===_Level_9_Heading===" data-parsoid='{}'><span id=".3D.3D.3D_Level_9_Heading.3D.3D.3D" typeof="mw:FallbackId"></span>=== Level 9 Heading===</h6>
16722 <h6 id="====_Level_10_Heading====" data-parsoid='{}'><span id=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D" typeof="mw:FallbackId"></span>==== Level 10 Heading====</h6>
16726 TOC regression (T11764)
16730 ==== title 1.1.1 ====
16735 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16737 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16739 <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>
16741 <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>
16744 <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>
16747 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16749 <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>
16755 <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>
16756 <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>
16757 <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>
16758 <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>
16759 <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>
16760 <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>
16765 TOC for heading containing <span id="..."></span> (T96153)
16768 ==<span id="old-anchor"></span>New title==
16770 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16772 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16776 <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>
16781 TOC with wgMaxTocLevel=3 (T8204)
16787 ==== title 1.1.1 ====
16792 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16794 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16796 <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>
16797 <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>
16800 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16802 <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>
16808 <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>
16809 <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>
16810 <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>
16811 <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>
16812 <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>
16813 <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>
16818 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16824 ====Section 1.1.1====
16825 ====Section 1.1.1.1====
16828 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16830 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16832 <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>
16835 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16839 <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>
16840 <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>
16841 <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>
16842 <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>
16843 <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>
16849 Resolving duplicate section names
16854 <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>
16855 <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>
16860 Resolving duplicate section names with differing case (T12721)
16865 <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>
16866 <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>
16878 Template with sections, __NOTOC__
16885 <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>
16886 <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>
16887 <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>
16888 <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>
16893 __NOEDITSECTION__ keyword
16899 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16900 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16905 Link inside a section heading
16907 ==Section with a [[Main Page|link]] in it==
16909 <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>
16914 TOC regression (T14077)
16921 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16923 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16925 <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>
16928 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16932 <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>
16933 <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>
16934 <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>
16939 T3219 URL next to image (good)
16941 http://example.com [[File:Foobar.jpg]]
16943 <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>
16946 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> <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>
16949 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16951 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16953 parsoid=wt2html,html2html
16956 The line above must have a trailing space!
16959 But just in case it doesn't...
16961 <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>
16962 <p>The line above must have a trailing space!
16964 <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>
16965 <p>But just in case it doesn't...
16968 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16969 <p>The line above must have a trailing space!</p>
16970 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16972 <p>But just in case it doesn't...</p>
16976 Header with special characters (T27462)
16978 The tooltips shall not show entities to the user (ie. be double escaped)
16995 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16997 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16999 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
17000 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
17001 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
17002 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
17003 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
17007 <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>
17010 <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>
17013 <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>
17016 <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>
17019 <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>
17023 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17025 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span> text > text </h2>
17028 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span> text < text </h2>
17031 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span> text & text </h2>
17034 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span> text ' text </h2>
17037 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span> text " text </h2>
17042 Header with space, plus and underscore as entity
17044 Id should not contain + for spaces
17046 == Space between Text ==
17049 == Space-Entity between Text ==
17052 == Plus+between+Text ==
17055 == Plus-Entity+between+Text ==
17058 == Underscore_between_Text ==
17061 == Underscore-Entity_between_Text ==
17064 [[#Space between Text]]
17065 [[#Space-Entity between Text]]
17066 [[#Plus+between+Text]]
17067 [[#Plus-Entity+between+Text]]
17068 [[#Underscore_between_Text]]
17069 [[#Underscore-Entity_between_Text]]
17071 <p>Id should not contain + for spaces
17073 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17075 <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>
17076 <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>
17077 <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>
17078 <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>
17079 <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>
17080 <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>
17084 <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>
17087 <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>
17090 <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>
17093 <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>
17096 <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>
17099 <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>
17101 </p><p><a href="#Space_between_Text">#Space between Text</a>
17102 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17103 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17104 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17105 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17106 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17109 <p>Id should not contain + for spaces</p>
17111 <h2 id="Space_between_Text"> Space between Text </h2>
17114 <h2 id="Space-Entity_between_Text"> Space-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#32;","srcContent":" "}'> </span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#32;","srcContent":" "}'> </span>Text </h2>
17117 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span> Plus+between+Text </h2>
17120 <h2 id="Plus-Entity+between+Text"><span id="Plus-Entity.2Bbetween.2BText" typeof="mw:FallbackId"></span> Plus-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#43;","srcContent":"+"}'>+</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#43;","srcContent":"+"}'>+</span>Text </h2>
17123 <h2 id="Underscore_between_Text"> Underscore_between_Text </h2>
17126 <h2 id="Underscore-Entity_between_Text"> Underscore-Entity<span typeof="mw:Entity" data-parsoid='{"src":"&#95;","srcContent":"_"}'>_</span>between<span typeof="mw:Entity" data-parsoid='{"src":"&#95;","srcContent":"_"}'>_</span>Text </h2>
17129 <p><a rel="mw:WikiLink" href="./Main_Page#Space_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space_between_Text"},"sa":{"href":"#Space between Text"}}'>#Space between Text</a>
17130 <a rel="mw:WikiLink" href="./Main_Page#Space-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Space-Entity_between_Text"},"sa":{"href":"#Space-Entity&#32;between&#32;Text"}}'>#Space-Entity between Text</a>
17131 <a rel="mw:WikiLink" href="./Main_Page#Plus+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus+between+Text"},"sa":{"href":"#Plus+between+Text"}}'>#Plus+between+Text</a>
17132 <a rel="mw:WikiLink" href="./Main_Page#Plus-Entity+between+Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Plus-Entity+between+Text"},"sa":{"href":"#Plus-Entity&#43;between&#43;Text"}}'>#Plus-Entity+between+Text</a>
17133 <a rel="mw:WikiLink" href="./Main_Page#Underscore_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore_between_Text"},"sa":{"href":"#Underscore_between_Text"}}'>#Underscore_between_Text</a>
17134 <a rel="mw:WikiLink" href="./Main_Page#Underscore-Entity_between_Text" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Underscore-Entity_between_Text"},"sa":{"href":"#Underscore-Entity&#95;between&#95;Text"}}'>#Underscore-Entity_between_Text</a></p>
17137 # Parsoid html2wt disabled because it adds padding spaces around =
17139 Headers with excess '=' characters
17140 (Are similar tests necessary beyond the 1st level?)
17142 parsoid=wt2html,wt2wt,html2html
17146 =''italic'' heading==
17147 ==''italic'' heading=
17149 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17151 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17152 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17153 <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>
17154 <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>
17158 <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>
17159 <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>
17160 <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>
17161 <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>
17164 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17165 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17166 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17167 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17171 HTML headers vs TOC (T25393)
17172 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17184 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17186 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17188 <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>
17189 <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>
17192 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17194 <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>
17195 <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>
17201 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17202 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17203 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17204 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
17205 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17206 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17209 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17210 <h2 id="Header_1.1" data-parsoid='{}'> Header 1.1 </h2>
17211 <h2 id="Header_1.2" data-parsoid='{}'> Header 1.2 </h2>
17213 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17215 <h2 id="Header_2.1" data-parsoid='{}'> Header 2.1 </h2>
17216 <h2 id="Header_2.2" data-parsoid='{}'> Header 2.2 </h2>
17217 <meta property="mw:PageProp/noeditsection"/>
17221 Single-line or multiline-comments can follow headings
17223 parsoid=wt2html,wt2wt
17231 <h2><span class="mw-headline" id="foo">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></h2>
17232 <h2><span class="mw-headline" id="bar">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: bar">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17233 <h2><span class="mw-headline" id="baz">baz</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: baz">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
17236 <h2 id="foo">foo</h2><!---->
17237 <h2 id="bar">bar</h2><!--c1-->
17238 <h2 id="baz">baz</h2><!--
17244 T3219 URL next to image (broken)
17246 http://example.com[[File:Foobar.jpg]]
17248 <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>
17251 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a><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>
17255 T3186 news: in the middle of text
17257 http://en.wikinews.org/wiki/Wikinews:Workplace
17259 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17265 Namespaced link must have a title
17274 Namespaced link must have a title (bad fragment version)
17276 [[Project:#fragment]]
17278 <p>[[Project:#fragment]]
17284 ### HTML tags and HTML attributes
17288 div with no attributes
17290 <div>HTML rocks</div>
17292 <div>HTML rocks</div>
17297 div with double-quoted attribute
17299 <div id="rock">HTML rocks</div>
17301 <div id="rock">HTML rocks</div>
17306 div with single-quoted attribute
17308 <div id='rock'>HTML rocks</div>
17310 <div id="rock">HTML rocks</div>
17315 div with unquoted attribute
17317 <div id=rock>HTML rocks</div>
17319 <div id="rock">HTML rocks</div>
17324 div with illegal double attributes
17326 <div id="a" id="b">HTML rocks</div>
17328 <div id="b">HTML rocks</div>
17333 div with empty attribute value, space before equals
17335 parsoid=wt2html,html2html
17337 <div class =>HTML rocks</div>
17339 <div class="">HTML rocks</div>
17342 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17346 div with multiple empty attribute values
17348 wgFragmentMode=[ 'html5', 'legacy' ]
17350 parsoid=wt2html,html2html
17352 <div id= title=>HTML rocks</div>
17354 <div id="title=">HTML rocks</div>
17357 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17361 table with multiple empty attribute values
17363 parsoid=wt2html,html2html
17369 <table title="id=">
17375 <table title="id=">
17376 <tbody><tr><td> hi</td></tr>
17381 div with braces in attribute value
17383 <div title="{}">Foo</div>
17385 <div title="{}">Foo</div>
17388 <div title="{}">Foo</div>
17392 div with empty attribute value, no space before equals
17394 parsoid=wt2html,html2html
17396 <div class=>HTML rocks</div>
17398 <div class="">HTML rocks</div>
17401 <div class="">HTML rocks</div>
17405 HTML multiple attributes correction
17407 <p class="error" class="awesome">Awesome!</p>
17409 <p class="awesome">Awesome!</p>
17414 Table multiple attributes correction
17417 !+ class="error" class="awesome"| status
17422 <th class="awesome"> status
17430 <DIV ID="x">HTML ROCKS</DIV>
17432 <div id="x">HTML ROCKS</div>
17437 Non-ASCII pseudo-tags are rendered as text
17446 Pseudo-tag with URL 'name' renders as url link
17448 <http://example.com/>
17450 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17455 text with amp in the middle of nowhere
17459 <p>Remember AT&T?
17464 text with character entity: eacute
17466 I always thought é was a cute letter.
17468 <p>I always thought é was a cute letter.
17471 <p>I always thought é was a cute letter.</p>
17475 text with entity-escaped character entity-like string: eacute
17477 I always thought &eacute; was a cute letter.
17479 <p>I always thought &eacute; was a cute letter.
17484 text with undefined character entity: xacute
17486 I always thought &xacute; was a cute letter.
17488 <p>I always thought &xacute; was a cute letter.
17495 <data value="5">five</data>
17496 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17497 <mark>This highlighted text</mark>
17499 <p><data value="5">five</data>
17500 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17501 <mark>This highlighted text</mark>
17506 HTML tag with leading space is parsed as text
17510 <p>< div>foo< /div>
17514 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17515 ## the HTML5 parsing spec.
17517 Element with broken attribute syntax
17521 <div style=" style="123">hi</div>
17524 <div style="123">hi</div>
17528 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17529 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17533 ### Nesting tests (see T43545, T52604, T53081)
17536 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17537 # Note that html2wt is considerably more difficult if we use <b> in
17538 # the test case, instead of <small>
17540 Ensure that HTML adoption agency algorithm is properly implemented.
17542 <small>X<small>Y</small>Z</small>
17544 <p><small>X<small>Y</small>Z</small>
17548 # This was T43545 in the PHP parser.
17549 # Note that tidy doesn't handle this correctly.
17553 <kbd>X<kbd>Y</kbd>Z</kbd>
17555 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17559 # The following cases were T53081 in the PHP parser.
17560 # Note that there are some other nestable tags (b, i, etc) which are
17561 # not covered; see T53081 for discussion.
17563 # Note that tidy doesn't handle this correctly.
17567 <em>X<em>Y</em>Z</em>
17569 <p><em>X<em>Y</em>Z</em>
17573 # Note that tidy doesn't handle this correctly.
17575 Nesting of <strong>
17577 <strong>X<strong>Y</strong>Z</strong>
17579 <p><strong>X<strong>Y</strong>Z</strong>
17588 <p><q>X<q>Y</q>Z</q></p>
17591 # Note that tidy doesn't handle this correctly.
17595 <ruby>X<ruby>Y</ruby>Z</ruby>
17597 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17601 # Note that tidy doesn't handle this correctly.
17605 <bdo>X<bdo>Y</bdo>Z</bdo>
17607 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17619 [[Media:Foobar.jpg]]
17620 [[Media:Video.ogv]]
17621 [[:Media:Video.ogv]]
17623 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17624 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17625 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17628 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17629 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17630 <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>
17634 Media link with text
17636 [[Media:Foobar.jpg|A neat file to look at]]
17638 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17641 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17644 # FIXME: this is still bad HTML tag nesting
17645 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17647 Media link with nasty text
17649 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17651 <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>
17654 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
17655 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
17657 <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>
17662 Media link to nonexistent file (T3702)
17664 [[Media:No such.jpg]]
17665 [[Media:No_such file.jpg]]
17667 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17668 <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>
17671 <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>
17672 <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>
17676 Image link to nonexistent file (T3850 - good)
17678 [[File:No_such.jpg]]
17680 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17683 <p><figure-inline 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></figure-inline></p>
17687 :Image link to nonexistent file (T3850 - bad)
17689 [[:Image:No such.jpg]]
17691 <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>
17694 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17698 Character reference normalization in link text (T3938)
17700 [[Main Page|this&that]]
17702 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17709 Test for unicode normalization
17711 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17715 (T21451) Links should refer to the normalized form.
17723 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17724 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17725 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17726 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17727 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17732 Empty attribute crash test (T4067)
17734 <font color="">foo</font>
17736 <p><font color="">foo</font>
17741 Empty attribute crash test single-quotes (T4067)
17743 <font color=''>foo</font>
17745 <p><font color="">foo</font>
17750 Attribute test: equals, then nothing
17752 parsoid=wt2html,html2html
17754 <font color=>foo</font>
17756 <p><font color="">foo</font>
17759 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17763 Attribute test: unquoted value
17765 parsoid=wt2html,html2html
17767 <font color=x>foo</font>
17769 <p><font color="x">foo</font>
17772 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17776 Attribute test: unquoted but illegal value (hash)
17778 <font color=#x>foo</font>
17780 <p><font color="#x">foo</font>
17784 # Parsoid does not serialize to empty attribute syntax,
17785 # so wt2wt and html2wt cases are skipped
17787 Attribute test: no value (T54330)
17789 parsoid=wt2html,html2html
17791 <font color>foo</font>
17793 <p><font color="">foo</font>
17796 <p><font color="">foo</font></p>
17800 T4095: link with three closing brackets
17804 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17807 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17811 T4095: link with pipe and three closing brackets
17813 [[Main Page|link]]]
17815 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17818 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17822 T4095: link with pipe and three closing brackets, version 2
17824 [[Main Page|[http://example.com/]]]
17826 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17829 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17838 Template:Dangerous attribute
17840 " onmouseover="alert(document.cookie)
17844 Template:Dangerous style attribute
17846 border-size: expression(alert(document.cookie))
17852 <div style="float: right; {{{1}}}">Magic div</div>
17856 T4304: HTML attribute safety (safe template; regression T4309)
17858 <div title="{{test}}"></div>
17860 <div title="This is a test template"></div>
17863 <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>
17866 # Parsoid has enough context to handle this case
17868 T4304: HTML attribute safety (dangerous template; 2309)
17870 <div title="{{dangerous attribute}}"></div>
17872 <div title=""></div>
17875 <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>
17879 T4304: HTML attribute safety (dangerous style template; 2309)
17881 <div style="{{dangerous style attribute}}"></div>
17883 <div style="/* insecure input */"></div>
17886 <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>
17890 T4304: HTML attribute safety (safe parameter; 2309)
17892 {{div style|width: 200px}}
17894 <div style="float: right; width: 200px">Magic div</div>
17897 <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>
17901 T4304: HTML attribute safety (unsafe parameter; 2309)
17903 {{div style|width: expression(alert(document.cookie))}}
17905 <div style="/* insecure input */">Magic div</div>
17908 <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>
17911 ## Parsoid output here differs; needs investigation.
17913 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17915 {{div style|"><script>alert(document.cookie)</script>}}
17917 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17921 ## Parsoid output here differs; needs investigation.
17923 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17925 {{div style|" ><script>alert(document.cookie)</script>}}
17927 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17932 T4304: HTML attribute safety (link)
17934 <div title="[[Main Page]]"></div>
17936 <div title="[[Main Page]]"></div>
17939 <div title="[[Main Page]]"></div>
17943 T4304: HTML attribute safety (italics)
17945 <div title="''foobar''"></div>
17947 <div title="''foobar''"></div>
17952 T4304: HTML attribute safety (bold)
17954 <div title="'''foobar'''"></div>
17956 <div title="'''foobar'''"></div>
17961 T4304: HTML attribute safety (ISBN)
17963 <div title="ISBN 1234567890"></div>
17965 <div title="ISBN 1234567890"></div>
17970 T4304: HTML attribute safety (RFC)
17972 <div title="RFC 1234"></div>
17974 <div title="RFC 1234"></div>
17979 T4304: HTML attribute safety (PMID)
17981 <div title="PMID 1234567890"></div>
17983 <div title="PMID 1234567890"></div>
17988 T4304: HTML attribute safety (web link)
17990 <div title="http://example.com/"></div>
17992 <div title="http://example.com/"></div>
17997 T4304: HTML attribute safety (named web link)
17999 <div title="[http://example.com/ link]"></div>
18001 <div title="[http://example.com/ link]"></div>
18004 <div title="[http://example.com/ link]"></div>
18008 T5244: HTML attribute safety (extension; safe)
18010 <div style="<nowiki>background:blue</nowiki>"></div>
18012 <div style="background:blue"></div>
18015 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18019 T5244: HTML attribute safety (extension; unsafe)
18021 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18023 <div style="/* insecure input */"></div>
18026 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18029 # More MSIE fun discovered by Tom Gilder
18032 MSIE CSS safety test: spurious slash
18034 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18036 <div style="/* insecure input */">evil</div>
18039 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18043 MSIE CSS safety test: hex code
18045 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18047 <div style="/* insecure input */">evil</div>
18050 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18054 MSIE CSS safety test: comment in url
18056 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18058 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18061 <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>
18065 MSIE CSS safety test: comment in expression
18067 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18069 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18072 <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>
18076 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18078 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18080 <p style="/* invalid control char */">A</p>
18083 <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>
18087 MSIE 6 CSS safety test: Fullwidth (T57332)
18089 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18090 <div style="top:EXPRESSION(alert())">B</div>
18092 <p style="/* insecure input */">A</p>
18093 <div style="/* insecure input */">B</div>
18096 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18097 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18101 MSIE 6 CSS safety test: IPA extensions (T57332)
18103 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18104 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18106 <div style="/* insecure input */">A</div>
18107 <p style="/* insecure input */">B</p>
18110 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18111 <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>
18115 MSIE 6 CSS safety test: sup/sub script (T57332)
18117 <div style="background-image:url⁽javascript:alert())">A</div>
18118 <div style="background-image:url₍javascript:alert())">B</div>
18119 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18121 <div style="/* insecure input */">A</div>
18122 <div style="/* insecure input */">B</div>
18123 <p style="/* insecure input */">C</p>
18126 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18127 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18128 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18134 parsoid=wt2html,html2html
18137 title="data:text/html,<img src=1 onerror=alert(1)>"
18138 style="-o-link:attr(title);-o-link-source:current">X</div>
18140 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18143 <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>
18147 MSIE 6 CSS safety test: Repetition markers (T57332)
18149 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18150 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18151 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18152 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18153 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18154 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18155 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18157 <p style="/* insecure input */">A</p>
18158 <p style="/* insecure input */">B</p>
18159 <p style="/* insecure input */">C</p>
18160 <p style="/* insecure input */">D</p>
18161 <p style="/* insecure input */">E</p>
18162 <p style="/* insecure input */">F</p>
18163 <p style="/* insecure input */">G</p>
18166 <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>
18167 <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>
18168 <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>
18169 <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>
18170 <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>
18171 <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>
18172 <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>
18176 Table attribute legitimate extension
18179 !+ style="<nowiki>color:blue</nowiki>"| status
18184 <th style="color:blue"> status
18190 Table attribute safety
18193 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
18198 <th style="/* insecure input */"> status
18204 CSS line continuation 1
18206 <div style="background-image: u\ rl(test.jpg);"></div>
18208 <div style="/* insecure input */"></div>
18213 CSS line continuation 2
18215 <div style="background-image: u\ rl(test.jpg); "></div>
18217 <div style="/* invalid control char */"></div>
18228 Expansion of multi-line templates in attribute values (T8255)
18230 <div style="background: {{identity|#00FF00}}">-</div>
18232 <div style="background: #00FF00">-</div>
18237 Expansion of multi-line templates in attribute values (T8255 sanity check)
18239 <div style="background:
18242 <div style="background: #00FF00">-</div>
18245 <div style="background:
18250 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18252 <div style="background: #00FF00">-</div>
18254 <div style="background: #00FF00">-</div>
18259 Tags which are hidden from Tidy cannot pass through the Sanitizer
18261 <mw:toc><script>alert();</script></mw:toc>
18263 <p><mw:toc><script>alert();</script></mw:toc></p>
18267 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18271 Parser hook: empty input
18282 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18285 ## Don't expect parsoid to rt this form.
18287 Parser hook: empty input using terminated empty elements
18289 parsoid=wt2html,html2html
18300 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18304 Parser hook: empty input using terminated empty elements (space before)
18315 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18319 Parser hook: basic input
18330 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18333 ## Don't expect parsoid to rt this form.
18335 Parser hook: case insensitive
18337 parsoid=wt2html,html2html
18348 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18351 ## Don't expect parsoid to rt this form.
18353 Parser hook: case insensitive, redux
18355 parsoid=wt2html,html2html
18366 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18370 Parser hook: nested tags
18372 <tag><tag></tag></tag>
18381 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18385 Parser hook: basic arguments
18387 <tag width="200" height="100" depth="50" square=""></tag>
18400 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18403 ## Don't expect parsoid to rt this form.
18405 Parser hook: basic arguments, variations
18407 parsoid=wt2html,html2html
18409 <tag width=200 height = "100" depth = '50' square></tag>
18422 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18426 Parser hook: argument containing a forward slash (T7344)
18428 <tag filename="/tmp/bla"></tag>
18433 'filename' => '/tmp/bla',
18438 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18441 ## Don't expect parsoid to rt this form.
18443 Parser hook: empty input using terminated empty elements (T4374)
18445 parsoid=wt2html,html2html
18457 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18460 ## </tag> should be output literally since there is no matching tag that begins it
18461 ## Don't expect parsoid to rt this form.
18463 Parser hook: basic arguments using terminated empty elements (T4374)
18467 <tag width=200 height = "100" depth = '50' square/>
18484 <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
18488 ## Don't expect parsoid to rt this form.
18490 Parser hook: Don't allow unclosed extension tags
18496 this is a '''test'''
18498 <p>test <tag>123
18499 </p><p>this is a <b>test</b>
18502 <p>test <tag>123</p>
18504 <p>this is a <b>test</b></p>
18508 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18512 Parser hook: static parser hook not inside a comment
18514 <statictag>hello, world</statictag>
18516 <statictag action="flush" />
18522 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18523 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18527 Parser hook: static parser hook inside a comment
18529 <!-- <statictag>hello, world</statictag> -->
18530 <statictag action="flush" />
18535 <!-- <statictag>hello, world</statictag> -->
18536 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18539 # Nested template calls; this case was broken by Parser.php rev 1.506,
18543 Template:One-parameter
18545 (My parameter is: {{{1}}})
18549 Template:Map-one-parameter
18551 {{{{{1}}}|{{{2}}}}}
18555 Nested template calls
18557 {{Map-one-parameter|One-parameter|param}}
18559 <p>(My parameter is: param)
18568 # HTML+Tidy strips out empty tags completely. Parsoid doesn't.
18569 # FIXME: Wikitext for this first test doesn't match its title.
18571 Sanitizer: Closing of open tags
18573 <s></s><table></table>
18577 <s></s><table></table>
18581 Sanitizer: Closing of open but not closed tags
18590 Sanitizer: Closing of closed but not open tags
18600 Sanitizer: Closing of closed but not open table tags
18604 Table not started</td></tr></table>
18606 <p>Table not started</p>
18608 <p>Table not started</p>
18612 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18614 wgFragmentMode=[ 'html5', 'legacy' ]
18616 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18618 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18621 <p><span id="æ:_v" data-parsoid='{"stx":"html","a":{"id":"æ:_v"},"sa":{"id":"æ: v"}}'>byte</span><a rel="mw:WikiLink" href="./Main_Page#æ:_v" data-parsoid='{"stx":"piped","a":{"href":"./Main_Page#æ:_v"},"sa":{"href":"#æ: v"}}'>backlink</a></p>
18625 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18627 wgFragmentMode=[ 'legacy' ]
18629 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18631 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18635 # In HTML5, the restrictions are that id must contain at least one character,
18636 # and must not contain any space characters.
18638 Sanitizer: Validating the contents of the id attribute (T6515)
18642 <br id="" /><br id="a space" />
18647 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18649 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18653 <br id="foo" /><br id="foo" />
18655 Something need to be done. foo-2 ?
18659 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18662 <meta itemprop="hello" content="world">
18663 <meta http-equiv="refresh" content="5">
18664 <meta itemprop="hello" http-equiv="refresh" content="5">
18665 <link itemprop="hello" href="{{SERVER}}">
18666 <link rel="stylesheet" href="{{SERVER}}">
18667 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18671 <p> <meta itemprop="hello" content="world" />
18672 <meta http-equiv="refresh" content="5">
18673 <meta itemprop="hello" content="5" />
18674 <link itemprop="hello" href="http://example.org" />
18675 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18676 <link itemprop="hello" href="http://example.org" />
18683 Sanitizer: Strip comments from CSS attributes
18685 parsoid=wt2html,wt2wt
18687 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18689 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18692 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18696 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18698 [[meatball:Soft"Security]]
18700 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18703 <p><a rel="mw:WikiLink/Interwiki" href='http://www.usemod.com/cgi-bin/mb.pl?Soft"Security' title='meatball:Soft"Security'>meatball:Soft"Security</a></p>
18707 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18709 [[meatball:Foo<Bar]]
18710 [[meatball:Foo>Bar]]
18711 [[meatball:Foo<bar]]
18712 [[meatball:Foo>bar]]
18714 <p>[[meatball:Foo<Bar]]
18715 [[meatball:Foo>Bar]]
18716 [[meatball:Foo<bar]]
18717 [[meatball:Foo>bar]]
18720 <p>[[meatball:Foo<Bar]]
18721 [[meatball:Foo>Bar]]
18722 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18723 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18727 Language converter: output gets cut off unexpectedly (T7757)
18731 this bit is safe: }-
18733 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18735 then we get cut off here: }-
18737 all additional text is vanished
18739 <p>this bit is safe: }-
18740 </p><p>but if we add a conversion instance: xxx
18741 </p><p>then we get cut off here: }-
18742 </p><p>all additional text is vanished
18745 <p>this bit is safe: }-</p>
18746 <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>
18747 <p>then we get cut off here: }-</p>
18748 <p>all additional text is vanished</p>
18752 Language converter glossary rules inside attributes (T119158)
18754 language=sr variant=sr-el
18756 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18758 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18761 </p><p><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" onload="alert(1)" data-foo="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
18764 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18766 <p><span class="mw-default-size" typeof="mw:Image"><a href="./Датотека:Foobar.jpg"><img alt="foAjrjvi" resource="./Датотека:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941" data-parsoid='{"a":{"alt":"foAjrjvi","resource":"./Датотека:Foobar.jpg","height":"220","width":"1941"},"sa":{"alt":"alt=-{}-foAjrjvi-{}-","resource":"File:Foobar.jpg"}}'/></a></span></p>
18770 Self closed html pairs (T7487)
18772 <center><font id="bug" />Centered text</center>
18773 <div><font id="bug2" />In div text</div>
18775 <center><font id="bug"></font>Centered text</center>
18776 <div><font id="bug2"></font>In div text</div>
18784 Punctuation: nbsp before exclamation
18788 <p>C'est grave !
18793 Punctuation: CSS !important (T13874)
18795 <div style="width:50% !important">important</div>
18797 <div style="width:50% !important">important</div>
18802 Punctuation: CSS ! important (T13874; with space after)
18804 <div style="width:50% ! important">important</div>
18806 <div style="width:50% ! important">important</div>
18811 HTML bullet list, closed tags (T7497)
18824 <ul data-parsoid='{"stx":"html"}'>
18825 <li data-parsoid='{"stx":"html"}'>One</li>
18826 <li data-parsoid='{"stx":"html"}'>Two</li>
18832 HTML bullet list, unclosed tags (T7497)
18844 <ul data-parsoid='{"stx":"html"}'>
18845 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18846 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18852 HTML ordered list, closed tags (T7497)
18865 <ol data-parsoid='{"stx":"html"}'>
18866 <li data-parsoid='{"stx":"html"}'>One</li>
18867 <li data-parsoid='{"stx":"html"}'>Two</li>
18873 HTML ordered list, unclosed tags (T7497)
18886 <ol data-parsoid='{"stx":"html"}'>
18887 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18888 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18894 HTML nested bullet list, closed tags (T7497)
18917 <ul data-parsoid='{"stx":"html"}'>
18918 <li data-parsoid='{"stx":"html"}'>One</li>
18919 <li data-parsoid='{"stx":"html"}'>Two:
18920 <ul data-parsoid='{"stx":"html"}'>
18921 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18922 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18929 HTML nested bullet list, open tags (T7497)
18966 HTML nested ordered list, closed tags (T7497)
18991 HTML nested ordered list, open tags (T7497)
19028 HTML ordered list item with parameters oddity
19030 <ol><li id="fragment">One</li>
19033 <ol><li id="fragment">One</li>
19038 # parsoid doesn't explicitly mark autonumbered links, see T55505
19040 T7918: autonumbering
19042 [http://first/] [http://second] [ftp://ftp]
19046 [mailto:enclosed@mail.tld With target]
19048 [mailto:enclosed@mail.tld]
19050 mailto:inline@mail.tld
19052 <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>
19053 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19054 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19055 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19056 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19059 <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>
19060 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
19061 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
19062 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
19063 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19068 # Security and HTML correctness
19069 # From Nick Jenkins' fuzz testing
19073 Fuzz testing: Parser13
19087 # Note that Parsoid output differs from the PHP parser here: the PHP
19088 # parser breaks the URL for the magic word, while in Parsoid the URL
19089 # production takes precedence.
19091 Fuzz testing: Parser14
19096 <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>
19097 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
19099 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19105 <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>
19107 <div id="toc" class="toc">
19108 <div class="toctitle" lang="en" dir="ltr" xml:lang="en">
19112 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19117 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span> onmouseover= </h2>
19118 <p><a rel="mw:ExtLink" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19122 Fuzz testing: Parser14-table
19124 parsoid=wt2html,html2html
19129 <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>
19130 <table style="__TOC__">
19135 <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>
19136 <table style="__TOC__">
19143 <table style="__TOC__"></table>
19146 # Known to produce bogus xml (extra </td>)
19148 Fuzz testing: Parser16
19175 Fuzz testing: Parser21
19178 ! irc://{{ftp://a" onmouseover="alert('hello world');"
19183 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19193 Fuzz testing: Parser22
19195 http://===r:::https://b
19199 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19207 # Known to produce bad XML for now
19209 Fuzz testing: Parser24
19216 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19217 <br style="onmouseover='alert(document.cookie);' " />
19219 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19224 <u class="|">}}}} >
19225 <br style="onmouseover='alert(document.cookie);'" />
19227 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19235 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19236 <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>"}'/>}}}} >
19237 <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}'>
19241 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19244 # Note: the current result listed for this is not what the original one was,
19245 # but the original bug was JavaScript injection, which is fixed in any case.
19246 # It's not clear that the original result listed was any more correct than the
19247 # current one. Original result:
19250 # <li class="||">
19251 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19253 Fuzz testing: Parser25 (T8055)
19259 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19261 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19264 <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"]}'>
19265 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19269 Fuzz testing: URL adjacent extension (with space, clean)
19271 http://example.com <nowiki>junk</nowiki>
19273 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19276 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
19280 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19282 http://example.com<nowiki>junk</nowiki>
19284 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19287 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
19291 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19293 http://example.com<pre>junk</pre>
19295 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19298 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
19303 <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>
19307 Fuzz testing: image with bogus manual thumbnail
19309 [[Image:foobar.jpg|thumbnail= ]]
19311 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19314 <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>
19317 # Parsoid will emit the newline literally in wt2wt; see next test case.
19319 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19323 <pre dir=" "></pre>
19325 <pre dir=" "></pre>
19328 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19329 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19333 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19337 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19338 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19348 Templates in extension attributes are not expanded
19350 <pre dir="{{echo|ltr}}"></pre>
19352 <pre dir="{{echo|ltr}}"></pre>
19355 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19359 Parsing optional HTML elements (T8171)
19364 <td> Some tabular data</td>
19365 <td> More tabular data ...
19366 <td> And yet som tabular data</td>
19372 <td> Some tabular data</td>
19373 <td> More tabular data ...
19374 </td><td> And yet som tabular data</td>
19381 Correct handling of <td>, <tr> (T8171)
19386 <td> Some tabular data</td>
19387 <td> More tabular data ...</td>
19388 <td> And yet som tabular data</td>
19394 <td> Some tabular data</td>
19395 <td> More tabular data ...</td>
19396 <td> And yet som tabular data</td>
19404 Parsing crashing regression (fr:JavaScript)
19408 <p></body></x>
19413 Inline wiki vs wiki block nesting
19419 <p><b>Bold paragraph</b>
19420 </p><p>New wiki paragraph
19424 # FIXME: The current php output is documented
19425 # and desired output is the parsoid target.
19427 Inline HTML vs wiki block nesting
19433 <p><b>Bold paragraph
19434 </p><p>New wiki paragraph</b>
19437 <p><b>Bold paragraph</b>
19438 </p><p>New wiki paragraph
19442 # Original result was this:
19443 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19445 # While that might be marginally more intuitive, maybe, the six-apostrophe
19446 # construct is clearly pathological and the result stated here (which is what
19447 # the parser actually does) is about as reasonable as anything.
19449 Mixing markup for italics and bold
19452 '''bold''''''bold''bolditalics'''''
19454 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19462 Article for special page transclusion test
19466 Special page transclusion
19469 {{Special:Prefixindex/Xyzzyx}}
19471 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19477 Special page transclusion twice (T7021)
19480 {{Special:Prefixindex/Xyzzyx}}
19481 {{Special:Prefixindex/Xyzzyx}}
19483 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19485 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19491 Transclusion of default MediaWiki message
19493 {{MediaWiki:Mainpage}}
19500 Transclusion of nonexistent MediaWiki message
19502 {{MediaWiki:Mainpagexxx}}
19504 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19509 Transclusion of MediaWiki message with underscore
19511 {{MediaWiki:history_short}}
19518 Transclusion of MediaWiki message with space
19520 {{MediaWiki:history short}}
19527 Invalid header with following text
19537 Section extraction test (section 0)
19557 Section extraction test (section 1)
19579 Section extraction test (section 2)
19600 Section extraction test (section 3)
19620 Section extraction test (section 4)
19644 Section extraction test (section 5)
19664 Section extraction test (section 6)
19685 Section extraction test (section 7)
19705 Section extraction test (section 8)
19725 Section extraction test (section 9)
19746 Section extraction test (section 10)
19766 Section extraction test (nonexistent section 11)
19785 Section extraction test with bogus heading (section 1)
19790 ==bogus== not a legal section
19794 ==bogus== not a legal section
19798 Section extraction test with bogus heading (section 2)
19803 ==bogus== not a legal section
19810 Section extraction test with comment after heading (section 1)
19822 Section extraction test with comment after heading (section 2)
19834 Section extraction test with bogus <nowiki> heading (section 1)
19839 ==bogus== <nowiki>not a legal section</nowiki>
19843 ==bogus== <nowiki>not a legal section</nowiki>
19847 Section extraction test with bogus <nowiki> heading (section 2)
19852 ==bogus== <nowiki>not a legal section</nowiki>
19858 # Formerly testing for T4587, now resolved by the use of unmarked sections
19859 # instead of respecting commented sections
19861 Section extraction prefixed by comment (section 1)
19872 Section extraction prefixed by comment (section 2)
19882 # Formerly testing for T4607, now resolved by the use of unmarked sections
19883 # instead of respecting HTML-style headings
19885 Section extraction, mixed wiki and html (section 1)
19901 Section extraction, mixed wiki and html (section 2)
19917 # Formerly testing for T5342
19919 Section extraction, heading surrounded by <noinclude>
19923 <noinclude>==unmarked==</noinclude>
19929 # Test behavior of T21910
19931 Sectiion with all-equals
19936 The line above must have a trailing space
19939 But just in case it doesn't...
19943 But just in case it doesn't...
19947 Section replacement test (section 0)
19978 Section replacement test (section 1)
20007 Section replacement test (section 2)
20037 Section replacement test (section 3)
20068 Section replacement test (section 4)
20095 Section replacement test (section 5)
20126 Section replacement test (section 6)
20156 Section replacement test (section 7)
20187 Section replacement test (section 8)
20218 Section replacement test (section 9)
20247 Section replacement test (section 10)
20277 Section replacement test with initial whitespace (T15728)
20281 Preformatted initial line
20285 Preformatted initial line
20292 Section extraction, heading followed by pre with 20 spaces (T8398)
20304 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20317 Section extraction, <pre> around bogus header (T12309)
20334 Section replacement, <pre> around bogus header (T12309)
20355 Handling of 
 in URLs
20359 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20362 <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>
20366 Handling of %0A in URLs
20370 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20373 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20376 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20378 5 quotes, code coverage +1 line
20388 # same html as previous, but wikitext adjusted to match parsoid html2wt
20389 # note that wt2html and html2html will put the <i> before the <b>
20391 5 quotes, code coverage +1 line w/ nowiki (1)
20393 parsoid=wt2wt,html2wt
20395 '''''<nowiki/>'''''
20400 <p><b><i></i></b></p>
20403 # same as previous, just swapping the <i> and <b>
20405 5 quotes, code coverage +1 line w/ nowiki (2)
20407 '''''<nowiki/>'''''
20412 <p><i><b></b></i></p>
20416 Special:Search page linking.
20420 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20425 {{!}} is a magic word
20427 {{!}} is a magic word there and {{!}} is still a magic word here
20428 | is not a magic word here but {{!}} is still a magic word here
20430 <p>| is a magic word there and | is still a magic word here
20431 | is not a magic word here but | is still a magic word here
20434 <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
20435 | 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>
20441 title=[[Parser test]]
20446 * {{FULLPAGENAMEE}}
20448 * {{BASEPAGENAMEE}}
20452 * {{ROOTPAGENAMEE}}
20454 * {{TALKPAGENAMEE}}
20455 * {{SUBJECTPAGENAME}}
20456 * {{SUBJECTPAGENAMEE}}
20459 * {{NAMESPACENUMBER}}
20463 * {{SUBJECTSPACEE}}
20464 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20466 <ul><li> Parser test</li>
20467 <li> Parser_test</li>
20468 <li> Parser test</li>
20469 <li> Parser_test</li>
20470 <li> Parser test</li>
20471 <li> Parser_test</li>
20472 <li> Parser test</li>
20473 <li> Parser_test</li>
20474 <li> Parser test</li>
20475 <li> Parser_test</li>
20476 <li> Talk:Parser test</li>
20477 <li> Talk:Parser_test</li>
20478 <li> Parser test</li>
20479 <li> Parser_test</li>
20487 <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>
20490 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20493 Gallery with valid attributes
20495 <gallery type="123" summary="345">
20496 File:File:Foobar.jpg
20499 <ul class="gallery mw-gallery-traditional" type="123">
20500 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20501 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20502 <div class="gallerytext">
20508 <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"}}'>
20509 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20513 ## Parsoid thinks the "centre" here is a property, not a caption.
20518 "modes": ["wt2html"],
20519 "nativeGallery": true
20527 image4 |300px| centre
20528 image5.svg| http://///////
20533 <ul class="gallery mw-gallery-traditional">
20534 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20535 <div class="thumb" style="height: 150px;">Image1.png</div>
20536 <div class="gallerytext">
20539 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20540 <div class="thumb" style="height: 150px;">Image2.gif</div>
20541 <div class="gallerytext">
20544 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20545 <div class="thumb" style="height: 150px;">Image3</div>
20546 <div class="gallerytext">
20549 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20550 <div class="thumb" style="height: 150px;">Image4</div>
20551 <div class="gallerytext">
20556 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20557 <div class="thumb" style="height: 150px;">Image5.svg</div>
20558 <div class="gallerytext">
20559 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20563 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20564 <div class="thumb" style="height: 150px;">* image6</div>
20565 <div class="gallerytext">
20571 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20572 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20573 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20574 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image3"><img resource="./File:Image3" src="./Special:FilePath/Image3" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20575 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:Image4"><img resource="./File:Image4" src="./Special:FilePath/Image4" height="300" width="300"/></a></figure-inline></div><div class="gallerytext"></div></li>
20576 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"> <a rel="mw:ExtLink" href="http://///////">http://///////</a></div></li>
20577 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Error mw:Image"><a href="./File:*_image6"><img resource="./File:*_image6" src="./Special:FilePath/*_image6" height="120" width="120"/></a></figure-inline></div><div class="gallerytext"></div></li>
20582 Gallery (with options, html)
20585 "modes": ["wt2html", "html2html"],
20586 "nativeGallery": true
20589 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20590 File:Nonexistent.jpg|caption
20591 File:Nonexistent.jpg
20592 image:foobar.jpg|some '''caption''' [[Main Page]]
20594 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20597 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20598 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20599 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20600 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20601 <div class="gallerytext">
20606 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20607 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20608 <div class="gallerytext">
20611 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20612 <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>
20613 <div class="gallerytext">
20614 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20618 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20619 <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>
20620 <div class="gallerytext">
20623 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20624 <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>
20625 <div class="gallerytext">
20633 <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":{}}'>
20634 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20635 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext">caption</div></li>
20636 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20637 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
20638 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20639 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext">blabla.</div></li>
20644 Gallery (with options, extsrc)
20647 "nativeGallery": false
20650 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20651 File:Nonexistent.jpg|caption
20652 File:Nonexistent.jpg
20653 image:foobar.jpg|some '''caption''' [[Main Page]]
20655 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20658 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20659 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20660 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20661 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20662 <div class="gallerytext">
20667 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20668 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20669 <div class="gallerytext">
20672 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20673 <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>
20674 <div class="gallerytext">
20675 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20679 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20680 <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>
20681 <div class="gallerytext">
20684 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20685 <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>
20686 <div class="gallerytext">
20694 <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"}}'>
20695 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20696 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext">caption</div></li>
20697 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20698 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext">some <b>caption</b> <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></div></li>
20699 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20700 <li class="gallerybox" style="width: 105px;"><div class="thumb" style="width: 100px; height: 70px;"><figure-inline 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></figure-inline></div><div class="gallerytext">blabla.</div></li>
20705 Gallery with link that has fragment
20708 "modes": ["wt2html", "html2html"],
20709 "nativeGallery": true
20713 image:foobar.jpg|link=Main_Page
20714 image:foobar.jpg|link=Main_Page#section
20715 image:foobar.jpg|link=Main Page#section|caption
20718 <ul class="gallery mw-gallery-traditional">
20719 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20720 <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>
20721 <div class="gallerytext">
20724 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20725 <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>
20726 <div class="gallerytext">
20729 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20730 <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>
20731 <div class="gallerytext">
20739 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20740 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20741 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20742 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext">caption</div></li>
20746 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20748 Gallery with template inside caption
20751 "nativeGallery": true
20754 <gallery caption="{{echo|hi}}">
20755 File:Foobar.jpg|{{echo|ho}}
20758 <ul class="gallery mw-gallery-traditional">
20759 <li class='gallerycaption'>{{echo|hi}}</li>
20760 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20761 <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>
20762 <div class="gallerytext">
20770 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20771 <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>
20772 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></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>
20777 Gallery with wikitext inside caption
20780 "nativeGallery": true
20784 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20785 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20788 <ul class="gallery mw-gallery-traditional">
20789 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20790 <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>
20791 <div class="gallerytext">
20792 <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>
20796 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20797 <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>
20798 <div class="gallerytext">
20799 <p>This is a test template
20806 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20807 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"><figure-inline 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></figure-inline></div></li>
20808 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></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>
20813 Gallery (with showfilename option)
20816 "nativeGallery": true
20819 <gallery showfilename="">
20820 File:Nonexistent.jpg|caption
20821 File:Nonexistent.jpg
20822 File:Foobar.jpg|some '''caption''' [[Main Page]]
20826 <ul class="gallery mw-gallery-traditional">
20827 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20828 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20829 <div class="gallerytext">
20830 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20835 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20836 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20837 <div class="gallerytext">
20838 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20842 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20843 <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>
20844 <div class="gallerytext">
20845 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20846 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20850 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20851 <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>
20852 <div class="gallerytext">
20853 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20860 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20861 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a>caption</div></li>
20862 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"><a href="./File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">File:Nonexistent.jpg</a></div></li>
20863 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></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>
20864 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"><a href="./File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">File:Foobar.jpg</a></div></li>
20868 ## Should Parsoid be preserving these variations? See T151367
20870 Gallery (with namespace-less filenames)
20873 "modes": ["wt2html", "html2html"],
20874 "nativeGallery": true
20878 File:Nonexistent.jpg
20884 <ul class="gallery mw-gallery-traditional">
20885 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20886 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20887 <div class="gallerytext">
20890 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20891 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20892 <div class="gallerytext">
20895 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20896 <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>
20897 <div class="gallerytext">
20900 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20901 <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>
20902 <div class="gallerytext">
20908 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20909 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20910 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20911 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20912 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20917 Gallery override link with wikilink (T36852)
20920 "nativeGallery": true
20924 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20927 <ul class="gallery mw-gallery-traditional">
20928 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20929 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/Wikilink"><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>
20930 <div class="gallerytext">
20936 <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":{}}'>
20937 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline typeof="mw:Image"><a href="./Wikilink"><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></figure-inline></div><div class="gallerytext"></div></li>
20942 Gallery override link with absolute external link (T36852)
20945 "nativeGallery": true
20949 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20952 <ul class="gallery mw-gallery-traditional">
20953 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20954 <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>
20955 <div class="gallerytext">
20961 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20962 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
20967 Gallery override link with absolute external link with LanguageConverter
20972 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20975 <ul class="gallery mw-gallery-traditional">
20976 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20977 <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>
20978 <div class="gallerytext">
20988 Gallery override link with malicious javascript (T36852)
20991 "modes": ["wt2html", "html2html"],
20992 "nativeGallery": true
20996 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20999 <ul class="gallery mw-gallery-traditional">
21000 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21001 <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>
21002 <div class="gallerytext">
21008 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21009 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
21013 # Note that parsoid uses the invalid link as a caption, PHP does not.
21015 Gallery with invalid title as link (T45964)
21018 "modes": ["wt2html", "html2html"],
21019 "nativeGallery": true
21023 File:Foobar.jpg|link=<
21026 <ul class="gallery mw-gallery-traditional">
21027 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21028 <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>
21029 <div class="gallerytext">
21035 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21036 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext">link=<</div></li>
21041 Serialize gallery without attrs in data-mw
21044 "modes": ["html2wt"],
21045 "nativeGallery": true
21048 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21049 <li class="gallerycaption">123</li>
21050 <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>
21053 <gallery caption="123">
21059 Gallery with class and style attributes
21062 "nativeGallery": true
21065 <gallery class="center" style="text-align: center;">
21069 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21070 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21071 <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>
21072 <div class="gallerytext">
21078 <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":{}}'>
21079 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
21084 Gallery in slideshow mode
21087 "nativeGallery": true
21090 <gallery mode="slideshow" showthumbnails="">
21094 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21095 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21096 <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>
21097 <div class="gallerytext">
21103 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21104 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"></div></li>
21109 HTML Hex character encoding (spells the word "JavaScript")
21111 parsoid=wt2html,wt2wt,html2html
21113 JavaScript
21115 <p>JavaScript
21120 <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>
21124 HTML Hex character encoding bogus encoding (T28437 regression check)
21128 <p>&#xsee;&#XSEE;
21131 <p>&#xsee;&#XSEE;</p>
21135 HTML Hex character encoding mixed case
21137 parsoid=wt2html,wt2wt,html2html
21146 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21149 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21150 # Note that U+000C (form feed) is not a valid XML character, so
21151 # it is banned even though allowed in HTML5.
21153 Illegal character references (T106578)
21158 ; Control (low): 
21159 ; Control (high):  Ÿ
21160 ; Surrogate: ��
21161 ; This is an okay astral character: 💩
21170 <dt>Control (low)</dt>
21172 <dt>Control (high)</dt>
21173 <dd>&#x7F; &#x9F;</dd>
21175 <dd>&#xD83D;&#xDCA9;</dd>
21176 <dt>This is an okay astral character</dt>
21182 __FORCETOC__ override
21194 ISBN 978-0-1234-56 789
21196 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21199 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
21201 <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>
21205 ISBN followed by 5 spaces
21216 ISBN ISBN 1234567890
21218 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21221 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21224 # Uppercase X and lowercase x as well
21235 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21236 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21237 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21238 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21239 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21240 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21243 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21244 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21245 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21246 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21247 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21248 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21252 ISBN with empty prefix (parsoid test)
21256 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21259 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21263 T24905: <abbr> followed by ISBN followed by </a>
21265 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21267 <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>
21270 <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>
21278 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21283 Double RFC with a wiki link
21287 <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>
21296 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21299 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
21303 Centre-aligned image
21305 [[Image:foobar.jpg|centre]]
21307 <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>
21314 [[Image:foobar.jpg|none]]
21316 <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>
21321 Width + Height sized image (using px) (height is ignored)
21323 [[Image:foobar.jpg|640x480px]]
21325 <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>
21330 Width-sized image (using px, no following whitespace)
21332 [[Image:foobar.jpg|640px]]
21334 <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>
21339 Width-sized image (using px, with following whitespace - test regression from r39467)
21341 [[Image:foobar.jpg|640px ]]
21343 <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>
21348 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21350 [[Image:foobar.jpg| 640px]]
21352 <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>
21357 Image with page parameter
21361 [[File:LoremIpsum.djvu|page=2]]
21363 <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>
21366 <p><figure-inline 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></figure-inline></p>
21370 Another italics / bold test
21378 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21384 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21387 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21391 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21393 Images with the "|" character in the comment
21395 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21397 <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>
21400 <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>
21404 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21406 <html><script>alert(1);</script></html>
21408 <p><html><script>alert(1);</script></html>
21413 HTML with raw HTML ($wgRawHtml==true)
21417 <html><script>alert(1);</script></html>
21419 <p><script>alert(1);</script>
21424 Parents of subpages, one level up
21426 subpage title=[[Subpage test/L1/L2/L3]]
21430 <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>
21436 Parents of subpages, one level up, not named
21438 subpage title=[[Subpage test/L1/L2/L3]]
21442 <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>
21449 Parents of subpages, two levels up
21451 subpage title=[[Subpage test/L1/L2/L3]]
21457 <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
21458 </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>
21463 Parents of subpages, two levels up, without trailing slash or name.
21465 subpage title=[[Subpage test/L1/L2/L3]]
21474 Parents of subpages, two levels up, with lots of extra trailing slashes.
21476 subpage title=[[Subpage test/L1/L2/L3]]
21480 <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>
21485 Subpage test/L1/L2/L3Sibling
21491 Transclusion of a sibling page (one level up)
21493 subpage title=[[Subpage test/L1/L2/L3]]
21502 Transclusion of a child page
21504 subpage title=[[Subpage test/L1/L2]]
21512 # This is wt2html only in Parsoid because we add <nowiki>
21513 # because of {{..}} and we don't expect to fix that to
21514 # eliminate the nowikis selective for {{..}} markup.
21516 Non-transclusion because of too many up levels
21518 subpage title=[[Subpage test/L1/L2/L3]]
21521 {{../../../../More than parent}}
21523 <p>{{../../../../More than parent}}
21526 <p>{{../../../../More than parent}}</p>
21530 Definition list code coverage
21536 <dl><dt> title  </dt>
21538 <dt> title </dt>
21544 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21545 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21546 <dt>title</dt><dd> def</dd></dl>
21550 Don't fall for the self-closing div
21552 <div>hello world</div/>
21554 <div>hello world</div>
21563 <p>[[:Template:Msg]]
21572 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21576 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21578 Always escape literal '>' in output, not just after '<'
21592 <p>This is a test template
21593 This is a test template
21605 Inclusion of !userCanEdit() content
21609 <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>
21615 Out-of-order TOC heading levels
21624 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21626 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21628 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21629 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21632 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21634 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21635 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21641 <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>
21642 <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>
21643 <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>
21644 <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>
21645 <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>
21646 <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>
21652 ISBN with a dummy number
21662 ISBN with space-delimited number
21666 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21669 <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>
21674 ISBN with multiple spaces, no number
21693 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21694 </p><p>ISBN 12345678901
21697 <p>ISBN 123456789</p>
21699 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21701 <p>ISBN 12345678901</p>
21706 ISBN with trailing year (T9110)
21708 ISBN 1-234-56789-0 - 2006
21710 ISBN 1 234 56789 0 - 2006
21712 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21713 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21716 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21718 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21725 wgFragmentMode=[ 'html5', 'legacy' ]
21727 {{anchorencode:foo bar©#%n}}
21732 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:foo bar©#%n","function":"anchorencode"},"params":{},"i":0}}]}'>foo_bar©#%n</p>
21736 anchorencode (legacy)
21738 wgFragmentMode=[ 'legacy' ]
21740 {{anchorencode:foo bar©#%n}}
21742 <p>foo_bar.C2.A9.23.25n
21747 anchorencode trims spaces
21749 wgFragmentMode=[ 'html5', 'legacy' ]
21751 {{anchorencode: __pretty__please__}}
21756 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21760 anchorencode deals with links
21762 wgFragmentMode=[ 'html5', 'legacy' ]
21764 {{anchorencode: [[hello|world]] [[hi]]}}
21769 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21773 anchorencode deals with templates
21775 wgFragmentMode=[ 'html5', 'legacy' ]
21777 {{anchorencode: {{Foo}} x}}
21782 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21786 anchorencode encodes like the TOC generator: (T20431)
21788 wgFragmentMode=[ 'html5', 'legacy' ]
21790 === _ +:.3A%3A _ &&]] x ===
21791 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21794 <h3><span id=".2B:.3A.253A_.26.26.5D.5D_x"></span><span class="mw-headline" id="+:.3A%3A_&&]]_x">_ +:.3A%3A _ &&]] x</span></h3>
21795 <p>+:.3A%3A_&&]]_x
21798 <h3 id="+:.3A%3A_&&]]_x"><span id=".2B:.3A.253A_.26.26.5D.5D_x" typeof="mw:FallbackId"></span> _ +:.3A%3A _ &<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&","dsr":[18,23,null,null]}'>&</span>]] x </h3>
21799 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: _ +:.3A%3A _ &&amp;]] x","function":"anchorencode"},"params":{},"i":0}}]}'>+:.3A%3A_&&<span typeof="mw:Entity">]</span><span typeof="mw:Entity">]</span>_x</p>
21800 <meta property="mw:PageProp/noeditsection"/>
21804 anchorencode encodes like the TOC generator: (T20431) (legacy)
21806 wgFragmentMode=[ 'legacy' ]
21808 === _ +:.3A%3A&&]] ===
21809 {{anchorencode: _ +:.3A%3A&&]] }}
21812 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21813 <p>.2B:.3A.253A.26.26.5D.5D
21818 T8200: blockquotes and paragraph formatting
21839 T10293: Use of center tag ruins paragraph formatting
21860 Parsing of overlapping (improperly nested) inline html tags
21862 <span><s>x</span></s>
21864 <p><span><s>x</span></s></span>
21867 <p><span><s>x</s></span>
21872 ### Language variants related tests
21875 # Parsoid does not mark self-links.
21876 # Parsoid does not convert links; PHP will do any necessary redirects.
21879 Self-link in language variants
21881 title=[[Dunav]] language=sr
21883 Both [[Dunav]] and [[Дунав]] are names for this river.
21885 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21888 <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>
21898 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21900 title=[[Duna]] language=sr
21902 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21904 <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.
21907 <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>
21911 Link to a section of a variant of this title shouldn't be parsed as self-link
21913 title=[[Duna]] language=sr
21915 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21917 <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.
21920 <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>
21924 Link to pages in language variants
21928 Main Page can be written as [[Маин Паге]]
21930 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21933 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21938 Multiple links to pages in language variants
21942 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21944 <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>.
21947 <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>
21952 Simple template in language variants
21958 <p>This is a test template
21964 Template with explicit namespace in language variants
21970 <p>This is a test template
21976 Basic test for template parameter in language variants
21980 {{парамтест|param=foo}}
21982 <p>This is a test template with parameter foo
21987 Simple category in language variants
21991 [[Category:МедиаWики Усер'с Гуиде]]
21993 cat=МедиаWики_Усер'с_Гуиде sort=
21995 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
22010 ## We used to, but no longer wt2wt this test since the default serializer
22011 ## will normalize all categories to serialize on their own line.
22012 ## This wikitext usage is going to be fairly uncommon in production and
22013 ## selser will take care of preserving formatting in those scenarios.
22015 Don't convert blue categorylinks to another variant (T35210)
22021 [[A]][[Category:分类]]
22025 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22026 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22030 Stripping -{}- tags (language variants)
22034 Latin proverb: -{Ne nuntium necare}-
22036 <p>Latin proverb: Ne nuntium necare
22039 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22044 Prevent conversion with -{}- tags (language variants)
22046 language=sr variant=sr-ec
22048 Latinski: -{Ne nuntium necare}-
22050 <p>Латински: Ne nuntium necare
22053 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22058 Prevent conversion of text with -{}- tags (language variants)
22060 language=sr variant=sr-ec
22062 Latinski: -{Ne nuntium necare}-
22064 <p>Латински: Ne nuntium necare
22067 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22072 Prevent conversion of links with -{}- tags (language variants)
22074 language=sr variant=sr-ec
22078 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22081 <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>
22086 -{}- tags within headlines (within html for parserConvert())
22088 wgFragmentMode=[ 'html5', 'legacy' ]
22090 language=sr variant=sr-ec
22094 Note that even an unprotected headline ID is not affected by language
22099 <h2><span id="-.7BNaslov.7D-"></span><span class="mw-headline" id="-{Naslov}-">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>
22100 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22103 <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>
22106 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span> </h2>
22108 <p>Note that even an unprotected headline ID is not affected by language
22111 <h2 id="Latinski">Latinski</h2>
22115 Explicit definition of language variant alternatives
22117 language=zh variant=zh-tw
22119 -{zh:China;zh-tw:Taiwan}-, not China
22121 <p>Taiwan, not China
22124 <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>
22128 Filter syntax for language variants
22130 language=zh variant=zh-tw
22132 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22134 <p>fooblog, WEBJOURNAL, WEBLOGquux
22137 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22140 # Note that Parsoid post-processing for language variants needs to
22141 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22143 Conversion around HTML tags
22145 language=sr variant=sr-ec
22147 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22148 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22151 <span title="ЛаCтин">ски</span>
22154 <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"}]}'/>
22155 <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>
22159 Explicit session-wise two-way language variant mapping (A flag and - flag)
22161 language=zh variant=zh-tw
22163 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22165 Taiwan is not China.
22167 But -{A|zh:China; zh-tw:Taiwan}- is China,
22169 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22171 and -{China}- is China.
22173 <p>This is Taiwan, but we'll forget that now.
22174 </p><p>Taiwan is not China.
22175 </p><p>But Taiwan is Taiwan,
22176 </p><p>(This should be stripped!)
22177 </p><p>and China is China.
22180 <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>
22181 <p>Taiwan is not China.</p>
22182 <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>
22183 <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>
22184 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22188 Explicit session-wise one-way language variant mapping (A flag and - flag)
22190 language=zh variant=zh-tw
22192 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22194 COUNTRY is China or Taiwan.
22196 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22198 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22200 and -{COUNTRY}- is COUNTRY.
22202 <p>This is Taiwan, but we'll forget that now.
22203 </p><p>COUNTRY is China or Taiwan.
22204 </p><p>But Taiwan is Taiwan,
22205 </p><p>(This should be stripped!)
22206 </p><p>and COUNTRY is COUNTRY.
22209 <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>
22210 <p>COUNTRY is China or Taiwan.</p>
22211 <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>
22212 <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>
22213 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22217 Explicit session-wise two-way language variant mapping (H flag for hide)
22219 language=zh variant=zh-tw
22221 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22225 <p>(This should be stripped!)
22226 </p><p>Taiwan is Taiwan.
22229 <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>
22230 <p>Taiwan is China.</p>
22234 Explicit session-wise one-way language variant mapping (H flag for hide)
22236 language=zh variant=zh-tw
22238 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22240 COUNTRY is Taiwan or China.
22242 <p>(This should be stripped!)
22243 </p><p>Taiwan is Taiwan or China.
22246 <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>
22247 <p>COUNTRY is Taiwan or China.</p>
22250 ## Note that parsoid test runner does not support 'showtitle' option.
22252 Adding explicit conversion rule for title (T flag)
22254 language=zh variant=zh-tw showtitle
22256 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22261 <p>Should be stripped!
22262 </p><p>Taiwan is China.
22265 <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>
22266 <p>Taiwan is China.</p>
22270 Code coverage: T combined with H flag
22272 language=zh variant=zh-tw showtitle
22274 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22279 <p>Should be stripped!
22280 </p><p>Taiwan is Taiwan.
22283 <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>
22284 <p>Taiwan is China.</p>
22288 Code coverage: T with no variants
22290 language=zh variant=zh-tw showtitle
22292 -{H|zh:China; zh-tw:Taiwan}-
22293 Taiwan is China.-{T|Taiwan is China}-
22300 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22301 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22305 Code coverage: rules with no variants
22307 language=zh variant=zh-tw
22309 -{H|zh:China; zh-tw:Taiwan}-
22320 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22322 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22323 Taiwan is China.</p>
22328 Code coverage: D flag for conversion rule
22330 language=zh variant=zh-tw
22332 -{D|zh-cn:XA; zh-tw:YA}-
22333 -{A;D|zh-cn:XB; zh-tw:YB}-
22334 -{D;H|zh-cn:XC; zh-tw:YC}-
22336 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22342 XA XB XC YA YB YC FOO BAR BAT 012345
22347 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22351 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22354 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22355 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22356 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22357 <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>
22358 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22359 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22360 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22361 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22365 Code coverage: N flag for conversion rule
22367 language=zh variant=zh-cn
22377 </p><p>српски (ћирилица)
22380 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22381 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22382 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22385 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22387 Code coverage: N flag for conversion rule (wt2html only)
22389 language=zh variant=zh-cn
22390 parsoid=wt2html,html2html
22397 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22401 Testing that changing the language variant here in the tests actually works
22403 language=zh variant=zh showtitle
22405 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22408 <p>Should be stripped!
22411 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22415 Recursive conversion of alt and title attrs shouldn't clear converter state
22417 language=zh variant=zh-cn
22420 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22421 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22425 Should be stripped<span title="Exclamation">!</span>
22428 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22429 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>
22433 T26072: more test on conversion rule for title
22435 language=zh variant=zh-tw showtitle
22437 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22439 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22442 <p>This should be stripped!
22443 </p><p>This won't take interferes with the title rule.
22446 <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>
22447 <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>
22451 Partly disable title conversion if variant == main language code
22453 language=zh variant=zh title=[[ZH]] showtitle
22455 -{T|zh-cn:CN;zh-tw:TW}-
22461 <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>
22465 Partly disable title conversion if variant == main language code, more
22467 language=zh variant=zh title=[[ZH]] showtitle
22475 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22479 Raw output of variant escape tags (R flag)
22481 language=zh variant=zh-tw
22483 Raw: -{R|zh:China;zh-tw:Taiwan}-
22485 <p>Raw: zh:China;zh-tw:Taiwan
22488 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22491 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22493 Raw output of variant escape tags (R flag) (wt2html only)
22495 language=zh variant=zh-tw
22496 parsoid=wt2html,html2html
22498 -{Variant}- -{D|syntax}- -{D;R|options}-
22500 <p>Variant syntax options
22503 <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>
22507 Nested markup inside raw output of variant escape tags (R flag)
22509 language=zh variant=zh-tw
22511 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22513 <p>Nested raw: nested Taiwan nested
22516 <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>
22520 Nested markup and spaces inside raw output of variant escape tags (R flag)
22522 language=zh variant=zh-tw
22524 X-{ outer -{ inner }- outer }-X
22526 <p>X outer inner outer X
22529 <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>
22533 Templates inside raw output of variant escape tags (R flag)
22535 language=zh variant=zh-tw
22537 Nested raw: -{R|nested {{echo|hi}} templates}-
22539 <p>Nested raw: nested hi templates
22542 <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>
22546 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22548 language=zh variant=zh-cn
22550 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22555 <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>
22559 Conversion rules from [numeric-only string] to [something else] (T48634)
22561 language=zh variant=zh-cn
22563 -{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
22568 <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>
22572 Two-way converter rule entries with an empty value should be ignored (T53551)
22574 language=zh variant=zh-cn
22576 -{H|zh-cn:foo;zh-tw:;}-foobar
22581 <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>
22585 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22587 language=zh variant=zh-cn
22589 -{H|=>zh-cn:foo;}-foobar
22594 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22598 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22600 language=zh variant=zh-cn
22607 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22611 Nested using of manual convert syntax
22613 language=zh variant=zh-hk
22615 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22617 <p>Nested: Hello Hong Kong!
22620 <p>Nested: <span typeof="mw:LanguageVariant" data-parsoid='{"tSp":[7]}' data-mw-variant='{"twoway":[{"l":"zh-hans","t":"Hi <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-cn\",\"t\":\"China\"},{\"l\":\"zh-sg\",\"t\":\"Singapore\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[21,53,null,2]}'></span>"},{"l":"zh-hant","t":"Hello <span typeof=\"mw:LanguageVariant\" data-mw-variant='{\"twoway\":[{\"l\":\"zh-tw\",\"t\":\"Taiwan\"},{\"l\":\"zh-hk\",\"t\":\"H&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"ong\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[90,97,null,2]}&apos;>&lt;/span> K&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[99,103,null,2]}&apos;>&lt;/span>ong\"}]}' data-parsoid='{\"fl\":[],\"tSp\":[7],\"dsr\":[68,109,null,2]}'></span>"}]}'></span>!</p>
22624 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22626 language=zh variant=zh-cn
22628 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22630 <p><span title="X">A</span>
22633 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[21,49,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[34,39,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
22637 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22639 language=zh variant=zh-cn
22641 -{<span title="-{X}-">A</span>}-
22642 !! html/php+disabled
22643 <p><span title="X">A</span>
22646 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<span title=\"\" about=\"#mwt1\" typeof=\"mw:ExpandedAttrs\" data-parsoid='{\"stx\":\"html\",\"a\":{\"title\":\"\"},\"sa\":{\"title\":\"-{X}-\"},\"dsr\":[2,30,20,7]}' data-mw='{\"attribs\":[[{\"txt\":\"title\"},{\"html\":\"&lt;span typeof=\\\"mw:LanguageVariant\\\" data-mw-variant=&apos;{\\\"disabled\\\":{\\\"t\\\":\\\"X\\\"}}&apos; data-parsoid=&apos;{\\\"fl\\\":[],\\\"dsr\\\":[15,20,null,2]}&apos;>&lt;/span>\"}]]}'>A</span>"}}'></span></p>
22649 # Parsoid and PHP disagree on how to parse this example: Parsoid
22650 # insists that the content of a language converter element be a valid
22651 # DOM fragment or attribute string
22653 Language converter markup with block content
22655 language=zh variant=zh-cn
22657 <span>a-{b<div>c}-d
22659 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22661 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22663 <p><span>ab</span></p>
22664 <div><span>cd <span>ab</span></span>
22665 <div><span>cd <span>ad</span></span></div>
22668 <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>
22670 <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>
22672 <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>
22676 LanguageConverter selser (1)
22678 language=zh variant=zh-cn
22680 "modes": ["wt2wt", "selser"],
22682 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22692 LanguageConverter selser (2)
22694 language=zh variant=zh-cn
22696 "modes": ["wt2wt", "selser"],
22698 ["span[class='x']", "contents", "text", "-{foo}-"],
22699 ["a", "contents", "text", "-{"],
22700 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22704 <span class="x">TEXT1</span>
22705 [http://example.com TEXT2]
22709 <span class="x"><nowiki>-{foo}-</nowiki></span>
22710 [http://example.com -{]
22711 [[Foo|<nowiki>-{</nowiki>]]
22712 {{1x|<nowiki>-{</nowiki>}}
22715 # Tests LanguageVariantText in ConstrainedText
22717 LanguageConverter selser (3)
22719 language=zh variant=zh-cn
22721 "modes": ["wt2wt", "selser"],
22723 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22724 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22735 |<nowiki/>-{edited}-
22739 # Tests LanguageVariantText._fromSelSer
22741 LanguageConverter selser (4)
22743 language=zh variant=zh-cn
22745 "modes": ["wt2wt", "selser"],
22747 ["td > span.x", "remove"]
22753 |<span class="x">Foo</span>-{Bar}-
22754 ||<span class="x">Foo</span>-{Bar}-
22764 # Since Parsoid is starting to emit canonical wikitext for links,
22765 # [http://example.com http://example.com] will not RT back to that
22767 # Parsoid does not language-convert links (it is done in a
22768 # post-processing step)
22770 Proper conversion of text in external links
22772 language=sr variant=sr-ec
22775 http://www.google.com
22776 gopher://www.google.com
22777 [http://www.google.com http://www.google.com]
22778 [gopher://www.google.com gopher://www.google.com]
22779 [https://www.google.com irc://www.google.com]
22780 [ftp://www.google.com www.google.com/ftp://dir]
22781 [//www.google.com www.google.com]
22783 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22784 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22785 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22786 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22787 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22788 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22789 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22792 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22793 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22794 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22795 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22796 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
22797 <a rel="mw:ExtLink" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22798 <a rel="mw:ExtLink" href="//www.google.com">www.google.com</a></p>
22802 Do not convert roman numbers to language variants
22804 language=sr variant=sr-ec
22808 <p>Фридрих IV је цар.
22811 <p>Fridrih IV je car.</p>
22815 Unclosed language converter markup "-{"
22826 Don't convert raw rule "-{R|=>}-" to "=>"
22835 <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>
22839 Don't break link parsing if language converter markup is in the caption.
22841 language=sr variant=sr-ec
22843 [[Main Page|-{R|main page}-]]
22845 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22848 <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>
22852 T146304: Don't break template parsing if language converter markup is in the parameter.
22854 language=sr variant=sr-ec
22861 <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>
22865 T146305: Don't break image parsing if language converter markup is in the caption.
22869 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22871 <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>
22874 <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>
22878 T146305: Don't break image parsing if nested language converter markup is in the caption.
22880 language=zh variant=zh-cn
22882 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22884 <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>
22887 <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>
22890 # XXX html2wt disabled because rich markup in alt is not preserved.
22892 Don't break gallery if language converter markup is inside.
22897 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22898 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22901 <ul class="gallery mw-gallery-traditional">
22902 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22903 <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>
22904 <div class="gallerytext">
22905 <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>
22909 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22910 <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>
22911 <div class="gallerytext">
22912 <p>This is a test template
22919 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" 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"}}'>
22920 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></div><div class="gallerytext"><figure-inline 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></figure-inline></div></li>
22921 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><figure-inline 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></figure-inline></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":"-{R|param}-"}},"i":0}}]}'>This is a test template</span></div></li>
22926 T153135: Don't break list handling if language converter markup is in the item.
22928 language=zh variant=zh-cn
22930 ;-{zh-cn:AAA;zh-tw:BBB}-
22934 <dt>foo:bar</dt></dl>
22937 <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>
22938 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22942 // Note that parsoid does not protect colons unless language converter
22943 // markup is properly nested, because it is a backtracking parser.
22945 T153135: Unclosed markup in definition list (code coverage)
22947 language=zh variant=zh-cn
22953 <dt><b>foo:bar</b></dt>
22954 <dt><b>-{zh-cn:AAA</b></dt>
22957 <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}'>
22958 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22959 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22964 T153135: Nested language converter markup in definition list (code coverage)
22966 language=zh variant=zh-cn
22968 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22970 <dl><dt>AAA foo:bar bat:baz</dt>
22974 <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>
22975 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22979 # html2wt mode disabled due to <nowiki> insertion.
22981 T153140: Don't break table handling if language converter markup is in the cell.
22983 language=sr variant=sr-ec
22984 parsoid=wt2html,wt2wt,html2html
23001 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
23008 Language converter tricky html2wt cases (1)
23011 parsoid=html2wt,wt2wt
23013 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23015 -{<nowiki>}-</nowiki>}-
23022 Language converter tricky html2wt cases (2)
23025 parsoid=html2wt,wt2wt
23029 <nowiki>-{foo}-</nowiki>
23031 <p>-{foo}-
23036 Language converter tricky html2wt cases (3)
23039 parsoid=html2wt,wt2wt
23041 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23042 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23043 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23049 -{<nowiki>-{foo}-</nowiki>}-
23053 </p><p>-{foo}-
23058 Language converter tricky html2wt cases (4)
23061 parsoid=html2wt,wt2wt
23063 <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>
23071 # Note that the <nowiki> escaping added by parsoid for source text,
23072 # destination text, and language names only works on the PHP side
23073 # for *destination text*. (HTML entity escaping wouldn't work
23074 # any better.) This is probably a bug, at least for source texts.
23075 # (For language names PHP uses a precise regexp based on the languages
23076 # it currently knows have variants, which is fragile since this set
23077 # can grow/shrink over time.)
23079 Language converter tricky html2wt cases (5)
23081 language=zh variant=zh-cn
23083 <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>
23084 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23085 <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>
23086 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23089 -{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
23091 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23093 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23095 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23098 !! html/php+disabled
23099 <p>foobat;xyz=>zh-cn:abc
23103 </p><p>a:b=>c 0;zh-tw:bar
23108 T179579: Nowiki and lc interaction
23115 -{123<nowiki>|</nowiki>456}-
23117 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23119 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"123<span typeof=\"mw:Nowiki\" data-parsoid='{\"dsr\":[23,41,8,9]}'>|</span>456"}}' data-parsoid='{"fl":[],"src":"-{123<nowiki>|</nowiki>456}-"}'></span></p>
23123 T2529: Uncovered bullet
23132 # Plain MediaWiki does not remove empty lists, but tidy actually does.
23133 # Templates in Wikipedia rely on this behavior, as tidy has always been
23134 # enabled there. These tests are normally run *without* tidy, so specify the
23135 # full output here.
23136 # To test realistic parsing behavior, apply a tidy-like transformation to both
23137 # the expected output and your parser's output.
23139 T2529: Uncovered bullet leaving empty list, normally removed by tidy
23141 ******* Foo {{bullet}}
23143 <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>
23149 T2529: Uncovered table already at line-start
23172 T2529: Uncovered bullet in parser function result
23174 * Foo {{lc:{{bullet}} }}
23182 T7678: Double-parsed template argument
23184 {{lc:{{{1}}}|hello}}
23191 T7678: Double-parsed template invocation
23193 {{lc:{{paramtest {{!}} param = hello }} }}
23195 <p>{{paramtest | param = hello }}
23200 Case insensitivity of parser functions for non-ASCII characters (T10143)
23203 title=[[Main Page]]
23205 {{PRVNÍVELKÉ:ěščř}}
23206 {{prvnívelké:ěščř}}
23226 Morwen/13: Unclosed link followed by heading
23233 <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>
23238 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23245 <h1><span class="mw-headline" id="heading">heading</span></h1>
23250 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23257 <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>
23272 Paragraphs inside divs (no extra line breaks)
23284 Paragraphs inside divs (extra line break on open)
23299 Paragraphs inside divs (extra line break on close)
23314 Paragraphs inside divs (extra line break on open and close)
23331 Nesting tags, paragraphs on lines which begin with <div>
23333 <div></div><strong>A
23336 <p><strong>A</strong></p>
23337 <p><strong>B</strong></p>
23345 # T8200: <blockquote> should behave like <div> with respect to line breaks
23347 T8200: paragraphs inside blockquotes (no extra line breaks)
23349 <blockquote>Line one
23351 Line two</blockquote>
23353 <blockquote>Line one
23354 Line two</blockquote>
23358 <p>Line one Line two</p>
23363 T8200: paragraphs inside blockquotes (extra line break on open)
23368 Line two</blockquote>
23373 Line two</blockquote>
23378 Line two</blockquote>
23382 T8200: paragraphs inside blockquotes (extra line break on close)
23384 <blockquote>Line one
23389 <blockquote>Line one
23402 T8200: paragraphs inside blockquotes (extra line break on open and close)
23424 Paragraphs inside blockquotes/divs (no extra line breaks)
23426 <blockquote><div>Line one
23428 Line two</div></blockquote>
23430 <blockquote><div>Line one
23431 Line two</div></blockquote>
23436 Paragraphs inside blockquotes/divs (extra line break on open)
23441 Line two</div></blockquote>
23446 Line two</div></blockquote>
23451 Paragraphs inside blockquotes/divs (extra line break on close)
23453 <blockquote><div>Line one
23456 </div></blockquote>
23458 <blockquote><div>Line one
23461 </div></blockquote>
23466 Paragraphs inside blockquotes/divs (extra line break on open and close)
23472 </div></blockquote>
23478 </div></blockquote>
23483 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23485 wgLinkHolderBatchSize=0
23491 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23492 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23493 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23498 Free external link invading image caption
23500 [[Image:Foobar.jpg|thumb|http://x|hello]]
23502 <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>
23507 T17196: localised external link numbers
23511 [http://en.wikipedia.org/]
23513 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23516 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
23520 Multibyte character in padleft
23522 {{padleft:-Hello|7|Æ}}
23529 Multibyte character in padright
23531 {{padright:Hello-|7|Æ}}
23538 formatdate parser function
23540 {{#formatdate:2009-03-24}}
23542 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23547 formatdate parser function, with default format
23549 {{#formatdate:2009-03-24|mdy}}
23551 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23556 Spacing of numbers in formatted dates
23558 {{#formatdate:January 15}}
23560 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23565 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
23567 language=nl title=[[MediaWiki:Common.css]]
23569 {{#formatdate:2009-03-24|dmy}}
23571 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23584 Edit comment with link
23588 I like the [[Main Page]] a lot
23590 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23594 Edit comment with link and link text
23598 I like the [[Main Page|best pages]] a lot
23600 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23604 Edit comment with link and link text with suffix
23608 I like the [[Main Page|best page]]s a lot
23610 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23614 Edit comment with section link (non-local, eg in history list)
23616 comment title=[[Main Page]]
23618 /* External links */ removed bogus entries
23620 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23624 Edit comment with section link and text before it (non-local, eg in history list)
23626 comment title=[[Main Page]]
23628 pre-comment text /* External links */ removed bogus entries
23630 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>
23634 Edit comment with section link (local, eg in diff view)
23636 comment local title=[[Main Page]]
23638 /* External links */ removed bogus entries
23640 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23644 Edit comment with subpage link (T16080)
23648 title=[[Subpage test]]
23650 Poked at a [[/subpage]] here...
23652 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23656 Edit comment with subpage link and link text (T16080)
23660 title=[[Subpage test]]
23662 Poked at a [[/subpage|neat little page]] here...
23664 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23668 Edit comment with bogus subpage link in non-subpage NS (T16080)
23671 title=[[Subpage test]]
23673 Poked at a [[/subpage]] here...
23675 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23679 Edit comment with bare anchor link (local, as on diff)
23683 title=[[Main Page]]
23687 <a href="#section">#section</a>
23691 Edit comment with bare anchor link (non-local, as on history)
23694 title=[[Main Page]]
23698 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23702 Anchor starting with underscore
23708 <p><a href="#_ref">One</a>
23711 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23715 Id starting with underscore
23717 <div id="_ref"></div>
23719 <div id="_ref"></div>
23724 Edit comment with link with more than one pipe (T99346)
23728 [[Main Page|Many|pipes]]
23730 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23734 Complex edit comment with link with more than one pipe (T99346)
23738 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23740 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..."
23744 Space normalisation on autocomment (T24784)
23747 title=[[Main Page]]
23749 /* __hello__world__ */
23751 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23755 percent-encoding and + signs in comments (T28410)
23759 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23761 <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>
23764 # Parsoid doesn't support this yet: see T75581
23765 # but it *should* omit the 'src' attribute if the image is bad.
23766 # PHP side of tests was disabled in
23767 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23768 # because of issues in the PHP parserTests infrastructure
23769 # (but the output below is indeed what the PHP side emits)
23771 Bad images - basic functionality
23774 !! DISABLED/html/php
23776 <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>
23780 Bad images - T18039: text after bad image disappears
23785 !! DISABLED/html/php
23791 <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>
23796 Verify that displaytitle works (T24501) no displaytitle
23800 wgAllowDisplayTitle=true
23801 wgRestrictDisplayTitle=false
23803 this is not the the title
23806 <p>this is not the the title
23811 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23816 wgAllowDisplayTitle=true
23817 wgRestrictDisplayTitle=false
23819 this is not the the title
23820 {{DISPLAYTITLE:whatever}}
23823 <p>this is not the the title
23828 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23833 wgAllowDisplayTitle=true
23834 wgRestrictDisplayTitle=true
23836 this is not the the title
23837 {{DISPLAYTITLE:whatever}}
23840 <p>this is not the the title
23845 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23850 wgAllowDisplayTitle=true
23851 wgRestrictDisplayTitle=true
23853 this is not the the title
23854 {{DISPLAYTITLE:screen}}
23857 <p>this is not the the title
23862 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23867 wgAllowDisplayTitle=false
23869 this is not the the title
23870 {{DISPLAYTITLE:screen}}
23873 <p>this is not the the title
23874 <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>
23879 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23884 wgAllowDisplayTitle=false
23886 this is not the the title
23889 <p>this is not the the title
23894 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23899 wgAllowDisplayTitle=true
23900 wgRestrictDisplayTitle=true
23902 this is not the the title
23903 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23905 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23906 <p>this is not the the title
23911 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23916 wgAllowDisplayTitle=true
23917 wgRestrictDisplayTitle=true
23919 this is not the the title
23920 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23922 <span style="color: red;">s</span>creen
23923 <p>this is not the the title
23928 Page status indicators: Empty name is invalid
23932 <indicator name=" "></indicator>
23933 <indicator></indicator>
23935 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23936 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23941 Page status indicators: Weird syntaxes that are okay
23945 <indicator name="empty" />
23946 <indicator name="name"></indicator>
23955 Page status indicators: Torture test
23959 <indicator name="01">hello world</indicator>
23960 <indicator name="02">[[Main Page]]</indicator>
23961 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23962 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23963 <indicator name="05">* foo
23965 <indicator name="06"><nowiki>foo</nowiki></indicator>
23966 <indicator name="07"> Preformatted</indicator>
23967 <indicator name="08"><div>Broken tag</indicator>
23968 <indicator name="09">{| class=wikitable
23971 <indicator name="10">Two
23973 paragraphs</indicator>
23976 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23977 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" />
23978 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>
23979 05=<ul><li> foo</li>
23983 07=<pre>Preformatted
23985 08=<div>Broken tag</div>
23987 09=<table class="wikitable">
24004 preload: check <noinclude> and <includeonly>
24008 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24014 preload: check <onlyinclude>
24018 Goodbye <onlyinclude>Hello world</onlyinclude>
24024 preload: can pass tags through if we want to
24028 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24030 <includeonly>Hello world</includeonly>
24034 preload: check that it doesn't try to do tricks
24038 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24040 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24044 Play a bit with r67090 and T5158
24046 <div style="width:50% !important"> </div>
24047 <div style="width:50% !important"> </div>
24048 <div style="width:50% !important"> </div>
24049 <div style="border : solid;"> </div>
24051 <div style="width:50% !important"> </div>
24052 <div style="width:50% !important"> </div>
24053 <div style="width:50% !important"> </div>
24054 <div style="border : solid;"> </div>
24057 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24058 <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>
24059 <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>
24060 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24065 HTML5 data attributes
24067 <span data-foo="bar">Baz</span>
24068 <p data-abc-def_hij="">Quuz</p>
24070 <p><span data-foo="bar">Baz</span>
24072 <p data-abc-def_hij="">Quuz</p>
24075 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24076 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24080 Strip reserved data attributes
24082 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24084 <div data-ok="fred">d</div>
24087 <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>
24091 percent-encoding and + signs in internal links (T28410)
24093 [[User:+%]] [[Page+title%]]
24094 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24095 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24096 [[%33%45]] [[%33%45+]]
24098 <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>
24099 <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>
24100 <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>
24101 <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>
24104 <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>
24105 <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>
24106 <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> <figure-inline 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></figure-inline>
24107 <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>
24111 Special characters in embedded file links (T29679)
24113 [[File:Contains & ampersand.jpg]]
24114 [[File:Does not exist.jpg|Title with & ampersand]]
24116 <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>
24117 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24120 <p><figure-inline 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></figure-inline>
24121 <figure-inline 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></figure-inline></p>
24125 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24127 Text's been normalized?
24129 <p>Text's been normalized?
24134 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24136 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24138 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24143 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24145 [http://www.example.org/ ideograms]
24147 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24152 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24154 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24156 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24180 T33098 Template which includes system messages which includes the template
24184 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24185 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24190 T33490 Turkish: ucfirst 'blah'
24201 T33490 Turkish: ucfirst 'ix'
24212 T33490 Turkish: lcfirst 'BLAH'
24223 T33490 Turkish: ucfırst (with a dotless i)
24229 <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>
24234 T33490 ucfırst (with a dotless i) with English language
24240 <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>
24244 # Note that Parsoid doesn't emit an explicit TOC.
24245 # Note also that the html2wt direction tends to emit an extra newline
24246 # between the __TOC__ magicword and the first heading unless *both*
24247 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24251 T28375: TOC with italics
24253 title=[[Main Page]]
24256 == ''Lost'' episodes ==
24258 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24260 <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>
24264 <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>
24267 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24268 <h2 id="Lost_episodes" data-parsoid='{}'> <i>Lost</i> episodes </h2>
24272 T28375: TOC with bold
24274 title=[[Main Page]]
24277 == '''should be bold''' then normal text ==
24279 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24281 <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>
24285 <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>
24288 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24289 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'> <b>should be bold</b> then normal text </h2>
24293 T35845: Headings become cursive in TOC when they contain an image
24295 title=[[Main Page]]
24298 == Image [[Image:foobar.jpg]] ==
24300 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24302 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24306 <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>
24309 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24310 <h2 id="Image" data-parsoid='{}'> Image <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" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"220","width":"1941"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline> </h2>
24314 T35845 (2): Headings become bold in TOC when they contain a blockquote
24316 title=[[Main Page]]
24319 == <blockquote>Quote</blockquote> ==
24321 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24323 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24327 <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>
24331 <div id="toc" class="toc">
24332 <div class="toctitle" lang="en" dir="ltr" xml:lang="en">
24336 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24340 <h2><span class="mw-headline" id="Quote"></span></h2>
24342 <p><span class="mw-headline" id="Quote">Quote</span></p>
24344 <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>
24346 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24347 <h2 id="Quote" data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
24351 Unclosed tags in TOC
24353 wgFragmentMode=[ 'html5', 'legacy' ]
24355 title=[[Main Page]]
24359 <small>Hanc marginis exiguitas non caperet.</small>
24362 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24364 <li class="toclevel-1 tocsection-1"><a href="#Proof:_2_<_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 < 3</span></a></li>
24368 <h2><span id="Proof:_2_.3C_3"></span><span class="mw-headline" id="Proof:_2_<_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>
24369 <p><small>Hanc marginis exiguitas non caperet.</small>
24373 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24374 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span> Proof: 2 < 3 </h2>
24375 <p><small>Hanc marginis exiguitas non caperet.</small>
24380 Multiple tags in TOC
24383 == <i>Foo</i> <b>Bar</b> ==
24385 == <i>Foo</i> <blockquote>Bar</blockquote> ==
24387 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24389 <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>
24390 <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>
24394 <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>
24395 <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>
24399 <div id="toc" class="toc">
24400 <div class="toctitle" lang="en" dir="ltr" xml:lang="en">
24404 <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>
24405 <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>
24409 <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>
24410 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
24412 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
24414 <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>
24416 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24417 <h2 id="Foo_Bar" data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
24419 <h2 id="Foo_Bar_2" data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote> </h2>
24422 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24423 # html5 tag parsing.
24425 Tags with parameters in TOC
24430 == <sup class="in-h2">Hello</sup> ==
24432 == <sup class="a > b">Evilbye</sup> ==
24434 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24436 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24437 <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>
24441 <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>
24442 <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>
24445 <meta property="mw:PageProp/toc" />
24446 <h2 id="Hello"> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
24448 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
24452 span tags with directionality in TOC
24455 == <span dir="ltr">C++</span> ==
24457 == <span dir="rtl">זבנג!</span> ==
24459 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
24461 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
24463 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
24465 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24467 <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>
24468 <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>
24469 <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>
24470 <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>
24471 <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>
24475 <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>
24476 <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>
24477 <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>
24478 <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>
24479 <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>
24482 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24483 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span> <span dir="ltr">C++</span> </h2>
24484 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span> <span dir="rtl">זבנג!</span> </h2>
24485 <h2 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> </h2>
24486 <h2 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> </h2>
24487 <h2 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> </h2>
24491 T74884: bdi element in ToC
24494 == <bdi>test</bdi> ==
24496 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24498 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24502 <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>
24505 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24506 <h2 id="test" data-parsoid='{}'> <bdi>test</bdi> </h2>
24510 T35715: s/strike element in ToC
24513 == <s>test</s> test <strike>test</strike> ==
24515 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24517 <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>
24521 <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>
24524 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24525 <h2 id="test_test_test" data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
24528 # Note that the html output does not have the <p></p>, but the
24529 # html+tidy output *does*. This is because the empty <p></p> is
24530 # removed by the sanitizer, but only when tidy is *not* enabled (!).
24532 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24537 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24539 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24543 <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>
24547 <div id="toc" class="toc">
24548 <div class="toctitle" lang="en" dir="ltr" xml:lang="en">
24552 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24556 <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>
24558 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24559 <h2 id="x" data-parsoid='{}'> x </h2>
24565 == {{int:headline_sample}} ==
24569 T34057: Title needed when expanding <h> nodes.
24571 title=[[Main Page]]
24575 <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>
24580 Strip marker in urlencode
24582 {{urlencode:x<nowiki/>y}}
24583 {{urlencode:x<nowiki/>y|wiki}}
24584 {{urlencode:x<nowiki/>y|path}}
24585 {{urlencode:x<pre id="one">two</pre>y}}
24613 Strip marker in formatNum
24615 {{formatnum:1<nowiki/>2}}
24616 {{formatnum:1<nowiki/>2|R}}
24624 Check noCommafy in formatNum
24628 {{formatnum:123456.78}}
24629 {{formatnum:123456.78|NOSEP}}
24637 Wrong option for formatNum (T58199)
24639 {{formatnum:1,234.56|Random}}
24640 {{formatnum:1,234.56|EVERYTHING}}
24641 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24650 Strip marker in grammar
24654 {{grammar:elative|foo<nowiki/>bar}}
24661 Strip marker in padleft
24663 {{padleft:|2|x<nowiki/>y}}
24670 Strip marker in padright
24672 {{padright:|2|x<nowiki/>y}}
24679 Strip marker in anchorencode
24681 {{anchorencode:x<nowiki/>y}}
24686 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:x<nowiki/>y","function":"anchorencode"},"params":{},"i":0}}]}'>xy</p>
24690 nowiki inside link inside heading (T20295)
24692 ==[[foo|x<nowiki>y</nowiki>z]]==
24694 <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>
24699 new support for bdi element (T33817)
24701 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24703 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24708 Ignore pipe between table row attributes
24712 |- id=foo | style='color: red'
24720 <tr id="foo" style="color: red">
24727 Language parser function
24736 Padleft and padright as substr
24738 {{padleft:|3|abcde}}
24739 {{padright:|3|abcde}}
24747 Special parser function
24749 {{#special:RandomPage}}
24750 {{#special:BaDtItLe}}
24751 {{#special:Foobar}}
24760 T36939 - Case insensitive link parsing ([HttP://])
24762 [HttP://MediaWiki.Org/]
24764 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24767 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
24771 T36939 - Case insensitive link parsing ([HttP:// title])
24773 [HttP://MediaWiki.Org/ MediaWiki]
24775 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24780 T36939 - Case insensitive link parsing (HttP://)
24782 HttP://MediaWiki.Org/
24784 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24787 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24805 <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>
24806 <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>
24807 <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>
24808 <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>
24809 <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>
24815 ### Parsoid-specific tests
24816 ### Parsoid-PHP parser incompatibilities
24819 1. SOL-sensitive wikitext tokens as template-args
24821 parsoid=wt2html,wt2wt
24827 <span about="#mwt1" typeof="mw:Transclusion">
24828 </span><ul about="#mwt1"><li>a</li>
24830 <span about="#mwt2" typeof="mw:Transclusion">
24831 </span><ol about="#mwt2"><li>a</li>
24833 <span about="#mwt3" typeof="mw:Transclusion">
24834 </span><dl about="#mwt3"><dd>a</dd>
24838 #### -----------------------------------------------------------------
24839 #### Parsoid-specific functionality tests
24840 #### -----------------------------------------------------------------
24842 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24843 # We know wt2wt will fail, but we expect selser to pass.
24844 # Due to the nature of our testing, wt2wt and selser tests will enter the
24845 # blacklist and we'll catch selser regressions based on changes to the
24846 # blacklist entries for selser tests.
24848 1. Bad treebuilder fixup of formatting elt is cleaned up
24850 parsoid=wt2html,wt2wt
24855 [[Image:Foobar.jpg|right|Test]]
24862 <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>
24869 2. Bad treebuilder fixup of formatting elt is cleaned up
24871 parsoid=wt2html,wt2wt
24873 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24875 <small>[[Image:Foobar.jpg|right|300px]]</small>
24879 <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>
24881 <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>
24885 3. Bad treebuilder fixup of formatting elt is cleaned up
24887 parsoid=wt2html,wt2wt
24889 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24891 <p><small><b>foo</b></small></p>
24892 <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>
24893 <p><small><b>bar</b></small></p>
24897 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24899 parsoid=wt2html,wt2wt
24901 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24903 <b><small><figure class="mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="34" width="300"/></a></figure></small></b>
24906 #### ----------------------------------------------------------------
24907 #### Parsoid-only testing of Parsoid's impl of LST
24908 #### Not implemented yet, see
24909 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24910 #### ----------------------------------------------------------------
24912 ## We still need to support serializing the older format while content is stored.
24914 LST Sections: Backwards compatibility
24917 "suppressErrors": true,
24918 "modes": ["html2wt"]
24921 <section begin="2011-05-16" />
24922 <section end="2014-04-10 (MW 1.23wmf22)" />
24924 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24925 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24929 LST Sections: Newfangled approach
24931 <section begin="2011-05-16" />
24932 <section end="2014-04-10 (MW 1.23wmf22)" />
24934 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24936 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24940 #--------- Test stripping of empty nodes in template content ----------
24943 Empty LI and TR nodes should be stripped from template content
24948 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24952 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24965 Empty LI and TR nodes should not be stripped from top-level content
24978 <li class='mw-empty-elt'></li>
24983 <tr class='mw-empty-elt'></tr>
24992 Empty TR nodes should not be stripped if they have any attributes set
24994 {{EmptyTRWithHTMLAttrTest}}
24996 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24997 <tr align='center'></tr>
24998 <tr><td>foo</td></tr>
24999 <tr align='center'></tr>
25000 <tr><td>bar</td></tr>
25004 #### ----------------------------------------------------------------
25005 #### The following section of tests are primarily to test
25006 #### wikitext escaping capabilities of Parsoid. Given that
25007 #### escaping can be done any number of ways, the wikitext (input)
25008 #### is always adjusted to reflect how Parsoid adds nowiki
25011 #### We are marking several tests as parsoid-only since the
25012 #### HTML in the result section is different from what the
25013 #### PHP parser generates for it.
25014 #### ----------------------------------------------------------------
25017 #### --------------- Headings ---------------
25019 #### 1. Nested inside html <h1>=foo=</h1>
25020 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25021 #### 3. Nested inside html with wikitext split by html tags
25022 #### 4. No escape needed
25023 #### 5. Empty headings <h1></h1>
25024 #### 6. Heading chars in SOL context
25025 #### ----------------------------------------
25027 Headings: 0. Unnested
25037 <p>=foo<i>a</i>=</p>
25039 <nowiki>=foo=</nowiki>
25041 <nowiki> </nowiki>=foo=
25043 <nowiki>=foo=</nowiki>
25045 =foo''a''<nowiki>=</nowiki>
25048 # New headings and existing headings are handled differently
25050 Headings: 1. Nested inside html
25058 <h1 data-parsoid=''>=foo=</h1>
25059 <h2 data-parsoid=''>=foo=</h2>
25060 <h3 data-parsoid=''>=foo=</h3>
25061 <h4 data-parsoid=''>=foo=</h4>
25062 <h5 data-parsoid=''>=foo=</h5>
25063 <h6 data-parsoid=''>=foo=</h6>
25071 =<nowiki>=foo=</nowiki>=
25072 ==<nowiki>=foo=</nowiki>==
25073 ===<nowiki>=foo=</nowiki>===
25074 ====<nowiki>=foo=</nowiki>====
25075 =====<nowiki>=foo=</nowiki>=====
25076 ======<nowiki>=foo=</nowiki>======
25081 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25090 <nowiki>*</nowiki>bar
25096 <nowiki>=bar=</nowiki>
25100 Headings: 3. Nested inside html with wikitext split by html tags
25104 <h1>=<b>bold</b>foo=</h1>
25106 = ='''bold'''foo= =
25110 Headings: 4a. No escaping needed (testing just h1 and h2)
25121 <h1><i>=</i>foo=</h1>
25141 Headings: 4b. No escaping needed (inside p-tags)
25158 Headings: 4c. Short headings (1)
25165 <nowiki>===</nowiki>
25171 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25173 Headings: 4d. Short headings (2)
25175 parsoid=wt2html,html2html
25186 <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>
25187 <h1><span class="mw-headline" id=".3D.3D">==</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>
25188 <h2><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=3" title="Edit section: =">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
25193 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25194 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25195 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25199 Headings: 5. Empty headings
25203 <h1 data-parsoid='{}'></h1>
25205 <h2 data-parsoid='{}'></h2>
25207 <h3 data-parsoid='{}'></h3>
25209 <h4 data-parsoid='{}'></h4>
25211 <h5 data-parsoid='{}'></h5>
25213 <h6 data-parsoid='{}'></h6>
25223 =====<nowiki/>=====
25225 ======<nowiki/>======
25229 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25239 <nowiki>=a=</nowiki>
25241 <nowiki>=a=</nowiki>
25243 <nowiki>=a=</nowiki>
25247 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25260 <nowiki>=a=</nowiki>
25263 <nowiki>=a=</nowiki>
25266 <nowiki>=a=</nowiki>
25271 Headings: 6c. Heading chars in SOL context (leading newline break)
25279 <nowiki>=b=</nowiki>
25283 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25287 <!--c0--><p>=a=</p>
25289 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25291 <!--c0--><nowiki>=a=</nowiki>
25293 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25297 Headings: 6d. Heading chars in SOL context (No escaping needed)
25307 Headings: 7. Insert a newline between new content and headings
25313 <h2 data-parsoid='{}'>A</h2>
25314 <p data-parsoid='{}'>a</p>
25324 #### --------------- Lists ---------------
25325 #### 0. Outside nests (*foo, etc.)
25326 #### 1. Nested inside html <ul><li>*foo</li></ul>
25327 #### 2. Inside definition lists
25328 #### 3. Only bullets at start should be escaped
25329 #### 4. No escapes needed
25330 #### 5. No unnecessary escapes
25331 #### 6. Escape bullets in SOL position
25332 #### 7. Escape bullets in a multi-line context
25333 #### ----------------------------------------
25336 Lists: 0. Outside nests
25346 <nowiki>*</nowiki>foo
25348 <nowiki>#</nowiki>foo
25350 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25353 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25354 ## to test wikitext escaping, and insignificant whitespace diffs
25355 ## cause PHP parser tests to barf
25357 Lists: 1. Nested inside html (No unnecessary escapes)
25366 <li data-parsoid='{}'>*foo</li>
25367 <li data-parsoid='{}'>#foo</li>
25368 <li data-parsoid='{}'>:foo</li>
25369 <li data-parsoid='{}'>;foo</li>
25377 <li data-parsoid='{}'>*foo</li>
25378 <li data-parsoid='{}'>#foo</li>
25379 <li data-parsoid='{}'>:foo</li>
25380 <li data-parsoid='{}'>;foo</li>
25387 *<nowiki>*foo</nowiki>
25388 *<nowiki>#foo</nowiki>
25389 *<nowiki>:foo</nowiki>
25390 *<nowiki>;foo</nowiki>
25396 #<nowiki>*foo</nowiki>
25397 #<nowiki>#foo</nowiki>
25398 #<nowiki>:foo</nowiki>
25399 #<nowiki>;foo</nowiki>
25403 Lists: 2. Inside definition lists
25407 <dl><dt>;foo</dt></dl>
25408 <dl><dt>:foo</dt></dl>
25411 <dl><dd>:foo</dd></dl>
25415 ; <nowiki>:foo</nowiki>
25417 ; <nowiki>:foo</nowiki>
25424 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25430 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25434 *<nowiki>*foo</nowiki>''it''*bar
25438 Lists: 4. No escapes needed
25451 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25455 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25469 Lists: 5. No unnecessary escapes
25473 <ul><li> bar <span>[[foo]]</span></li></ul>
25474 <ul><li> =bar <span>[[foo]]</span></li></ul>
25475 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25476 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25477 <ul><li> =bar <span>foo]]</span>=</li></ul>
25478 <ul><li> <s></s>: a</li></ul>
25479 <ul><li> <i>* foo</i></li></ul>
25482 * bar <span><nowiki>[[foo]]</nowiki></span>
25484 * =bar <span><nowiki>[[foo]]</nowiki></span>
25486 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25488 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25490 * =bar <span>foo]]</span>=
25498 Lists: 6. Escape bullets in SOL position
25502 <p><!--cmt-->*foo</p>
25504 <!--cmt--><nowiki>*</nowiki>foo
25508 Lists: 7. Escape bullets in a multi-line context
25517 <nowiki>*</nowiki>b
25521 Lists: 8. Escape colons only if not present in tags
25525 <dl><dt>a:b<i>c:d</i></dt></dl>
25527 ; <nowiki>a:b</nowiki>''c:d''
25530 #### --------------- HRs ---------------
25531 #### 1. Single line
25532 #### -----------------------------------
25535 HRs: 1. Single line
25543 ----<nowiki>----</nowiki>
25548 #### --------------- Tables ---------------
25549 #### 1a. Simple example
25550 #### 1b. No escaping needed (!foo)
25551 #### 1c. No escaping needed (|foo)
25552 #### 1d. No escaping needed (|}foo)
25554 #### 2a. Nested in td (<td>foo|bar</td>)
25555 #### 2b. Nested in td (<td>foo||bar</td>)
25556 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25558 #### 3a. Nested in th (<th>foo!bar</th>)
25559 #### 3b. Nested in th (<th>foo!!bar</th>)
25560 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25564 #### 4c. No escaping needed
25565 #### --------------------------------------
25568 Tables: 1a. Simple example
25576 <nowiki>{|</nowiki>
25581 Tables: 1b. No escaping needed
25592 Tables: 1c. No escaping needed
25603 Tables: 1d. No escaping needed
25614 Tables: 2a. Nested in td
25619 <td>foo|bar</td></tr>
25620 <tr><td>x<div>a|b</div></td>
25624 |<nowiki>foo|bar</nowiki>
25626 |x<div><nowiki>a|b</nowiki></div>
25642 Tables: 2b. Nested in td
25648 <td>a<i>b||c</i></td>
25649 <td>a<i><div>b||c</div></i></td>
25650 </tr></tbody></table>
25653 |<nowiki>foo||bar</nowiki>
25654 |a''<nowiki>b||c</nowiki>''
25655 |a''<div><nowiki>b||c</nowiki></div>''
25664 <td>a<i><div>b||c</div></i>
25670 Tables: 2c. Nested in td -- no escaping needed
25686 Tables: 3a. Nested in th
25702 Tables: 3b. Nested in th
25707 <tr><th>foo!!bar</th>
25708 <th><i>foo|bar</i></th>
25709 <th><i>foo!!bar</i></th>
25710 <th><i><span>foo!!bar</span></i></th>
25711 </tr></tbody></table>
25714 !<nowiki>foo!!bar</nowiki>
25715 !''<nowiki>foo|bar</nowiki>''
25716 !''<nowiki>foo!!bar</nowiki>''
25717 !''<span><nowiki>foo!!bar</nowiki></span>''
25726 <th><i>foo!!bar</i>
25728 <th><i><span>foo!!bar</span></i>
25734 Tables: 3c. Nested in th
25739 <tr><th>foo||bar</th>
25740 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25741 </tr></tbody></table>
25744 !<nowiki>foo||bar</nowiki>
25745 !<nowiki>foo||bar</nowiki>
25758 Tables: 4a. Escape -
25774 |<nowiki>-bar</nowiki>
25779 Tables: 4b. Escape +
25795 |<nowiki>+bar</nowiki>
25800 Tables: 4c. No escaping needed
25805 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25806 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25812 <div>a|b</div></td>
25857 Tables: 4d. No escaping needed
25862 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25863 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25864 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25875 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25885 T97430: Don't emit empty nowiki pairs around marker meta tags
25889 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25890 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25892 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25893 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25897 Unclosed xmlish element in table line shouldn't eat end delimiters
25902 <tbody><tr><td> <foo</td>
25903 <td> bar></td></tr>
25920 #### --------------- Links ----------------
25921 #### 1. Quote marks in link text
25922 #### 2. Wikilinks: Escapes needed
25923 #### 3. Wikilinks: No escapes needed
25924 #### 4. Extlinks: Escapes needed
25925 #### 5. Extlinks: No escapes needed
25926 #### --------------------------------------
25928 Links 1. WikiLinks: No escapes needed
25932 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25933 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25934 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25938 [[Foo|x [Foobar] x]]
25940 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25941 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25942 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25947 Links 2. WikiLinks: Escapes needed
25951 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25952 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25953 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25954 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25955 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25956 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25957 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25958 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25959 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25960 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25962 [[Foo|<nowiki>Foobar]</nowiki>]]
25963 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25964 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25965 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25966 [[Foo|<nowiki>|Bar</nowiki>]]
25967 [[Foo|<nowiki>]]bar</nowiki>]]
25968 [[Foo|<nowiki>[[bar</nowiki>]]
25969 [[Foo|<nowiki>x [[ y</nowiki>]]
25970 [[Foo|<nowiki>x ]] y</nowiki>]]
25971 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25973 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25974 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25975 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25976 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25977 <a href="/wiki/Foo" title="Foo">|Bar</a>
25978 <a href="/wiki/Foo" title="Foo">]]bar</a>
25979 <a href="/wiki/Foo" title="Foo">[[bar</a>
25980 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25981 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25982 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25987 Links 3. WikiLinks: No escapes needed
25991 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25992 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25997 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25998 <a href="/wiki/Foo" title="Foo">foo|bar</a>
26003 Links 4. ExtLinks: Escapes needed
26007 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
26008 <a rel="mw:ExtLink" href="http://google.com">google]</a>
26009 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
26010 <p>[http://google.com]</p>
26011 <p>[http://google.com google]</p>
26012 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26013 <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>
26015 [http://google.com <nowiki>[google]</nowiki>]
26016 [http://google.com <nowiki>google]</nowiki>]
26017 [http://google.com <nowiki>goog] le</nowiki>]
26019 <nowiki>[http://google.com]</nowiki>
26021 <nowiki>[http://google.com google]</nowiki>
26023 [http://google.com<nowiki>]</nowiki>
26025 [{{echo|http://google.com}}<nowiki>]</nowiki>
26027 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26028 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26029 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26030 </p><p>[http://google.com]
26031 </p><p>[http://google.com google]
26032 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26033 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26038 Links 5. ExtLinks: No escapes needed
26042 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26043 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26045 [http://google.com [google]
26047 [[http://google.com]]
26049 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26050 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26055 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26059 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26060 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26061 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26062 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26063 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26064 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26065 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26066 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26067 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26068 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26069 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26070 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26071 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26074 x<nowiki/>http://example.com<nowiki/>y
26075 http://example.com<nowiki/>?x
26076 http://example.com<nowiki/>&x
26077 http://example.com<nowiki/>'x
26078 http://example.com<nowiki/>,x
26079 http://example.com<nowiki/>.x
26080 http://example.com<nowiki/>;x
26081 http://example.com<nowiki/>:x
26082 http://example.com<nowiki/>;x
26083 http://example.com<nowiki/>!x
26084 http://example.com<nowiki/>=x
26085 http://example.com<nowiki/>(x)
26086 http://example.com(x<nowiki/>)
26090 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26095 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26097 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26098 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26099 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26100 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26101 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26107 "http://example.com"
26108 (http://example.com)
26109 (http://example.com) foo
26110 http://example.com,
26111 http://example.com, foo
26114 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26116 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26117 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26118 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26119 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26120 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26125 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26129 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26130 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26132 http://example.com.,;:!?\
26133 -http://example.com:
26135 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26136 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26141 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26145 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26146 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26147 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26151 X<nowiki/>RFC 123<nowiki/>y
26155 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26159 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26160 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26161 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26168 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26169 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26170 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26175 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26179 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26180 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26181 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26185 X<nowiki/>PMID 123<nowiki/>y
26189 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26193 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26194 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26195 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26202 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26203 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26204 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26209 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26213 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26214 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26215 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26218 ISBN 1234567890<nowiki/>1
26219 ISBN 1234567890<nowiki/>x
26220 a<nowiki/>ISBN 1234567890<nowiki/>b
26224 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26228 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26232 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26237 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26241 <p>this is not a link: http://example.com
26244 this is not a link: <nowiki>http://example.com</nowiki>
26248 Links 15. Link trails can't become link prefixes.
26253 <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>
26255 [[Söfnuður]]-[[00]]
26257 <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>
26261 #### --------------- Quotes ---------------
26262 #### 1. Quotes inside <b> and <i>
26263 #### 2. Link fragments separated by <i> and <b> tags
26264 #### 3. Link fragments inside <i> and <b>
26265 #### 4. No escaping needed
26266 #### --------------------------------------
26268 1a. Quotes inside <b> and <i>
26279 <b>foo'<i>bar'</i>baz</b>
26288 <i>fools'<span> errand</span></i>
26289 <i><span>fool</span>'s errand</i>
26290 '<i>foo</i> bar '<i>baz</i>
26291 a|!*#-:;+-~[]{}b'<i>x</i>
26295 ''<nowiki>''foo''</nowiki>''
26296 ''<nowiki>'''foo'''</nowiki>''
26298 '''<nowiki/>'foo''''
26299 '''<nowiki>''foo''</nowiki>'''
26300 '''<nowiki>'''foo'''</nowiki>'''
26301 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26302 '''foo'''<nowiki/>'s
26308 '''foo'''<nowiki/>'
26309 ''''foo'''<nowiki/>'
26310 ''fools'<span> errand</span>''
26311 ''<span>fool</span>'s errand''
26312 '<nowiki/>''foo'' bar '''baz''
26313 a|!*#-:;+-~[]{}b'''x''
26317 1b. Quotes inside <b> and <i> with other tags on same line
26321 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26322 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26323 <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>
26324 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26325 '<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>
26326 '<i>foo</i> <div title="name">test</div>
26327 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26328 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26329 <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>
26332 '''a'' foo ''[[bar]]''
26333 ''a''' foo ''[[bar]]''
26334 ''a''' foo '''{{echo|[[bar]]}}'''
26335 [[foo]] x'''[[bar]]''
26336 '''foo'' <ref>test</ref>
26337 '''foo'' <div title="name">test</div>
26338 '''foo'' and <br> bar
26343 2. Link fragments separated by <i> and <b> tags
26347 <p>[[<i>foo</i>hello]]</p>
26348 <p>[[<b>foo</b>hello]]</p>
26350 [[''foo''<nowiki>hello]]</nowiki>
26352 [['''foo'''<nowiki>hello]]</nowiki>
26355 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26356 # this is one of the shortcomings of this format
26358 3. Link fragments inside <i> and <b>
26362 <p><i>[[foo</i>]]</p>
26363 <p><b>[[foo</b>]]</p>
26365 ''[[foo''<nowiki>]]</nowiki>
26367 '''[[foo'''<nowiki>]]</nowiki>
26371 4. No escaping needed
26375 <p>'<span><i>bar</i></span>'
26376 '<span><b>bar</b></span>'
26380 '<span>''bar''</span>'
26381 '<span>'''bar'''</span>'
26385 #### ----------- Paragraphs ---------------
26386 #### 1. No unnecessary escapes
26387 #### --------------------------------------
26390 1. No unnecessary escapes
26394 <p>bar <span>[[foo]]</span>
26395 </p><p>=bar <span>[[foo]]</span>
26396 </p><p>[[bar <span>[[foo]]</span>
26397 </p><p>]]bar <span>[[foo]]</span>
26398 </p><p>=bar <span>foo]]</span>=
26401 bar <span><nowiki>[[foo]]</nowiki></span>
26403 =bar <span><nowiki>[[foo]]</nowiki></span>
26405 [[bar <span><nowiki>[[foo]]</nowiki></span>
26407 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26409 =bar <span>foo]]</span><nowiki>=</nowiki>
26412 #### ----------------------- PRE --------------------------
26413 #### 1. Leading whitespace in SOL context should be escaped
26414 #### ------------------------------------------------------
26416 1. Leading whitespace in SOL context should be escaped
26439 <nowiki> </nowiki>a
26441 <nowiki> </nowiki> a
26445 <nowiki> </nowiki> a
26447 <nowiki> </nowiki>a
26450 <nowiki> </nowiki>b
26473 2. Leading whitespace in non-indent-pre contexts should not be escaped
26477 <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>
26478 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26479 <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>
26489 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26508 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26512 <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>
26514 [[File:Foobar.jpg|thumb|caption]]
26518 5. Nowiki escaping should account for indent-pres
26528 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26541 #### --------------- Behavior Switches --------------------
26544 1. Valid behavior switches should be escaped
26551 <nowiki>__TOC__</nowiki>
26552 ''<nowiki>__TOC__</nowiki>''
26556 2. Invalid behavior switches should not be escaped
26567 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26569 Behavior switches should be SOL-transparent
26573 <meta property="mw:PageProp/toc" />
26575 <!-- this one's bogus -->
26578 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26580 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26584 <!-- this one's bogus -->
26593 #### --------------- HTML tags ---------------
26596 #### 3. multi-line html tag
26597 #### 4. extension tags
26598 #### -----------------------------------------
26604 <a href="http://google.com">google</a>
26606 <a href="http://google.com">google</a>
26614 <ul><li> <div>foo</div></li>
26615 <li> <div style="color:red">foo</div></li>
26616 <li> <td></li></ul>
26619 * <nowiki><div>foo</div></nowiki>
26620 * <nowiki><div style="color:red">foo</div></nowiki>
26621 * <nowiki><td></nowiki>
26625 3. multi-line html tag
26644 <p><ref>foo</ref>
26645 </p><p><ref>bar
26646 </p><p>baz</ref>
26649 <nowiki><ref>foo</ref></nowiki>
26651 <nowiki><ref>bar</nowiki>
26653 baz<nowiki></ref></nowiki>
26656 #### --------------- Others ---------------
26662 <p><nowiki>foo</nowiki>
26665 <nowiki>foo</nowiki>
26668 ## The quote-char in the input is necessary for triggering the bug
26670 (T54035) Nowiki-escaping should not get tripped by " :" in text
26679 #----------- End of wikitext escaping tests --------------
26683 Tag-like HTML structures are passed through as text
26705 </p><p>1<d e>f
26710 HTML tag with necessary entities in attributes
26712 <span title="&amp;">foo</span>
26714 <p><span title="&amp;">foo</span>
26719 HTML tag with 'unnecessary' entity encoding in attributes
26721 <span title="&">foo</span>
26723 <p><span title="&">foo</span>
26728 HTML tag with broken attribute value quoting
26730 parsoid=wt2html,html2html
26732 <span title="Hello world>Foo</span>
26734 <p><span title="Hello world">Foo</span>
26737 <p><span title="Hello world">Foo</span></p>
26741 Self-closed tag with broken attribute value quoting
26743 parsoid=wt2html,html2html
26745 <div title="Hello world />Foo
26747 <div title="Hello world"></div>
26750 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26754 Table with broken attribute value quoting
26756 parsoid=wt2html,html2html
26759 | title="Hello world|Foo
26764 <td title="Hello world">Foo
26770 <td title="Hello world">Foo
26776 Table with broken attribute value quoting on consecutive lines
26778 parsoid=wt2html,html2html
26781 | title="Hello world|Foo
26782 | style="color:red|Bar
26787 <td title="Hello world">Foo
26789 <td style="color:red">Bar
26795 <td title="Hello world">Foo
26796 </td><td style="color: red">Bar
26797 </td></tr></tbody></table>
26802 Accept empty td cell attribute
26805 | align="center" | foo || |
26810 <td align="center"> foo </td>
26817 Non-empty attributes in th-cells
26820 ! Foo !! style="color: red" | Bar
26826 <th style="color: red"> Bar
26832 Accept empty attributes in th-cells
26847 Empty table rows go away
26868 ### Parsoid-centric tests for testing RTing of inter-element separators
26869 ### Edge cases not tested by existing parser tests and specific to
26870 ### Parsoid-specific serialization strategies.
26874 RT-ed inter-element separators should be valid separators
26886 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26890 # Parsoid-only since PHP parser relies on Tidy for correct output
26892 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26906 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26907 <p>bar</p></small></td></tr>
26911 <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>
26915 # Note that the "style" attribute is really a template parameter here.
26916 # The = would have to be {{=}} if you wanted the literal.
26918 Empty TD followed by TD with tpl-generated attribute
26923 |{{echo|style='color:red'}}|foo
26937 Indented table with an empty td
26955 ## We have some newline diffs RT-ing this edge case
26956 ## and it is not important enough -- we seem to be emitting
26957 ## at most 2 newlines after a </tr> and this is unrelated to
26958 ## the issue from T85627 that this is testing.
26960 Indented table with blank lines in between (T85627)
26979 Indented block & table
26993 <div data-parsoid='{"stx":"html"}'>foo</div>
26995 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
27000 Indent and comment before table row
27015 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27016 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27020 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27022 Empty TR followed by a template-generated TR
27028 {{echo|<tr><td>foo</td></tr>}}
27033 <tr class='mw-empty-elt'></tr>
27034 <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}}]}'>
27039 ## PHP and parsoid output differ for this, and since this is primarily
27040 ## for testing Parsoid's serializer, marking this Parsoid only
27042 Empty TR followed by mixed-ws-comment line should RT correctly
27055 <tr class='mw-empty-elt'></tr>
27058 <!--c--> </tr><!--d-->
27064 Multi-line image caption generated by templates with/without trailing newlines
27066 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27067 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27069 <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>
27070 <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>
27074 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27078 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27080 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27082 <includeonly>foo</includeonly>
27090 ## PHP emits broken html for this, and since this is primarily
27091 ## a Parsoid serializer test, marking this Parsoid only
27093 Improperly nested inline or quotes tags with whitespace in between
27095 <span> <s>x</span> </s>
27098 <p><span> <s>x</s></span><s> </s>
27099 <b> <i>x</i></b><i> </i>
27104 Encapsulate protected attributes from wt
27106 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27108 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27112 <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>
27114 <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">
27115 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
27119 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27120 ## Having nested or stray pre tags results in the attempt to add duplicates,
27121 ## causing an assertion fail. This test tries to prevent that situation.
27123 Ensure ParagraphWrapper can deal with stray closing pre tags
27133 1. Ensure fostered text content is wrapped in element nodes
27137 <table>hi</table><table>ho</table>
27146 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27148 parsoid=wt2html,wt2wt
27157 <tbody><tr><td> a</td></tr>
27162 Encapsulation properly handles null DSR information from foster box
27164 parsoid=wt2html,wt2wt
27166 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27168 <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>
27172 1. Encapsulate foster-parented transclusion content
27174 parsoid=wt2wt,wt2html
27176 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27178 <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>
27188 2. Encapsulate foster-parented transclusion content
27190 parsoid=wt2wt,wt2html
27192 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27194 <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>
27205 3. Encapsulate foster-parented transclusion content
27207 parsoid=wt2wt,wt2html
27209 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27211 <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>"]}">
27224 4. Encapsulate foster-parented transclusion content
27226 parsoid=wt2wt,wt2html
27228 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27230 <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>"]}">
27243 5. Encapsulate foster-parented transclusion content
27245 parsoid=wt2wt,wt2html
27247 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27249 <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>
27264 6. Encapsulate foster-parented transclusion content
27266 parsoid=wt2wt,wt2html
27268 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27270 <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>
27286 7. Encapsulate foster-parented transclusion content
27288 parsoid=wt2wt,wt2html
27290 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27292 <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>
27302 # Note that the wt is broken on purpose: the = should be {{=}} if you
27303 # don't want it to be a template parameter key.
27305 8. Encapsulate foster-parented transclusion content
27307 parsoid=wt2wt,wt2html
27310 }}{|{{echo|style='color:red'}}
27315 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
27317 <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>
27328 9. Encapsulate foster-parented transclusion content
27330 parsoid=wt2wt,wt2html
27332 <table>{{echo|hi</table>hello}}
27334 <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>
27338 Table in fosterable position
27349 <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">
27351 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27357 # Parsoid only for T66747
27359 Properly encapsulate empty-content transclusions in fosterable positions
27367 <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"}]]}'>
27373 Always encapsulate foster box when template range is expanded to table
27386 T115289: Unclosed table
27388 {{echo|<table>}}<!--c-->[[Category:Two]]
27390 <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>
27394 T115289: Don't migrate newlines out of tables with fostered content
27396 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27398 <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>
27402 T73074: More fostering fun
27404 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27406 <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>
27410 Support <object> element with .data attribute
27414 <object data="test.swf"></object>
27416 <object data="test.swf"></object>
27420 Don't block XML namespace declaration
27422 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27424 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27427 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27430 # -----------------------------------------------------------------
27431 # The following section of tests are primarily to spec requirements
27432 # around Parsoid's serialization (old, new, edited content)
27434 # All these tests are marked Parsoid html2wt and html2html only
27435 # ----------------------------------------------------------------
27438 Ignore rel attribute in a-tags during serialization to url-links
27442 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27443 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27444 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27446 http://en.wikipedia.org/wiki/Foobar
27447 http://en.wikipedia.org/wiki/Foobar
27448 http://en.wikipedia.org/wiki/Foobar
27451 # 'mi' is a localinterwiki prefix as well as a language
27453 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27457 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27463 Parsoid should accept interwiki shortcuts
27467 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27468 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27469 <a href='./fr:Foo'>Foo</a></p>
27470 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27471 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27472 <a href='fr%3AFoo'>Foo</a></p>
27473 <p><a href='FR%3AFoo'>Foo</a>
27474 <a href='./FR:Foo'>Foo</a></p>
27489 Parsoid should not accept invalid interwiki shortcuts
27493 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27494 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27495 <a href='news:Foo'>Foo</a></p>
27504 New wikilinks should be serialized properly
27508 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27509 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27510 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27511 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27512 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27516 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27517 http://en.wikipedia.org/wiki/Foo
27518 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27522 New wiki links (href variations)
27526 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27527 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27528 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27529 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27534 [[Toxine bactérienne]]
27538 New wiki links (content string variations)
27542 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27543 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27544 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27548 [[Foo_bar|./Foo_bar]]
27552 New category links (href variations)
27556 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27557 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27558 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27560 [[Category:Toxine bactérienne]]
27561 [[Category:Toxine bactérienne]]
27562 [[Category:Toxine bactérienne]]
27566 New sol transparent links don't need indent-pre nowiki protection
27571 <link rel="mw:PageProp/redirect" href="./Main_Page">
27572 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27573 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27575 #WEITERLEITUNG [[Main Page]]
27576 <!-- this is good --> [[Category:Good]]
27577 <!-- this is great --> [[Kategorie:Great]]
27581 New interlanguage links (href variations)
27585 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27586 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27587 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27589 [[es:Toxine bactérienne]]
27590 [[es:Toxine_bactérienne]]
27591 [[es:Toxine_bactérienne]]
27595 Image: Modifying size of an image (1)
27598 "modes": ["wt2wt"],
27600 ["img[height]", "attr", "height", "22"],
27601 ["img[width]", "attr", "width", "200"]
27605 [[Image:Foobar.jpg|230x230px]]
27607 [[Image:Foobar.jpg|200x200px]]
27611 Image: Modifying size of an image (2)
27614 "modes": ["wt2wt"],
27616 ["img[height]", "attr", "height", "100"],
27617 ["img[width]", "attr", "width", "500"]
27621 [[Image:Foobar.jpg|230x230px]]
27623 [[Image:Foobar.jpg|500x500px]]
27626 # Change in size is ignored so long as class='mw-default-size'
27628 Image: Modifying size of an image (3)
27631 "modes": ["wt2wt"],
27633 ["figure[class]", "removeClass", "mw-default-size"],
27634 ["figure img", "attr", "height", "19"],
27635 ["figure img", "attr", "width", "170"]
27639 [[Image:Foobar.jpg|thumb]]
27641 [[Image:Foobar.jpg|thumb|170x170px]]
27645 Image: Modifying alignment of an image (T50665)
27648 "modes": ["wt2wt"],
27650 ["figure[class]", "removeClass", "mw-halign-right"],
27651 ["figure[class]", "addClass", "mw-halign-left"]
27655 [[Image:Foobar.jpg|thumb|caption|right]]
27657 [[Image:Foobar.jpg|thumb|caption|left]]
27661 Image: Modifying mw-default-size of an frameless image (T64805)
27664 "modes": ["wt2wt"],
27666 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27670 [[Image:Foobar.jpg|frameless|right]]
27672 [[Image:Foobar.jpg|frameless|right|220x220px]]
27676 Image: Modifying valign of an image (T51221)
27679 "modes": ["wt2wt"],
27681 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27682 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27686 [[File:Foobar.jpg|20px|middle]]
27688 [[File:Foobar.jpg|20px|text-top]]
27692 Image: Modifying alt attribute of an image (T58400)
27695 "modes": ["wt2wt"],
27697 ["img[alt]", "attr", "alt", "some alternate edited text"]
27701 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27703 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27707 Image: Modifying caption of an image
27710 "modes": ["wt2wt"],
27712 ["figcaption", "text", "new caption"]
27716 [[Image:Foobar.jpg|thumb|original caption]]
27718 [[Image:Foobar.jpg|thumb|new caption]]
27722 Image: empty alt attribute (T50924)
27726 [[File:Foobar.jpg|thumb|alt=|bar]]
27728 <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>
27732 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27738 <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>
27740 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27744 Image: Block level image should have \n before and after
27747 [[File:Foobar.jpg|right|thumb|150x150px]]
27751 <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>
27756 Image: New block level image should have \n before and after (existing content)
27759 [[File:Foobar.jpg|right|thumb|150x150px]]
27763 <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>
27768 Image: upright option (parsoid)
27770 [[File:Foobar.jpg|thumb|upright|caption]]
27771 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27772 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27774 <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>
27775 <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>
27776 <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>
27780 Image: upright option is ignored on inline and frame images (parsoid)
27782 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27784 <p><figure-inline 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></figure-inline></p>
27788 Image: in template parameter with empty parameter
27790 {{echo|[[File:Foobar.jpg|link=]]}}
27792 <p><figure-inline 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></figure-inline></p>
27796 Image: from basic HTML (1)
27800 <span typeof="mw:Image">
27801 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27804 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27808 Image: from basic HTML (2)
27812 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27814 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27818 Image: from basic HTML (3)
27822 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27824 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27828 Image: from basic HTML (4)
27832 <img src="./File:Foobar.jpg">
27834 [[File:Foobar.jpg|link=]]
27838 Image: Invalid title as link
27840 [[File:Foobar.jpg|link=<]]
27842 <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>
27845 <p><figure-inline 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></figure-inline></p>
27849 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27854 <li><p>foo</p></li>
27861 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27865 <ul> <li>foo</li></ul>
27871 Don't strip leading whitespace when handling indent-pre suppressing tags
27876 <tr><td> indented row</td></tr>
27879 <b>This is very bold of you!</b>
27882 indented cell (no pre-wrapping!)
27892 '''This is very bold of you!'''
27896 indented cell (no pre-wrapping!)
27904 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27926 <nowiki> </nowiki></span>bar2
27929 <nowiki> </nowiki><span>bar</span>
27932 <nowiki> </nowiki><span>foo</span>
27937 Lists: Dont insert newlines in a serialized list item.
27941 <ul><li>a<br>b</li><li>c</li></ul>
27948 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27951 "modes": ["html2wt"],
27952 "scrubWikitext": false
27955 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27956 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27958 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27959 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27961 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27963 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27965 == hello there [[Category:A1]] ==
27967 == [[Category:A2]] hi pal ==
27969 == <!--foo--> [[Category:A3]] how goes it ==
27971 == it goes well [[Category:A4]] <!--bar--> ==
27973 ==howdy [[Category:A5]]==
27979 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27982 "modes": ["html2wt"],
27983 "scrubWikitext": true
27986 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27987 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27989 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27990 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27992 <h2><meta property="mw:PageProp/toc" /> ok</h2>
28000 <!--foo--> [[Category:A3]]
28005 [[Category:A4]] <!--bar-->
28013 Headings: Don't hoist metas that come from templates
28016 "modes": ["html2wt"],
28017 "scrubWikitext": true
28020 <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>
28022 == {{echo|foo [[Category:Foo]]}} ==
28026 Headings: Category in ref isn't hoisted
28029 "modes": ["html2wt"],
28030 "scrubWikitext": true
28033 <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>
28035 <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>
28038 [[Category:Baz]] </ref> ==
28044 Parsoid: Serialize positional parameters with = in them as named parameter
28048 <p about="#mwt1" typeof="mw:Transclusion"
28049 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28051 <p about="#mwt1" typeof="mw:Transclusion"
28052 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28054 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28055 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28056 <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>
28060 {{echo|1=f=oo|2=bar}}
28062 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28063 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28064 {{echo|<nowiki>f=oo</nowiki>|bar}}
28068 Parsoid: Serialize positional parameters with = in extlink as named parameter
28072 <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>
28074 {{echo|1=http://stuff?is=ok}}
28078 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28082 <div>a<p>b</p></div>
28103 Substrings resembling wikitext in hrefs should not get nowiki escapes
28107 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28113 Enforce single-line context in the serializer
28120 <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">
28121 </span><span about="#mwt1">you</span> </h2>
28123 <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>
28125 <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
28126 there</span></li></ol>
28138 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28145 </tbody></table></dd></dl>
28149 == hi {{bogus|there
28160 * foo '''bar''' baz
28172 Serialize new placeholder space without spans
28176 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28178 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28180 <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>
28186 <ref>foo : bar</ref>ok
28190 #-----------------------
28191 # Tag minimization tests
28192 #-----------------------
28195 1. I/B quote minimization: wikitext-only tags should be combined
28199 <p><i>A</i><i>B</i></p>
28200 <p><b>A</b><b>B</b></p>
28201 <p><i>A</i><b><i>B</i></b></p>
28202 <p><b>A</b><i><b>B</b></i></p>
28203 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28204 <p><i><b>A</b></i><i><b>B</b></i></p>
28205 <p><i><b>A</b></i><b><i>B</i></b></p>
28206 <p><b><i>A</i></b><i><b>B</b></i></p>
28226 2. I/B quote minimization: wikitext and html tags should not be combined
28230 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28231 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28235 ''A''<nowiki/>'''<i>B</i>'''
28239 3. I/B quote minimization: templated content stops minimization
28243 <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>
28244 <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>
28246 ''A''{{echo|''B''}}
28248 ''A''{{echo|'''''B'''''}}
28252 4. I/B quote minimization: new content should be mimimized with adjacent old content
28256 <p><i>A</i><i>B</i></p>
28257 <p><b>A</b><b>B</b></p>
28258 <p><i>A</i><b><i>B</i></b></p>
28268 5a. Merge adjacent quote nodes if they've been edited
28271 "modes": ["wt2wt", "selser"],
28273 ["p", "contents", "remove", ":contains('b')"]
28283 5b. Merge adjacent quote nodes if they've been edited
28286 "modes": ["wt2wt", "selser"],
28292 ''a''<span id="x">b</span>''c''
28298 1. Merge adjacent link nodes as long as at least one element is new
28301 "modes": ["html2wt"],
28302 "scrubWikitext": true
28305 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28306 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28307 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28311 [[Football|Foot]][[Football|ball]]
28315 2. Merge adjacent link nodes and enable additional normalizations
28318 "modes": ["html2wt"],
28319 "scrubWikitext": true
28322 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28324 [[Football|''Football'']]
28328 3. Don't merge adjacent link nodes if scrubWikitext is false
28331 "modes": ["html2wt"],
28332 "scrubWikitext": false
28335 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28337 [[Football|Foot]][[Football|ball]]
28340 #------------------------------
28341 # End of tag minimization tests
28342 #------------------------------
28345 T56262: New entities
28349 <span typeof="mw:Entity"> </span>
28354 ## Note that there is no wikitext output for 'unknownproperty' ##
28355 ## Unknown magic words are silently dropped ##
28362 <meta property='mw:PageProp/toc' />
28363 <meta property='mw:PageProp/notoc' />
28364 <meta property='mw:PageProp/forcetoc' />
28365 <meta property='mw:PageProp/index' />
28366 <meta property='mw:PageProp/noindex' />
28367 <meta property='mw:PageProp/nogallery' />
28368 <meta property='mw:PageProp/noeditsection' />
28369 <meta property='mw:PageProp/notitleconvert' />
28370 <meta property='mw:PageProp/nocontentconvert' />
28371 <meta property='mw:PageProp/unknownproperty' />
28381 __NOCONTENTCONVERT__
28385 Consecutive <pre>s should not get merged
28387 parsoid=html2wt,html2html
28389 <pre>a</pre><pre>b</pre>
28417 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28421 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28423 [[Special:BookSources/1234567890|ISBN 1234567895]]
28427 Edited RFC links not serializable as RFC links should serialize as extlinks
28431 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28433 [https://tools.ietf.org/html/rfc123 New RFC]
28437 Edited PMID links not serializable as PMID links should serialize as extlinks
28441 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28443 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28447 WTS of autolinks with trailing/surrounding context
28451 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28452 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28453 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28454 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28455 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28456 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28458 http://cscott.net'''foo'''
28460 http://cscott.net<b>foo</b>
28462 '''http://cscott.net'''
28464 '''http://cscott.net '''
28466 '''http://cscott.net<nowiki/>x'''
28468 http://cscott.net<nowiki/>x
28472 WTS of autolinks with nowikis (round-trip)
28474 x<nowiki/>http://cscott.net<nowiki/>x
28476 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
28479 # this is the "easy" test because it leaves in place all the
28480 # data-parsoid information indicating this is an autolink
28482 WTS of autolinks with escapes (editing)
28485 "modes": ["wt2wt"],
28487 [ "span", "remove" ]
28491 x<nowiki/>http://cscott.net<nowiki/>x
28493 x<nowiki/>http://cscott.net<nowiki/>x
28497 WTS of edited autolink-like text (T103364)
28500 "modes": ["wt2wt"],
28502 [ "span[typeof]", "removeAttr", "typeof" ]
28506 Not a link: <nowiki>http://example.com</nowiki>.
28508 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28512 WTS of newly-authored autolink-like text (T103364)
28516 <p>http://example.com is not a link.</p>
28518 <nowiki>http://example.com</nowiki> is not a link.
28522 WTS of autolink-like text after an autolink (T108563)
28526 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28528 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28532 Magic links inside links (not autolinked)
28534 [[Foo|http://example.com]]
28537 [[Foo|ISBN 123456789x]]
28539 [http://foo.com http://example.com]
28540 [http://foo.com RFC 1234]
28541 [http://foo.com PMID 1234]
28542 [http://foo.com ISBN 123456789x]
28544 <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>
28545 <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>
28547 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28548 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28549 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28550 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28552 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
28553 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
28554 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
28555 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
28559 Magic links inside image captions (autolinked)
28561 [[File:Foobar.jpg|thumb|http://example.com]]
28562 [[File:Foobar.jpg|thumb|RFC 1234]]
28563 [[File:Foobar.jpg|thumb|PMID 1234]]
28564 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28566 <div class="thumb tright">
28567 <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>
28568 <div class="thumbcaption">
28569 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28570 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
28573 <div class="thumb tright">
28574 <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>
28575 <div class="thumbcaption">
28576 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28577 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div>
28580 <div class="thumb tright">
28581 <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>
28582 <div class="thumbcaption">
28583 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28584 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
28587 <div class="thumb tright">
28588 <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>
28589 <div class="thumbcaption">
28590 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28591 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
28595 <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>
28596 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="https://tools.ietf.org/html/rfc1234" rel="mw:ExtLink">RFC 1234</a></figcaption></figure>
28597 <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>
28598 <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>
28602 WTS of magic word text (T109371)
28607 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28608 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28610 <nowiki>RFC 1234</nowiki>
28612 [http://foo.com RFC 1234]
28618 Edited Redirect link should emit a non-piped wikitext link
28622 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28628 T75121: Infer extension name from typeOf if data-mw is not present
28630 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28632 <div typeOf="mw:Extension/foo"></div>
28637 # Note that the <p> wrapping isn't present in PHP parser output
28638 # The important thing for this test is that P-wrapping doesn't
28639 # interfere with the <nowiki> protection for leading - in <td>
28640 # (which isn't necessary for <th>).
28642 T88318: p-wrapped dash in table.
28644 parsoid=html2wt,wt2wt
28647 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28648 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28649 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28656 |<nowiki>-</nowiki>
28657 |<nowiki>- </nowiki>
28676 <td><small>-</small></td>
28688 T149209: WTS: Handle newlines in table cells properly
28696 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28698 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28704 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28706 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28728 T149209: Selser: Handle newlines in table cells properly
28731 "modes": ["selser"],
28733 [ "#h1", "html", "a\nb\n" ],
28734 [ "#h2", "html", "a\nb\n" ],
28735 [ "#c1", "html", "a\nb\n" ],
28736 [ "#c2", "html", "<p>a</p>" ],
28737 [ "#c3", "html", "<p>a</p>" ],
28738 [ "#c4", "html", "edit-me<p>a</p>" ]
28743 ! id="h1" |edit-me!!1
28745 ! id="h2" |edit-me||2
28747 | id="c1" |edit-me||3
28749 | id="c2" |edit-me||4
28751 | id="c3" |edit-me||p||q||r
28753 | id="c4" |edit-me||p||q||r
28782 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28787 <td id='mwAc'>foo</td>
28788 <td id='serialize-this'>bar</td>
28793 | id="serialize-this" |bar
28798 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28802 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28804 <div id="hello">ok</div>
28811 "modes": ["wt2wt"],
28813 [ "#xyz", "before", "<b>before</b> stuff " ],
28814 [ "#xyz", "after", " stuff <i>after</i>" ],
28815 [ "#xyz", "html", "x <b>y</b> z" ]
28819 <span id="xyz">hello</span>
28821 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28825 Never serialize a-tag as html, regardless of what data-parsoid has to say
28827 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28829 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28834 ## SSS FIXME: This is broken output nevertheless.
28835 ## What might be a reasonable non-broken output for this?
28836 ## This is an edge case unlikely to be seen in production
28837 ## that I am not wasting more time on this right now.
28839 Never serialize a-tag as html, no matter what attributes it has
28841 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28843 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28845 [http://boo.org http://boohoo.org]
28848 # Misnested is an indication that selser can reuse the source but these have
28849 # shown to sneak through on occasion. See T101768.
28850 # The original wikitext here is: [http://test.com [[one]] two three]
28852 Strip span tags added to mark misnested links
28856 <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>
28858 [http://test.com][[one]] two three
28862 Catch regression when unpacking misnested links
28866 {{echo|hi}}[http://example.com [[ho]]]
28868 <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>
28872 Catch regression when unpacking with trailing content
28874 {{echo|Foo <references/> bar}}
28876 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Foo <references/> bar"}},"i":0}}]}'>Foo </p><ol class="mw-references references" typeof="mw:Extension/references" about="#mwt2" data-mw='{"name":"references","attrs":{}}'></ol><p about="#mwt2"> bar</p>
28880 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28884 <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|}"]}'>
28896 ## This test verifies the presence and computation of this attribute indirectly
28897 ## by making an edit and ensuring that the serialization is correct (which it would be
28898 ## only if firstWikitextNode is properly set).
28900 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28903 "modes": ["wt2wt"],
28905 [ "div#x", "remove" ],
28906 [ "div", "before", "<div>new</div>" ]
28910 <div id="x">foo</div>
28912 {{echo|<div>boo</div>
28920 {{echo|<div>boo</div>
28926 # --------------------------------------------
28927 # Tests spec'ing wikitext serialization norms |
28928 # --------------------------------------------
28931 Serialize multi-line indent-pre starting with wikitext syntax
28945 1. Categories should always be serialized on their own line
28949 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28957 2. Categories that are part of templates should not introduce a line break
28959 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28961 <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>
28964 # Careful while editing these next 2 tests. There are \u200f characters
28965 # before and after the <link> tags in the HTML and following some
28966 # of the categories in wikitext
28967 # Do not remove these characters in edits.
28969 # As part of the serialization, these bidi characters will get stripped.
28971 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28974 "modes": ["html2wt"],
28975 "scrubWikitext": true
28978 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28979 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28982 [[קטגוריה: שיטות משפט]]
28986 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28989 "modes": ["html2wt"],
28990 "scrubWikitext": true
28993 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
29000 Lists: Add space after bullets
29007 <li><span> baz</span></li>
29012 * <span> baz</span>
29016 1. Headings: Add space before/after == (T53744)
29023 <h2><span> baz</span></h2>
29031 == <span> baz</span> ==
29035 2. Headings: Add space before/after == even after hoisted content
29038 "modes": ["html2wt"],
29039 "scrubWikitext": true
29042 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29050 1. Headings: suppress newly created empty headings
29053 "modes": ["html2wt"],
29054 "scrubWikitext": true
29062 2. Headings: don't suppress empty headings if scrubWikitext is false
29072 3. Headings: suppress empty headings on edits
29075 "modes": ["selser"],
29076 "scrubWikitext": true,
29082 ==<span id="x">foo</span>==
29087 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29090 "modes": ["html2wt"],
29091 "scrubWikitext": true
29094 <h2>foo<br/>bar</h2>
29095 <h2>foo <span><br/>bar</span> baz</h2>
29099 == foo <span> bar</span> baz ==
29103 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29106 "modes": ["html2wt"],
29107 "scrubWikitext": false
29110 <h2>foo<br/>bar</h2>
29116 1. WT Quote Tags: suppress newly created empty style tags
29119 "modes": ["html2wt"],
29120 "scrubWikitext": true
29128 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29134 ''<nowiki/>'''''<nowiki/>'''
29138 3. WT Quote Tags: suppress empty style tags on edits
29141 "modes": ["selser"],
29142 "scrubWikitext": true,
29148 '''<span id="x">foo</span>'''
29153 1. Anchors: suppress newly created empty anchors
29156 "modes": ["html2wt"],
29157 "scrubWikitext": true
29160 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29165 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29168 "modes": ["html2wt"],
29169 "scrubWikitext": false
29172 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29178 3. Anchors: suppress empty anchors on edits
29181 "modes": ["selser"],
29182 "scrubWikitext": true,
29188 [[Test|<span id="x">foo</span>]]
29193 3a. Anchors: do not suppress numbered extlinks
29196 "modes": ["wt2wt"],
29197 "scrubWikitext": true
29202 <a rel="mw:ExtLink" href="http://foo.com"></a>
29206 3b. Anchors: do not suppress numbered extlinks
29209 "modes": ["wt2wt"],
29210 "scrubWikitext": true,
29216 [http://foo.com <span id="x">foo</span>]
29222 Normalizations should be restricted to edited content
29225 "modes": ["selser"],
29226 "scrubWikitext": true,
29228 [ "h1", "before", "<i></i>"]
29242 1. Multiple normalizations (html2wt)
29245 "modes": ["html2wt"],
29246 "scrubWikitext": true
29250 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29251 </a><b><i></i></b>x</p>
29260 2. Multiple normalizations (selser)
29263 "modes": ["selser"],
29264 "scrubWikitext": true,
29266 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29270 <span id="x">foo</span>
29272 <span id="x">foo</span>
29278 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29281 "modes": ["html2wt"],
29282 "scrubWikitext": true
29294 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29301 <nowiki> </nowiki>hi
29303 <nowiki> </nowiki> hello
29307 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29310 "modes": ["html2wt"],
29311 "scrubWikitext": true
29320 baz bang</td></tr></table>
29326 bar<span>boo</span></p>
29342 bar<span>boo</span>
29346 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29349 "modes": ["selser"],
29350 "scrubWikitext": true,
29352 [ "p", "html", " a\n b" ]
29363 1. New links that end in spaces
29366 "modes": ["html2wt"],
29367 "scrubWikitext": false
29370 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29371 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29372 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29374 [[Berlin ]]<nowiki/>is the capital of Germany.
29378 [[Boston ]] is a city.
29382 2. New links that end in spaces
29385 "modes": ["html2wt"],
29386 "scrubWikitext": true
29389 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29390 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29391 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29393 [[Berlin]] is the capital of Germany.
29397 [[Boston]] is a city.
29401 1. Table cells with escapable prefixes
29404 "modes": ["html2wt"],
29405 "scrubWikitext": false
29409 <tr><td>a</td></tr>
29410 <tr><td>-</td></tr>
29411 <tr><td>+</td></tr>
29417 |<nowiki>-</nowiki>
29419 |<nowiki>+</nowiki>
29424 2. Table cells with escapable prefixes
29427 "modes": ["html2wt"],
29428 "scrubWikitext": true
29432 <tr><td>a</td></tr>
29433 <tr><td>-</td></tr>
29434 <tr><td>+</td></tr>
29447 3a. Table cells with escapable prefixes after edits
29450 "modes": ["selser"],
29451 "scrubWikitext": true,
29453 [ "table tbody tr:first-child td:first-child", "remove"]
29467 3b. Table cells with escapable prefixes after edits
29470 "modes": ["selser"],
29471 "scrubWikitext": true,
29473 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29480 |<span id="x">foo</span>+
29489 # FIXME: This test will fail because
29490 # normalization doesn't realize that the id attribute
29491 # will eliminate the escapable scenario
29493 4a. Table cells without escapable prefixes after edits
29496 "modes": ["selser"],
29497 "scrubWikitext": true,
29499 [ "#x", "html", "-" ]
29512 ## This tests normalizer's ability to discriminate between
29513 ## cells having identical content.
29515 4b. Table cells without escapable prefixes after edits
29518 "modes": ["selser"],
29519 "scrubWikitext": true,
29521 [ "td", "html", "-" ]
29534 ## This tests normalizer's ability to not be tripped by
29535 ## comments (and whitespace)
29537 4c. Table cells without escapable prefixes after edits
29540 "modes": ["selser"],
29541 "scrubWikitext": true,
29543 [ "table tbody tr td:first-child", "remove" ]
29558 ## This tests normalizer's ability to handle HTML cells
29560 4d. Table cells without escapable prefixes after edits
29563 "modes": ["selser"],
29564 "scrubWikitext": true,
29566 [ "td", "html", "-" ]
29571 <tr><td>a</td></tr>
29575 <tr><td>-</td></tr>
29579 ## T111151 Remove font elements without attributes
29581 5a. font tags without attributes should be dropped in scrubWikitext mode
29584 "modes": ["html2wt"],
29585 "scrubWikitext": true
29589 <font><font>bar</font></font>
29590 <font class="x">boo</font>
29594 <font class="x">boo</font>
29598 5b. font tags should not be dropped without scrubWikitext being enabled
29601 "modes": ["html2wt"],
29602 "scrubWikitext": false
29611 Escape nowiki DOM elements
29615 <nowiki><i>foo</i></nowiki>
29617 <nowiki>''foo''</nowiki>
29620 # This is meant to be an interim fix while we go about figuring out
29621 # how to not introduce these trailing <nowiki/>s in the first place.
29623 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29627 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29629 <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>
29630 <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>
29643 # ---------------------------------------------------
29644 # End of tests spec'ing wikitext serialization norms |
29645 # ---------------------------------------------------
29649 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29657 <td><b>c</b><p>d</p></td>
29676 Anchor without href scenarios
29678 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29681 <a class="no">dice</a>
29686 <span name="foo"></span>
29690 New transclusion added after a list should be serialized after the list
29694 <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>
29700 # -----------------------------------------------------------------
29701 # End of section for Parsoid-only html2wt tests for serialization
29703 # -----------------------------------------------------------------
29705 # -----------------------------------------------------------------
29706 # The following section of tests are primarily to spec behavior of
29707 # the selective serializer. All these tests have manual selser
29708 # changes. The automated selser changes for all tests handle the
29709 # wide variation of changes, but these tests here capture specs
29710 # deterministically.
29711 # ----------------------------------------------------------------
29715 Selser: New comments should not be lost
29718 "modes": ["selser"],
29720 [ "#a", "after", "<!--c1-->" ],
29721 [ "#b", "before", "<!--c2-->" ]
29725 <span id="a">a</span>
29727 <span id="b">b</span>
29729 <span id="a">a</span><!--c1-->
29731 <!--c2--><span id="b">b</span>
29736 Selser: Check for validity of DSR before using it
29739 "modes": ["selser"],
29741 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29745 <span id="a">a</span>
29747 {{DISPLAYTITLE:foo}}
29748 <span id="a">a</span>
29752 1. DOMDiff: Changes to <ref> content should be looked up using id
29755 "modes": ["selser"],
29757 ["#X", "after", "bar"],
29758 ["#Y", "after", "baz"]
29762 X <ref><span id="X">foo</span></ref>
29765 <ref name="a"><span id="Y">foo</span></ref>
29768 X <ref><span id="X">foo</span>bar</ref>
29771 <ref name="a"><span id="Y">foo</span>baz</ref>
29776 2. DOMDiff: Changes to <ref> content should be looked up using id
29779 "modes": ["selser"],
29781 ["#Z", "after", "bar"]
29785 A <ref>foo bar for a</ref>
29786 B <ref group="X" name="b" />
29790 <references group="X">
29791 <ref name="b"><span id="Z">foo</span></ref>
29794 A <ref>foo bar for a</ref>
29795 B <ref group="X" name="b" />
29799 <references group="X">
29800 <ref name="b"><span id="Z">foo</span>bar</ref>
29805 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29808 "modes": ["selser"],
29810 [ "div:first-child", "text", "bar" ]
29814 <div style="{{1x|color:red;}}%">foo</div>
29816 <div style="{{1x|color:red;}}%">bar</div>
29829 <li class="mw-empty-elt"></li>
29830 <li class="mw-empty-elt"></li>
29838 [[File:Thumb.png|thumb]]
29840 <div class="thumb tright">
29841 <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>
29842 <div class="thumbcaption">
29843 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
29850 unclosed internal link XSS (T137264)
29852 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29854 <p>[[#<script>alert(1)</script>|
29857 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29860 # Use $wgRawHtml to inject a <style> tag, since you normally can't in wikitext
29861 # (Parsoid doesn't support $wgRawHtml==true)
29863 Validating that <style> isn't eaten by tidy (T167349)
29868 <html><style>.foo::before { content: "<foo>"; }</style></html>
29869 <html><style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style></html>
29873 <style>.foo::before { content: "<foo>"; }</style>
29874 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29879 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29881 wgFragmentMode=[ 'html5', 'legacy' ]
29883 == A&B&C&amp;D&amp;amp;E ==
29884 [[#A&B&C&amp;D&amp;amp;E]]
29886 <h2><span id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE"></span><span class="mw-headline" id="A&B&C&amp;D&amp;amp;E">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>
29887 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
29890 <h2 id="A&B&C&amp;D&amp;amp;E"><span id="A.26B.26C.26amp.3BD.26amp.3Bamp.3BE" typeof="mw:FallbackId" data-parsoid="{}"></span> A&B<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>C<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp;D<span typeof="mw:Entity" data-parsoid='{"src":"&amp;","srcContent":"&"}'>&</span>amp;amp;E </h2>
29891 <p><a rel="mw:WikiLink" href="./Main_Page#A&B&C&amp;D&amp;amp;E" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#A&B&C&amp;D&amp;amp;E"},"sa":{"href":"#A&B&amp;C&amp;amp;D&amp;amp;amp;E"}}'>#A&B&C&amp;D&amp;amp;E</a></p>
29895 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
29897 wgFragmentMode=[ 'legacy' ]
29899 == A&B&C&amp;D&amp;amp;E ==
29900 [[#A&B&C&amp;D&amp;amp;E]]
29902 <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>
29903 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29908 Decoding of HTML entities in embedded HTML tags
29910 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29912 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29915 <table class="1&2&3&amp;4&amp;amp;5" data-parsoid='{"stx":"html","a":{"class":"1&2&3&amp;4&amp;amp;5"},"sa":{"class":"1&2&amp;3&amp;amp;4&amp;amp;amp;5"}}'><tbody><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>x</td></tr></tbody></table>
29919 Decoding of HTML entities in indicator names for IDs (T104196)
29921 parsoid=wt2html,html2html
29924 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29926 1&2&3&4&amp;5=Indicator
29929 <p><span typeof="mw:Extension/indicator" about="#mwt3" data-mw='{"name":"indicator","attrs":{"name":"1&2&3&amp;4&amp;amp;5"},"body":{"extsrc":"Indicator"}}'></span></p>
29932 # this version of the test strips out the ambiguity so Parsoid rts cleanly
29934 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
29938 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29940 1&2&3&4&amp;5=Indicator
29943 <p><span typeof="mw:Extension/indicator" about="#mwt3" data-mw='{"name":"indicator","attrs":{"name":"1&2&3&amp;4&amp;amp;5"},"body":{"extsrc":"Indicator"}}'></span></p>
29946 # This fragment mode is what Parsoid supports.
29948 HTML5 ids: fallback to legacy
29950 wgFragmentMode=[ 'html5', 'legacy' ]
29962 == Hey < # " > % : ' ==
29963 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29965 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29967 <!-- These two links should produce identical HTML -->
29968 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29971 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29973 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29974 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29975 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29976 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29977 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29978 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29982 <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>
29983 <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>
29984 <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>
29985 <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>
29986 <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>
29987 <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>
29988 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_<_#_"_>_%_:_'">#Hey < # " > % : '</a>
29989 </p><p>💩 <span id="💩"></span>
29990 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29993 <h2 id="Foo_bar"> Foo bar </h2>
29995 <h2 id="foo_Bar_2"> foo Bar </h2>
29997 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span> Тест </h2>
29999 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span> Тест </h2>
30001 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span> тест </h2>
30003 <h2 id="Hey_<_#_"_>_%_:_'"><span id="Hey_.3C_.23_.22_.3E_.25_:_.27" typeof="mw:FallbackId"></span> Hey < # " > %<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: ' </h2>
30004 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar">#Foo bar</a> <a rel="mw:WikiLink" href="./Main_Page#foo_Bar">#foo Bar</a> <a rel="mw:WikiLink" href="./Main_Page#Тест">#Тест</a> <a rel="mw:WikiLink" href="./Main_Page#тест">#тест</a> <a rel="mw:WikiLink" href="./Main_Page#Hey_<_#_"_>_%_:_'" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Hey_<_#_\"_>_%_:_'"},"sa":{"href":"#Hey < # \" > % : '"}}'>#Hey < # " > % : '</a></p>
30006 <p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode:💩","function":"anchorencode"},"params":{},"i":0}}]}'>💩</span> <span id="💩" about="#mwt3" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"id"},{"html":"<span about=\"#mwt2\" typeof=\"mw:Transclusion\" data-parsoid='{\"pi\":[[]],\"dsr\":[190,209,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:💩\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>💩</span>"}]]}'></span></p>
30008 <!-- These two links should produce identical HTML -->
30009 <p><a rel="mw:WikiLink" href="./Main_Page#啤酒">#啤酒</a> <a rel="mw:WikiLink" href="./Main_Page#啤酒" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#啤酒"},"sa":{"href":"#%E5%95%A4%E9%85%92"}}'>#啤酒</a></p>
30012 # Parsoid doesn't support this mode
30014 HTML5 ids: legacy with a fallback to modern
30016 wgFragmentMode=[ 'legacy', 'html5' ]
30028 == Hey < # " > % : ' ==
30029 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30031 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30033 <!-- These two links should produce identical HTML -->
30034 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30037 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30039 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30040 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30041 <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>
30042 <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>
30043 <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>
30044 <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>
30048 <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>
30049 <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>
30050 <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>
30051 <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>
30052 <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>
30053 <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>
30054 <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>
30055 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30056 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30060 # Parsoid doesn't support this mode.
30062 HTML5 ids: no legacy
30064 wgFragmentMode=[ 'html5' ]
30076 == Hey < # " > % : ' ==
30077 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30079 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30081 <!-- These two links should produce identical HTML -->
30082 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30085 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30087 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30088 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30089 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30090 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30091 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30092 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30096 <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>
30097 <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>
30098 <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>
30099 <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>
30100 <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>
30101 <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>
30102 <p><a href="#Foo_bar">#Foo bar</a> <a href="#foo_Bar">#foo Bar</a> <a href="#Тест">#Тест</a> <a href="#тест">#тест</a> <a href="#Hey_<_#_"_>_%_:_'">#Hey < # " > % : '</a>
30103 </p><p>💩 <span id="💩"></span>
30104 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30109 T90902: Normalize weird characters in section IDs
30111 wgFragmentMode=[ 'html5', 'legacy' ]
30117 <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>
30118 <p><a href="#Foo_bar">#Foo bar</a>
30123 T51672: Test for brackets in attributes of elements in external link texts
30125 [http://example.com/ link <span title="title with [brackets]">span</span>]
30126 [http://example.com/ link <span title="title with [brackets]">span</span>]
30129 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30130 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30133 <p><a rel="mw:ExtLink" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30134 <a rel="mw:ExtLink" href="http://example.com/">link <span title="title with [brackets]" data-parsoid='{"stx":"html","a":{"title":"title with [brackets]"},"sa":{"title":"title with &#91;brackets&#93;"}}'>span</span></a></p>
30138 T72875: Test for brackets in attributes of elements in internal link texts
30140 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30141 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30144 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30145 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30148 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30149 <a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]" data-parsoid='{"stx":"html","a":{"title":"title with [[double brackets]]"},"sa":{"title":"title with &#91;&#91;double brackets&#93;&#93;"}}'>span</span></a></p>
30153 T179544: {{anchorencode:}} output should be always usable in links
30155 wgFragmentMode=[ 'html5' ]
30157 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30159 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30162 <p><span id="[foo]" about="#mwt3" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"id":"[foo]"},"sa":{"id":"{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"id"},{"html":"<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt1\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[10,32,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt1\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt1\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'></span><a typeof="mw:ExpandedAttrs" about="#mwt4" rel="mw:WikiLink" href="./Main_Page#[foo]" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#[foo]"},"sa":{"href":"#{{anchorencode:[foo]}}"}}' data-mw='{"attribs":[[{"txt":"href"},{"html":"#<span typeof=\"mw:Transclusion mw:Entity\" about=\"#mwt2\" data-parsoid='{\"srcContent\":\"[\",\"dsr\":[44,66,null,null],\"pi\":[[]]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:[foo]\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>[</span><span about=\"#mwt2\" data-parsoid=\"{}\">foo</span><span typeof=\"mw:Entity\" about=\"#mwt2\" data-parsoid='{\"src\":\"&amp;#x5D;\",\"srcContent\":\"]\"}'>]</span>"}]]}'>#[foo]</a></p>
30165 ## ------------------------------
30166 ## Parsoid section-wrapping tests
30167 ## ------------------------------
30169 Section wrapping for well-nested sections (no leading content)
30172 "wrapSections": true
30193 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30196 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
30199 <section data-mw-section-id="3"><h2 id="2.1"> 2.1 </h2>
30202 </section><section data-mw-section-id="4"><h2 id="2.2"> 2.2 </h2>
30205 <section data-mw-section-id="5"><h3 id="2.2.1"> 2.2.1 </h3>
30208 </section></section></section><section data-mw-section-id="6"><h1 id="3"> 3 </h1>
30215 Section wrapping for well-nested sections (with leading content)
30218 "wrapSections": true
30223 Para 2 with a <div>nested in it</div>
30236 <section data-mw-section-id="0"><p>Para 1.</p>
30238 <p>Para 2 with a </p><div>nested in it</div>
30242 </section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30245 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
30248 <section data-mw-section-id="3"><h2 id="2.1"> 2.1 </h2>
30251 </section></section>
30255 Section wrapping with template-generated sections (good nesting 1)
30258 "wrapSections": true
30275 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30278 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,33,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.1 ==\nb"}},"i":0}}]}'> 1.1 </h2><span about="#mwt1">
30279 </span><p about="#mwt1">b</p>
30280 </section><section data-mw-section-id="3"><h2 id="1.2"> 1.2 </h2>
30283 </section></section><section data-mw-section-id="4"><h1 id="2"> 2 </h1>
30287 # In this example, the template scope is mildly expanded to incorporate the
30288 # trailing newline after the transclusion since that is part of section 1.1.1
30290 Section wrapping with template-generated sections (good nesting 2)
30293 "wrapSections": true,
30294 "modes": ["wt2html", "wt2wt"]
30309 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30312 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.1" data-parsoid='{"dsr":[9,50,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.1 ==\nb\n=== 1.1.1 ===\nd"}},"i":0}},"\n"]}'> 1.1 </h2><span about="#mwt1">
30313 </span><p about="#mwt1">b</p><span about="#mwt1">
30314 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1"> 1.1.1 </h3><span about="#mwt1">
30315 </span><p about="#mwt1">d</p><span about="#mwt1">
30316 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2"> 2 </h1>
30320 # In this example, the template scope is mildly expanded to incorporate the
30321 # trailing newline after the transclusion since that is part of section 1.2.1
30323 Section wrapping with template-generated sections (good nesting 3)
30326 "wrapSections": true,
30327 "modes": ["wt2html", "wt2wt"]
30345 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30348 <p about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[9,60,0,0],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"x\n== 1.1 ==\nb\n==1.2==\nc\n===1.2.1===\nd"}},"i":0}},"\n"]}'>x</p><span about="#mwt1">
30349 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1"> 1.1 </h2><span about="#mwt1">
30350 </span><p about="#mwt1">b</p><span about="#mwt1">
30351 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30352 </span><p about="#mwt1">c</p><span about="#mwt1">
30353 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30354 </span><p about="#mwt1">d</p><span about="#mwt1">
30355 </span></section></section></section><section data-mw-section-id="5"><h1 id="2"> 2 </h1>
30359 # Because of section-wrapping and template-wrapping interactions,
30360 # the scope of the template is expanded so that the template markup
30361 # is valid in the presence of <section> tags.
30362 # This exercises the s1 is null scenario in the wrapSections code
30364 Section wrapping with template-generated sections (bad nesting 1)
30367 "wrapSections": true
30381 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30384 <span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"\n= 1 =\nb\n"}},"i":0}},"\n\nc\n"]}'>
30385 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1"> 1 </h1><span about="#mwt1">
30386 </span><p about="#mwt1">b
30387 </p><span about="#mwt1">
30389 </span><p about="#mwt1">c</p><span about="#mwt1">
30390 </span></section></div></section>
30393 # Because of section-wrapping and template-wrapping interactions,
30394 # the scope of the template is expanded so that the template markup
30395 # is valid in the presence of <section> tags.
30396 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30398 Section wrapping with template-generated sections (bad nesting 2)
30401 "wrapSections": true
30419 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30422 </section><section data-mw-section-id="-1"><h1 about="#mwt1" typeof="mw:Transclusion" id="2" data-parsoid='{"dsr":[9,45,null,null],"pi":[[{"k":"1","named":true,"spc":["","","\n","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"= 2 =\nb\n== 2.1 ==\nc"}},"i":0}},"\n\nd\n\n"]}'> 2 </h1><span about="#mwt1">
30423 </span><p about="#mwt1">b</p><span about="#mwt1">
30424 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1"> 2.1 </h2><span about="#mwt1">
30425 </span><p about="#mwt1">c</p><span about="#mwt1">
30427 </span><p about="#mwt1">d</p><span about="#mwt1">
30429 </span></section></section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30433 # Because of section-wrapping and template-wrapping interactions,
30434 # additional template wrappers are added to <section> tags
30435 # so that template wrapping semantics are valid whether section
30436 # tags are retained or stripped. But, the template scope can expand
30437 # greatly when accounting for section tags.
30438 # This exercises the s1 and s2 are in different subtrees scenario
30440 Section wrapping with template-generated sections (bad nesting 3)
30443 "wrapSections": true,
30444 "modes": ["wt2html", "wt2wt"]
30462 <section data-mw-section-id="0"></section><section data-mw-section-id="1" about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":["= 1 =\na\n\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.2 ==\nb\n= 2 =\nc"}},"i":0}},"\n\nd\n\n"]}'><h1 id="1"> 1 </h1>
30465 <section data-mw-section-id="-1"><h2 about="#mwt1" typeof="mw:Transclusion" id="1.2" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"== 1.2 ==\nb\n= 2 =\nc"}},"i":0}}]}'> 1.2 </h2><span about="#mwt1">
30466 </span><p about="#mwt1">b</p><span about="#mwt1">
30467 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2"> 2 </h1><span about="#mwt1">
30468 </span><p about="#mwt1">c</p>
30471 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3"> 3 </h1>
30476 Section wrapping with uneditable lead section + div wrapping multiple sections
30479 "wrapSections": true
30484 <div style="border:1px solid red;">
30501 <section data-mw-section-id="-1"><p>foo</p>
30503 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30504 <section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30507 <section data-mw-section-id="2"><h2 id="1.1"> 1.1 </h2>
30510 </section></section><section data-mw-section-id="-1"><h1 id="2"> 2 </h1>
30514 </section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30517 <section data-mw-section-id="5"><h2 id="3.1"> 3.1 </h2>
30519 </section></section>
30523 Section wrapping with editable lead section + div overlapping multiple sections
30526 "wrapSections": true
30533 <div style="border:1px solid red;">
30550 <section data-mw-section-id="0"><p>foo</p>
30552 </section><section data-mw-section-id="-1"><h1 id="1"> 1 </h1>
30554 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30557 <section data-mw-section-id="2"><h2 id="1.1"> 1.1 </h2>
30560 </section><section data-mw-section-id="-1"><h1 id="2"> 2 </h1>
30565 </section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30568 <section data-mw-section-id="5"><h2 id="3.1"> 3.1 </h2>
30570 </section></section>
30574 HTML header tags should not be wrapped in section tags
30577 "wrapSections": true
30590 <section data-mw-section-id="0"><p>foo</p>
30592 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30594 </section><section data-mw-section-id="1"><h1 id="b"> b </h1>
30596 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30598 </section><section data-mw-section-id="2"><h1 id="d"> d </h1></section>
30602 Lead section containing only whitespace and comments.
30605 "wrapSections": true
30609 <!-- this is a comment, presumably significant to editors -->
30616 <section data-mw-section-id="0" data-parsoid="{}">
30617 <!-- this is a comment, presumably significant to editors -->
30618 </section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30621 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
30626 Pseudo-sections emitted by templates should have id -2
30629 "wrapSections": true
30639 <section data-mw-section-id="-1"><p>foo</p>
30640 </section><section data-mw-section-id="-2"><div 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":"<div>\n== a ==\n== b ==\n</div>\n"}},"i":0}}]}'>
30641 <section data-mw-section-id="-1"><h2 id="a"> a </h2>
30642 </section><section data-mw-section-id="-1"><h2 id="b"> b </h2>
30643 </section></div><span about="#mwt1">