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 ### Token Stream Patcher tests
12639 ### These tests won't always pass wt2wt and other modes because
12640 ### on serialization, the table will be output on a new line.
12641 ### For now, we are blacklisting them, and using this to test selser.
12645 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12647 parsoid=wt2html,wt2wt
12649 {{echo|}}{| width = '100%'
12653 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12654 <tbody><tr><td>foo</td></tr>
12658 ## We used to, but no longer wt2wt this test since the default serializer
12659 ## will normalize the include directives to serialize on their own line.
12660 ## Selser will take care of preserving formatting in scenarios where they
12661 ## intermingled with other wikitext.
12663 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12667 <includeonly>a</includeonly>{| {{{b}}}
12671 <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":""}]]}'>
12672 <tbody><tr><td>c</td></tr>
12677 Table wikitext syntax outside wiki-tables
12681 ! not a table heading
12684 | class="foo bar" | baz
12692 ! not a table heading
12695 | class="foo bar" | baz
12704 ### Testing parsing of templates where a template arg
12705 ### has the same name as the template itself.
12711 {{{quote|{{{1}}}}}}
12715 Templates: Template Name/Arg clash: 1. Use of positional param
12724 Templates: Template Name/Arg clash: 2. Use of named param
12726 {{quote|quote=foo}}
12733 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12742 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12746 Templates: 1. Simple use
12755 Templates: 2. Inside a block tag
12757 <div>{{echo|Foo}}</div>
12758 <blockquote>{{echo|Foo}}</blockquote>
12761 <blockquote>Foo</blockquote>
12771 Templates: P-wrapping: 1a. Templates on consecutive lines
12782 Templates: P-wrapping: 1b. Templates on consecutive lines
12796 Templates: P-wrapping: 1c. Templates on consecutive lines
12799 {{echo|bar}} <div>baz</div>
12812 Templates: P-wrapping: 1d. Template preceded by comment-only line
12821 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12825 Templates: Inline Text: 1. Multiple template uses
12827 {{echo|Foo}}bar{{echo|baz}}
12834 Templates: Inline Text: 2. Back-to-back template uses
12836 {{echo|Foo}}{{echo|bar}}
12843 Templates: Block Tags: 1. Multiple template uses
12845 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12847 <div>Foo</div><div>bar</div><div>baz</div>
12852 Templates: Block Tags: 2. Back-to-back template uses
12854 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12856 <div>Foo</div><div>bar</div>
12860 # This is an edge case relating to paragraph wrapping.
12862 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12867 <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
12872 Templates: Links: 1. Simple example
12874 {{echo|[[Foo|bar]]}}
12876 <p><a href="/wiki/Foo" title="Foo">bar</a>
12881 Templates: Links: 2. Generation of link href
12883 [[{{echo|Foo}}|bar]]
12885 <p><a href="/wiki/Foo" title="Foo">bar</a>
12890 Templates: Links: 3. Generation of part of a link href
12892 [[Fo{{echo|o}}|bar]]
12894 [[Foo{{echo|bar}}]]
12896 [[Foo{{echo|bar}}baz]]
12898 [[Foo{{echo|bar}}|bar]]
12900 [[:Foo{{echo|bar}}]]
12902 [[:Foo{{echo|bar}}|bar]]
12904 <p><a href="/wiki/Foo" title="Foo">bar</a>
12905 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12906 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12907 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12908 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12909 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12914 Templates: Links: 4. Multiple templates generating link href
12916 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12918 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12923 Templates: Links: 5. Generation of link text
12925 [[Foo|{{echo|bar}}]]
12927 <p><a href="/wiki/Foo" title="Foo">bar</a>
12932 Templates: Links: 5. Nested templates (only outermost template should be marked)
12934 {{echo|[[{{echo|Foo}}|bar]]}}
12936 <p><a href="/wiki/Foo" title="Foo">bar</a>
12941 Templates: HTML Tag: 1. Generation of HTML attr. key
12943 <div {{echo|style}}="color:red;">foo</div>
12945 <div style="color:red;">foo</div>
12950 Templates: HTML Tag: 2. Generation of HTML attr. value
12952 <div style={{echo|'color:red;'}}>foo</div>
12954 <div style="color:red;">foo</div>
12959 Templates: HTML Tag: 3. Generation of HTML attr key and value
12961 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12963 <div style="color:red;">foo</div>
12968 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12970 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12972 <div title="This is a long title with just one piece templated">foo</div>
12977 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12979 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12981 <div title="This is a long title with just one piece templated">foo</div>
12986 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12988 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12990 <div title="This is a long title with just one piece templated">foo</div>
12994 # SSS FIXME: While it is great we added support for all this,
12995 # do we want to make this part of the spec? Maybe we want to
12996 # deprecate this kind of usage in the future?
12998 Templates: HTML Tag: 7. Generation of partial attribute key string
13000 <div st{{echo|yle}}="color:red;">foo</div>
13002 <div style="color:red;">foo</div>
13007 Templates: HTML Tag: 8. Template-generated attribute (k=v)
13009 <div {{echo|1=id="v1"}}>bar</div>
13011 <div id="v1">bar</div>
13016 Templates: HTML Tag: 9. Multiple template-generated attributes
13018 <div {{echo|1=id="v1" title="foo"}}>bar</div>
13020 <div id="v1" title="foo">bar</div>
13025 Templates: Support for templates generating attributes and content
13027 {| {{mixed_attr_content_template}}
13032 <table style="color:red;" title="T48811">
13042 <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|}"]}'>
13051 1. Entities and nowikis inside templated attributes should be handled correctly
13053 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
13055 <div style="background:#f9f9f9;">foo</div>
13058 <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>
13062 2. Entities and nowikis inside templated attributes should be handled correctly
13065 |{{table_attribs_3}}
13070 <td style="background:#f9f9f9;">Foo
13075 <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>
13080 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13083 |{{table_attribs_3}}
13088 <td style="background:#f9f9f9;">Foo
13092 <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}}]}'>
13093 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
13099 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
13102 | {{table_attribs_6}} hi
13107 <td style="background: red;"> hi
13112 <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>
13117 Templates: HTML Tables: 1. Generating start of a HTML table
13119 {{echo|<table><tr><td>foo</td>}}</tr></table>
13121 <table><tr><td>foo</td></tr></table>
13126 Templates: HTML Tables: 2a. Generating middle of a HTML table
13128 <table><tr>{{echo|<td>foo</td>}}</tr></table>
13130 <table><tr><td>foo</td></tr></table>
13135 Templates: HTML Tables: 2b. Generating middle of a HTML table
13137 <table>{{echo|<tr><td>foo</td></tr>}}</table>
13139 <table><tr><td>foo</td></tr></table>
13144 Templates: HTML Tables: 3. Generating end of a HTML table
13146 <table><tr>{{echo|<td>foo</td></tr></table>}}
13148 <table><tr><td>foo</td></tr></table>
13153 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
13155 {{echo|<table>}}<tr><td>foo</td></tr></table>
13157 <table><tr><td>foo</td></tr></table>
13162 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13164 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13166 <table><tr><td>foo</td></tr></table>
13171 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13173 <table><tr>{{echo|<td>}}foo</td></tr></table>
13175 <table><tr><td>foo</td></tr></table>
13180 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13182 <table><tr><td>foo{{echo|</td>}}</tr></table>
13184 <table><tr><td>foo</td></tr></table>
13189 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13191 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13193 <table><tr><td>foo</td></tr></table>
13198 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13200 <table><tr><td>foo</td></tr>{{echo|</table>}}
13202 <table><tr><td>foo</td></tr></table>
13207 Templates: HTML Tables: 5. Proper fostering of categories from inside
13209 parsoid=wt2html,wt2wt
13211 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13212 <!--Two categories (T52330)-->
13213 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13215 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13216 <!--Two categories (T52330)-->
13217 <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>
13221 Templates: Wiki Tables: 1a. Fostering of entire template content
13229 <tr><td></td></tr></table>
13241 Templates: Wiki Tables: 1b. Fostering of entire template content
13254 <tr><td></td></tr></table>
13268 Templates: Wiki Tables: 2. Fostering of partial template content
13278 <tr><td></td></tr></table>
13291 Templates: Wiki Tables: 3. td-content via multiple templates
13294 {{echo|{{pipe}}a}}{{echo|b}}
13305 Templates: Wiki Tables: 4. Templated tags, no content
13311 <tr><td></td></tr></table>
13316 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13330 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13343 ## This test case is very specific to Parsoid's internals
13344 ## and is hence only tested for Parsoid's code. Parsoid uses
13345 ## a <meta> marker tag for <ref> tags and they are expanded
13346 ## much later. We are verifying that this <meta> tag usage
13347 ## doesn't prevent foster parenting.
13349 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13351 {{PartialTable}}<ref>foo</ref>
13356 <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">
13360 <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>
13364 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13374 <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{{!}}}"]}'>
13375 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13379 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13384 Templates: Lists: Multi-line list-items via templates
13386 *{{echo|a {{nonexistent|
13388 *{{echo|b {{nonexistent|
13391 <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>
13392 <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>
13397 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13399 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13401 <p><i>ab</i>c<i>d</i>e
13406 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13407 (PHP parser generates misnested html)
13409 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13411 <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>
13415 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13416 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13418 parsoid=wt2html,wt2wt
13420 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13422 <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>
13423 <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>
13424 <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>
13428 Templates: Ugly nesting: 4. Divs opened/closed across templates
13430 a<div>b{{echo|c</div>d}}e
13441 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
13447 |{{echo|foo</table>}}
13451 <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|}"]}'>
13455 <td>foo</td></tr></tbody></table><span about="#mwt1">
13456 </span><span about="#mwt1">|bar</span><span about="#mwt1">
13461 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
13471 <td>1. {{echo|foo </table>}}</td>
13473 <td>2. {{echo|baz </table>}}</td>
13486 <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>"]}'>
13491 <td>1. foo </td></tr></tbody></table></td>
13493 <td>2. baz </td></tr></tbody></table><span about="#mwt2">
13494 </span><span about="#mwt2">
13495 </span><span about="#mwt2">
13496 </span><span about="#mwt2">abc</span><span about="#mwt2">
13497 </span><span about="#mwt2">
13498 </span><span about="#mwt2">
13499 </span><span about="#mwt2">
13500 </span><span about="#mwt2">
13501 </span><span about="#mwt2">
13502 </span><span about="#mwt2">xyz</span><span about="#mwt2">
13503 </span><span about="#mwt2">
13508 Templates: Ugly templates: 3. newline-only template parameter
13517 # This looks like a bug: a single newline triggers p/br for some reason.
13519 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13528 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13529 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13531 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13537 <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
13538 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13542 # T66017 -- ugly wikitext with fostered content generates two template ranges
13543 # that are "identical" and generate nesting cycles in the algorithm
13545 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13547 {{echo|<table><tr><td><table>}}
13551 <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"}'>
13552 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13553 </table></td></tr></tbody></table>
13557 Templates: Parameters substituted at the top-level
13559 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13563 <p><i>who</i> me? <b>never!</b>
13567 <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>
13569 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13573 Templates: Param with empty arg in the final position
13577 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13581 Parser Functions: 1. Simple example
13590 Parser Functions: 2. Nested use (only outermost should be marked up)
13599 ### Pre-save transform tests
13602 pre-save transform: subst:
13608 This is a test template
13612 pre-save transform: normal template
13622 pre-save transform: nonexistent template
13626 {{thistemplatedoesnotexist}}
13628 {{thistemplatedoesnotexist}}
13632 pre-save transform: subst magic variables
13641 # This is T2089, which I fixed. -- wtm
13643 pre-save transform: subst: templates with parameters
13647 {{subst:paramtest|param="something else"}}
13649 This is a test template with parameter "something else"
13653 Template:nowikitest
13655 <nowiki>'''not wiki'''</nowiki>
13659 pre-save transform: nowiki in subst (T3188)
13663 {{subst:nowikitest}}
13665 <nowiki>'''not wiki'''</nowiki>
13669 Template:commenttest
13671 This template has <!-- a comment --> in it.
13675 pre-save transform: comment in subst (T3936)
13679 {{subst:commenttest}}
13681 This template has <!-- a comment --> in it.
13685 pre-save transform: unclosed tag
13689 <nowiki>'''not wiki'''
13691 <nowiki>'''not wiki'''
13695 pre-save transform: mixed tag case
13699 <NOwiki>'''not wiki'''</noWIKI>
13701 <NOwiki>'''not wiki'''</noWIKI>
13705 pre-save transform: unclosed comment in <nowiki>
13709 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13711 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13714 # Leading @ in this template definition works around a limitation
13715 # in parsoid's parserTests which otherwise strips the <span> from the
13716 # result (confusing it for a template wrapper)
13720 @<span onmouseover="alert('crap')">Oh no</span>
13724 (confirming safety of fix for subst T3936)
13726 {{Template:dangerous}}
13728 <p>@<span>Oh no</span>
13733 pre-save transform: comment containing gallery (T7024)
13737 <!-- <gallery>data</gallery> -->
13739 <!-- <gallery>data</gallery> -->
13743 pre-save transform: comment containing extension
13747 <!-- <tag>data</tag> -->
13749 <!-- <tag>data</tag> -->
13753 pre-save transform: comment containing nowiki
13757 <!-- <nowiki>data</nowiki> -->
13759 <!-- <nowiki>data</nowiki> -->
13763 pre-save transform: <noinclude> in subst (T5298)
13773 pre-save transform: <onlyinclude> in subst (T5298)
13777 {{subst:Includes2}}
13785 {{<includeonly>subst:</includeonly>Includes}}
13789 Template:SafeSubstTest
13791 {{<includeonly>safesubst:</includeonly>Includes}}
13795 T24297: safesubst: works during PST
13799 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13805 T24297: safesubst: works during normal parse
13814 subst: does not work during normal parse
13818 <p>{{subst:Includes}}
13823 pre-save transform: context links ("pipe trick")
13827 [[Article (context)|]]
13830 [[Bar:Article (context)|]]
13831 [[:Bar:Article (context)|]]
13833 [[|Article (context)]]
13837 [[Article (context)|Article]]
13838 [[Bar:Article|Article]]
13839 [[:Bar:Article|Article]]
13840 [[Bar:Article (context)|Article]]
13841 [[:Bar:Article (context)|Article]]
13843 [[Article (context)]]
13844 [[Bar:X (Y) Z|X (Y) Z]]
13845 [[:Bar:X (Y) Z|X (Y) Z]]
13849 pre-save transform: context links ("pipe trick") with interwiki prefix
13853 [[interwiki:Article|]]
13854 [[:interwiki:Article|]]
13855 [[interwiki:Bar:Article|]]
13856 [[:interwiki:Bar:Article|]]
13858 [[interwiki:Article|Article]]
13859 [[:interwiki:Article|Article]]
13860 [[interwiki:Bar:Article|Bar:Article]]
13861 [[:interwiki:Bar:Article|Bar:Article]]
13865 pre-save transform: context links ("pipe trick") with parens in title
13867 pst title=[[Somearticle (context)]]
13871 [[Article (context)|Article]]
13875 pre-save transform: context links ("pipe trick") with comma in title
13877 pst title=[[Someplace, Somewhere]]
13880 [[Otherplace, Elsewhere|]]
13881 [[Otherplace, Elsewhere, Anywhere|]]
13883 [[Otherplace, Somewhere|Otherplace]]
13884 [[Otherplace, Elsewhere|Otherplace]]
13885 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13889 pre-save transform: context links ("pipe trick") with parens and comma
13891 pst title=[[Someplace (IGNORED), Somewhere]]
13894 [[Otherplace (place), Elsewhere|]]
13896 [[Otherplace, Somewhere|Otherplace]]
13897 [[Otherplace (place), Elsewhere|Otherplace]]
13901 pre-save transform: context links ("pipe trick") with comma and parens
13903 pst title=[[Who, me? (context)]]
13906 [[Me, Myself, and I (1937 song)|]]
13908 [[Yes, you. (context)|Yes, you.]]
13909 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13913 pre-save transform: context links ("pipe trick") with namespace
13915 pst title=[[Ns:Somearticle]]
13919 [[Ns:Article|Article]]
13923 pre-save transform: context links ("pipe trick") with namespace and parens
13925 pst title=[[Ns:Somearticle (context)]]
13929 [[Ns:Article (context)|Article]]
13933 pre-save transform: context links ("pipe trick") with namespace and comma
13935 pst title=[[Ns:Somearticle, Context, Whatever]]
13939 [[Ns:Article, Context, Whatever|Article]]
13943 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13945 pst title=[[Ns:Somearticle, Context (context)]]
13949 [[Ns:Article (context)|Article]]
13953 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13955 pst title=[[Ns:Somearticle (IGNORED), Context]]
13959 [[Ns:Article, Context|Article]]
13963 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13967 [[Article(context)|]]
13968 [[Bar:Article(context)|]]
13969 [[:Bar:Article(context)|]]
13970 [[|Article(context)]]
13974 [[Article(context)|Article]]
13975 [[Bar:Article(context)|Article]]
13976 [[:Bar:Article(context)|Article]]
13977 [[Article(context)]]
13978 [[Bar:X(Y)Z|X(Y)Z]]
13979 [[:Bar:X(Y)Z|X(Y)Z]]
13983 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13987 [[Article (context)|]]
13988 [[Bar:Article (context)|]]
13989 [[:Bar:Article (context)|]]
13990 [[|Article (context)]]
13994 [[Article (context)|Article]]
13995 [[Bar:Article (context)|Article]]
13996 [[:Bar:Article (context)|Article]]
13997 [[Article (context)]]
13998 [[Bar:X (Y) Z|X (Y) Z]]
13999 [[:Bar:X (Y) Z|X (Y) Z]]
14003 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
14007 [[Article(context)|]]
14008 [[Bar:Article(context)|]]
14009 [[:Bar:Article(context)|]]
14010 [[|Article(context)]]
14014 [[Article(context)|Article]]
14015 [[Bar:Article(context)|Article]]
14016 [[:Bar:Article(context)|Article]]
14017 [[Article(context)]]
14018 [[Bar:X(Y)Z|X(Y)Z]]
14019 [[:Bar:X(Y)Z|X(Y)Z]]
14023 pre-save transform: context links ("pipe trick") with commas (T23660)
14027 [[Article (context), context|]]
14028 [[Article (context),context|]]
14029 [[Bar:Article (context), context|]]
14030 [[Bar:Article (context),context|]]
14031 [[:Bar:Article (context), context|]]
14032 [[:Bar:Article (context),context|]]
14034 [[Article (context), context|Article]]
14035 [[Article (context),context|Article]]
14036 [[Bar:Article (context), context|Article]]
14037 [[Bar:Article (context),context|Article]]
14038 [[:Bar:Article (context), context|Article]]
14039 [[:Bar:Article (context),context|Article]]
14043 Parsoid: backwards pipe trick
14050 <p>[[|<b>bar</b>]]</p>
14054 pre-save transform: trim trailing empty lines
14058 Empty lines are trimmed
14064 Empty lines are trimmed
14068 pre-save transform: Signature expansion
14075 * <noinclude>~~~</noinclude>
14076 * <includeonly>~~~</includeonly>
14077 * <onlyinclude>~~~</onlyinclude>
14079 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
14080 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14081 * 00:02, 1 January 1970 (UTC)
14082 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
14083 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
14084 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
14089 ParserOutput flags from signature expansion (T84843)
14096 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
14097 flags=user-signature
14102 pre-save transform: Signature expansion in nowiki tags (T2093)
14108 <nowiki>~~~~</nowiki>
14110 <includeonly><nowiki>~~~~</nowiki></includeonly>
14112 <noinclude><nowiki>~~~~</nowiki></noinclude>
14114 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14116 {{subst:Foo}} shall be converted to FOO
14118 As well as inside noinclude/onlyinclude
14119 <noinclude>{{subst:Foo}}</noinclude>
14120 <onlyinclude>{{subst:Foo}}</onlyinclude>
14122 But not inside includeonly
14123 <includeonly>{{subst:Foo}}</includeonly>
14127 <nowiki>~~~~</nowiki>
14129 <includeonly><nowiki>~~~~</nowiki></includeonly>
14131 <noinclude><nowiki>~~~~</nowiki></noinclude>
14133 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
14135 FOO shall be converted to FOO
14137 As well as inside noinclude/onlyinclude
14138 <noinclude>FOO</noinclude>
14139 <onlyinclude>FOO</onlyinclude>
14141 But not inside includeonly
14142 <includeonly>{{subst:Foo}}</includeonly>
14146 Parsoid: Recognize nowiki with trailing space in tags
14150 <nowiki ><div>[[foo]]</nowiki >
14158 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14165 Parsoid: Recognize nowiki with odd capitalization
14169 <noWikI ><div>[[foo]]</Nowiki >
14171 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
14176 Parsoid: Escape nowiki with trailing space in tags
14180 <p><nowiki > foo </nowiki ></p>
14181 <p>a<nowiki />b</p>
14182 <p>c<nowiki/ >d</p>
14184 <nowiki > foo </nowiki >
14192 Parsoid: Escape weird noWikI capitalizations
14196 <p><noWikI > foo </NoWikI ></p>
14198 <noWikI > foo </NoWikI >
14202 ### Message transform tests
14205 message transform: magic variables
14215 message transform: should not transform wiki markup
14225 message transform: <noinclude> in transcluded template (T6926)
14235 message transform: <onlyinclude> in transcluded template (T6926)
14245 {{#special:}} page name, known
14249 {{#special:Recentchanges}}
14251 Special:RecentChanges
14255 {{#special:}} page name with subpage, known
14259 {{#special:Recentchanges/param}}
14261 Special:RecentChanges/param
14265 {{#special:}} page name, unknown
14269 {{#special:foobar nonexistent}}
14271 Special:Foobar nonexistent
14275 {{#speciale:}} page name, known
14279 {{#speciale:Recentchanges}}
14281 Special:RecentChanges
14285 {{#speciale:}} page name with subpage, known
14289 {{#speciale:Recentchanges/param}}
14291 Special:RecentChanges/param
14295 {{#speciale:}} page name, unknown
14299 {{#speciale:foobar nonexistent}}
14301 Special:Foobar_nonexistent
14307 ### For Parsoid-specific tests, see
14308 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14313 parsoid=wt2html,wt2wt,html2html
14315 [[Image:foobar.jpg]]
14317 <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>
14320 <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>
14324 Serialize simple image with span wrapper
14328 <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>
14330 [[File:Foobar.jpg]]
14334 Simple image (using File: namespace, now canonical)
14336 [[File:Foobar.jpg]]
14338 <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>
14341 <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>
14345 Right-aligned image
14347 [[File:Foobar.jpg|right]]
14349 <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>
14352 <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>
14358 [[File:Foobar.jpg|right|Caption text]]
14360 <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>
14363 <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>
14367 Image with caption, T55312 #1
14369 [[File:Foobar.jpg|right|Caption page stuff]]
14371 <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>
14374 <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>
14378 Image with caption, T55312 #2
14380 [[File:Foobar.jpg|right|Caption page=]]
14382 <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>
14385 <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>
14389 Image with caption, T55312 #3
14391 [[File:Foobar.jpg|right|Caption page=stuff]]
14393 <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>
14396 <figure class="mw-default-size mw-halign-right" typeof="mw:Image"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a><figcaption>Caption page=stuff</figcaption></figure>
14400 Image caption with pipe entity
14402 [[File:Foobar.jpg|thumb|one | two]]
14403 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14405 <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>
14406 <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>
14409 <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>
14410 <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>
14414 Allow empty links in image captions (T62753)
14418 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14423 <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>
14426 <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>
14428 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14429 </figcaption></figure>
14433 Titles in unlinked images (T23454)
14435 [[File:Foobar.jpg|link=|stuff]]
14437 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14442 Link with empty target
14451 Image with link trail
14453 Linktrails should not work for images: [[File:Foobar.jpg]]s
14455 <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
14458 <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>
14462 Image with empty attribute
14464 parsoid=wt2html,wt2wt,html2html
14466 [[File:Foobar.jpg|right||Caption text]]
14468 <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>
14471 <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>
14475 1. Block image with individual attributes from templates
14477 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14479 <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>
14482 <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>
14486 2. Block Image with individual attributes from templates
14488 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14490 <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>
14493 <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>
14497 3. Inline image with individual attributes from templates
14499 [[File:Foobar.jpg|{{echo|50px}}]]
14501 <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>
14504 <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>
14507 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14508 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14510 Image with multiple attributes from the same template
14512 [[File:Foobar.jpg|{{image_attribs}}]]
14514 <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>
14517 <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>
14521 Image with link tails
14525 123[[File:Foobar.jpg]]456
14526 123[[File:Foobar.jpg|right]]456
14527 123[[File:Foobar.jpg|thumb]]456
14529 <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
14531 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
14532 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
14535 <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>
14537 <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>
14539 <div class="thumb tright">
14540 <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>
14541 <div class="thumbcaption">
14542 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
14548 <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>
14549 <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>
14550 <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>
14554 Image with multiple captions -- only last one is accepted
14556 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14558 <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>
14561 <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>
14565 Image with multiple widths -- use last
14567 [[File:Foobar.jpg|200px|300px|caption]]
14569 <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>
14572 <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>
14576 Image with multiple alignments -- use first (T50664)
14580 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14582 [[File:Foobar.jpg|middle|text-top|caption]]
14584 <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>
14585 <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>
14588 <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>
14589 <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>
14593 Image with width attribute at different positions
14595 [[File:Foobar.jpg|200px|right|Caption]]
14596 [[File:Foobar.jpg|right|200px|Caption]]
14597 [[File:Foobar.jpg|right|Caption|200px]]
14599 <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>
14600 <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>
14601 <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>
14604 <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>
14605 <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>
14606 <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>
14609 # a sad bit of backward-compatibility
14611 Image with size specified with pxpx (T15500, T53628)
14613 parsoid=wt2html,wt2wt,html2html
14615 [[File:Foobar.jpg|20pxpx]]
14616 [[File:Foobar.jpg|200x20pxpx]]
14618 <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>
14619 <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>
14622 <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>
14626 Image with link parameter, wiki target
14628 [[File:Foobar.jpg|link=Main Page]]
14630 <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>
14633 <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>
14636 # parsoid T51293 (part 1)
14638 Image with link parameter, URL target
14640 [[File:Foobar.jpg|link=http://example.com/]]
14642 <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>
14645 <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>
14648 # parsoid T51293 (part 2)
14650 Image with link parameter, protocol-less URL target
14652 [[File:Foobar.jpg|link=//example.com/]]
14654 <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>
14657 <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>
14661 Escaping non-block captions (T107435)
14664 "modes": ["wt2wt"],
14666 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14670 [[Image:Foobar.jpg|caption]]
14672 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14675 # wgExternalLinkTarget not supported by Parsoid
14677 Image with link parameter, wgExternalLinkTarget
14679 [[Image:foobar.jpg|link=http://example.com/]]
14681 wgExternalLinkTarget='foobar'
14683 <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>
14688 Image with link parameter, wgNoFollowLinks set to false
14690 [[Image:foobar.jpg|link=http://example.com/]]
14692 wgNoFollowLinks=false
14694 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14699 Image with link parameter, wgNoFollowDomainExceptions
14701 [[Image:foobar.jpg|link=http://example.com/]]
14703 wgNoFollowDomainExceptions='example.com'
14705 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14709 # wgExternalLinkTarget not supported by Parsoid
14711 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14713 [[Image:foobar.jpg|link=http://example.com/|Title]]
14715 wgExternalLinkTarget='foobar'
14717 <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>
14722 Image with empty link parameter
14724 [[File:Foobar.jpg|link=]]
14726 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14729 <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>
14733 Image with link parameter (wiki target) and unnamed parameter
14735 [[File:Foobar.jpg|link=Main_Page|Title]]
14737 <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>
14740 <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>
14744 Image with link parameter (URL target) and unnamed parameter
14746 [[File:Foobar.jpg|link=http://example.com/|Title]]
14748 <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>
14751 <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>
14755 Thumbnail image with link parameter
14758 parsoid=wt2html,wt2wt,html2html
14760 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14762 <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>
14765 <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>
14769 Manually-specified thumbnail image
14773 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14775 <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>
14778 <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>
14782 Manually-specified thumbnail image with explicit link to wiki page
14785 parsoid=wt2html,wt2wt,html2html
14787 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14789 <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>
14792 <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>
14796 Manually-specified thumbnail image with explicit link to url
14799 parsoid=wt2html,wt2wt,html2html
14801 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14803 <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>
14806 <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>
14810 Manually-specified thumbnail image with explicit no link
14813 parsoid=wt2html,wt2wt,html2html
14815 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14817 <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>
14820 <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>
14824 Manually-specified thumbnail image with explicit link and alt text
14827 parsoid=wt2html,wt2wt,html2html
14829 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14831 <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>
14834 <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>
14838 Image with frame and link
14840 parsoid=wt2html,wt2wt,html2html
14842 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14844 <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>
14847 <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>
14851 Image with frame and link and explicit alt
14853 parsoid=wt2html,wt2wt,html2html
14855 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14857 <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>
14860 <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>
14864 Image with wiki markup in implicit alt
14866 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14868 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14870 <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>
14871 </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>
14874 <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>
14876 <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>
14880 Alt image option should handle most kinds of wikitext without barfing
14882 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14884 <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>
14887 <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>
14891 Image with table with attributes in caption
14893 parsoid=wt2html,html2html
14895 [[File:Foobar.jpg|thumb|
14902 <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>
14903 <table class="123">
14904 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14907 </figcaption></figure>
14911 Image with table with rows from templates in caption
14913 [[File:Foobar.jpg|thumb|
14919 <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>
14921 <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>
14923 </figcaption></figure>
14927 Image with nested tables in caption
14929 [[File:Foobar.jpg|thumb|Foo<br />
14938 <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}'/>
14942 <tbody><tr><td>z</td></tr>
14943 </tbody></table></td></tr>
14945 </figcaption></figure>
14948 ###################
14949 # Conflicting image format options.
14950 # First option specified should 'win'.
14951 # All three cases in each test should be identical.
14954 Image with 'frameless' first.
14956 parsoid=wt2html,wt2wt,html2html
14958 [[File:Foobar.jpg|frameless|caption]]
14960 [[File:Foobar.jpg|frameless|frame|caption]]
14962 [[File:Foobar.jpg|frameless|thumb|caption]]
14964 <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>
14965 </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>
14966 </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>
14969 <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>
14970 <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>
14971 <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>
14975 Image with 'frame' first.
14977 parsoid=wt2html,wt2wt,html2html
14979 [[File:Foobar.jpg|frame|caption]]
14980 [[File:Foobar.jpg|frame|frameless|caption]]
14981 [[File:Foobar.jpg|frame|thumb|caption]]
14983 <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>
14984 <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>
14985 <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>
14988 <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>
14989 <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>
14990 <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>
14994 Image with 'thumb' first.
14996 parsoid=wt2html,wt2wt,html2html
14998 [[File:Foobar.jpg|thumb|caption]]
14999 [[File:Foobar.jpg|thumb|frameless|caption]]
15000 [[File:Foobar.jpg|thumb|frame|caption]]
15002 <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>
15003 <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>
15004 <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>
15007 <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>
15008 <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>
15009 <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>
15012 ###################
15014 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
15015 # and https://phabricator.wikimedia.org/T64258
15016 # Foobar has actual size of 1941x220
15017 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
15018 # a scalable format.
15019 # 2. Framed images always ignore size options; always render at default size.
15020 # 3. "Unspecified format" and border are the only types which can be
15024 Image: unspecified format and border enlarge
15026 parsoid=wt2html,wt2wt,html2html
15028 [[File:Foobar.jpg|2000px]]
15030 [[File:Foobar.jpg|border|2000px]]
15032 <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>
15033 </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>
15036 <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>
15037 <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>
15041 Image: "unspecified format" and border reduce
15043 parsoid=wt2html,wt2wt,html2html
15045 [[File:Foobar.jpg|1000px]]
15047 [[File:Foobar.jpg|border|1000px]]
15049 <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>
15050 </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>
15053 <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>
15054 <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>
15058 Image: thumbs reduce
15060 parsoid=wt2html,wt2wt,html2html
15062 [[File:Foobar.jpg|thumb|50px]]
15064 <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>
15067 <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>
15071 Image: bitmap thumbs can't be enlarged past original size, but vector can.
15073 parsoid=wt2html,wt2wt,html2html
15075 [[File:Foobar.jpg|thumb|2000px]]
15077 [[File:Foobar.svg|thumb|2000px]]
15079 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div></div></div></div>
15080 <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>
15083 <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>
15084 <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>
15088 Image: frameless can reduce in size
15090 parsoid=wt2html,wt2wt,html2html
15092 [[File:Foobar.jpg|frameless|50px]]
15094 <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>
15097 <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>
15101 Image: bitmap frameless can't be enlarged past original size, but vector can
15103 parsoid=wt2html,wt2wt,html2html
15105 [[File:Foobar.jpg|frameless|2000px]]
15107 [[File:Foobar.svg|frameless|2000px]]
15109 <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>
15110 </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>
15113 <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>
15114 <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>
15118 Image: framed images are always unscaled.
15120 parsoid=wt2html,wt2wt,html2html
15122 [[File:Foobar.jpg|frame]]
15124 [[File:Foobar.jpg|frame|50px]]
15126 [[File:Foobar.jpg|frame|50x50px]]
15128 [[File:Foobar.jpg|frame|2000px]]
15130 <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>
15131 <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>
15132 <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>
15133 <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>
15136 <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>
15137 <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>
15138 <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>
15139 <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>
15142 ###################
15145 Link to image page- image page normally doesn't exists, hence edit link
15146 Add test with existing image page
15147 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
15151 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
15156 T20784 Link to non-existent image page with caption should use caption as link text
15158 [[:Image:test|caption]]
15160 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
15165 Frameless image caption with a free URL
15167 [[File:Foobar.jpg|http://example.com]]
15169 <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>
15172 <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>
15176 Thumbnail image caption with a free URL
15180 [[File:Foobar.jpg|thumb|http://example.com]]
15182 <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>
15185 <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>
15189 Thumbnail image caption with a free URL and explicit alt
15192 parsoid=wt2html,wt2wt,html2html
15194 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
15196 <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>
15199 <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>
15203 SVG thumbnails with no language set
15206 [[File:Foobar.svg|thumb|caption]]
15208 <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>
15211 <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>
15215 SVG thumbnails with language de
15217 parsoid=wt2html,wt2wt,html2html
15219 [[File:Foobar.svg|thumb|caption|lang=de]]
15221 <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>
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" lang="de" 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 invalid language code
15230 parsoid=wt2html,wt2wt,html2html
15232 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15234 <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>
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" data-file-width="240" data-file-height="180" data-file-type="drawing" height="165" width="220"/></a><figcaption>lang=invalid:language:code</figcaption></figure>
15241 T3887: A ISBN with a thumbnail
15243 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15245 <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>
15248 <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>
15252 T3887: A RFC with a thumbnail
15254 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15256 <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>
15259 <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>
15263 T3887: A mailto link with a thumbnail
15265 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15267 <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>
15270 <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>
15273 # Pending resolution to T2368
15275 T2648: Frameless image caption with a link
15277 [[File:Foobar.jpg|text with a [[link]] in it]]
15279 <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>
15282 <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>
15286 T2648: Frameless image caption with a link (suffix)
15288 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15290 <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>
15293 <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>
15297 T2648: Frameless image caption with an interwiki link
15299 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15301 <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>
15304 <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>
15308 T2648: Frameless image caption with a piped interwiki link
15310 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15312 <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>
15315 <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>
15319 T107474: Frameless image caption with <nowiki>
15321 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15323 <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>
15327 Escape HTML special chars in image alt text
15329 [[File:Foobar.jpg|& < > "]]
15331 <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>
15334 <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>
15338 Escape HTML special chars in image alt text with LanguageConverter
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 Entities in file name and attributes
15353 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15355 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15358 <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>
15362 T2499: Alt text should have Ӓ, not &1234;
15364 [[File:Foobar.jpg|♀]]
15366 <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>
15369 <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>
15373 Broken image caption with link
15375 parsoid=wt2html,wt2wt,html2html
15377 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15379 <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.
15382 <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>
15386 Image caption containing another image
15388 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15390 <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>
15393 <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>
15397 Image: caption containing a newline
15399 [[File:Foobar.jpg|This
15402 <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>
15405 <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>
15409 Image: caption containing leading space
15410 (The leading space should not trigger nowiki escaping in wt2wt mode)
15412 [[File:Foobar.jpg|thumb| bar]]
15414 <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>
15417 <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>
15421 Image: caption containing a table
15423 parsoid=wt2html,wt2wt,html2html
15425 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15431 and some more text.]]
15433 <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>
15436 <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
15439 <tr><th>Foo </th><th>Bar</th></tr>
15442 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15446 T5090: External links other than http: in image captions
15448 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15450 <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>
15453 <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>
15459 parsoid=wt2html,wt2wt,html2html
15461 [[Image:foobar.jpg|a|class=b]]
15463 <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>
15466 <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>
15470 Localized image handling (1).
15472 parsoid=wt2html,wt2wt,html2html
15475 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15477 <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>
15480 <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>
15484 Localized image handling (2).
15487 parsoid=wt2html,wt2wt,html2html
15490 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15492 <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>
15495 <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>
15499 Localized image handling (3).
15504 <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>
15506 [[File:Foobar.jpg|بندانگشتی]]
15510 "border", "frameless" and "class" attributes on an image.
15513 parsoid=wt2html,wt2wt,html2html
15515 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15517 <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>
15520 <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>
15523 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15525 Invalid image attributes (T64500)
15528 parsoid=wt2html,wt2wt,html2html
15530 [[File:Foobar.jpg|thumb|float|left|caption]]
15532 [[File:Foobar.jpg|thumb|righ|caption]]
15534 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15536 <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>
15537 <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>
15538 <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>
15541 <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>
15542 <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>
15543 <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>
15549 #REDIRECT [[File:Barfoo.jpg]]
15552 # FIXME: Parsoid should run this test -- but we'd need to teach the
15553 # mockAPI about the redirected Barfoo.jpg image.
15557 [[Image:Barfoo.jpg]]
15559 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15564 Missing image with uploads disabled
15568 [[File:Foobaz.jpg]]
15570 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15573 <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>
15576 # Parsoid-specific testing for images
15577 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15578 # Currently imperfect due to a flaw in the Parsoid testrunner
15580 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15584 Parsoid-specific image handling - simple image with size and middle alignment
15586 [[File:Foobar.jpg|middle|50px]]
15588 <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>
15592 Parsoid-specific image handling - simple image with size, middle alignment,
15593 non-standard namespace alias
15595 parsoid=wt2wt,wt2html,html2html
15597 [[Image:Foobar.jpg|middle|50px]]
15599 <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>
15603 Parsoid-specific image handling - simple image with size and middle alignment
15606 [[File:Foobar.jpg|50px|middle]]
15608 <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>
15612 Parsoid-specific image handling - simple image with size and middle alignment
15613 and non-standard namespace name
15615 parsoid=wt2html,wt2wt,html2html
15617 [[Image:Foobar.jpg|50px|middle]]
15619 <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>
15623 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15625 [[File:Foobar.jpg|500x10px|baseline|caption]]
15627 <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>
15631 Parsoid-specific image handling - simple image with border and size spec
15633 [[File:Foobar.jpg|50px|border|caption]]
15635 <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>
15639 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15641 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15643 <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>
15647 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15650 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15652 <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>
15656 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15658 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15660 <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>
15664 Parsoid-specific image handling - thumbnail with specific size, halign,
15665 valign, and caption (existing content)
15667 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15669 <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>
15673 Parsoid-specific image handling - framed image with specific size and caption
15676 parsoid=wt2html,wt2wt,html2html
15678 [[File:Foobar.jpg|frame|500x50px|caption]]
15680 <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>
15684 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15687 parsoid=wt2html,wt2wt,html2html
15689 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15691 <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>
15695 Parsoid-specific image handling - frameless image with specific size, border, and caption
15697 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15699 <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>
15703 Parsoid-specific image handling - simple image with a formatted caption
15705 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15707 <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>
15711 Parsoid-specific image handling - caption with a template in it
15713 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15715 <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>
15719 Parsoid-specific image handling - caption with unbalanced tags in it
15721 parsoid=wt2html,wt2wt,html2html
15724 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag 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 <center>unbalanced tag in it.</center></figcaption></figure>
15733 Parsoid-specific image handling - empty caption (1)
15735 parsoid=wt2html,wt2wt
15737 [[File:Foobar.jpg|thumb|]]
15739 <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>
15742 # empty captions don't get serialized unless we're in the "round trip" case
15744 Parsoid-specific image handling - empty caption (2)
15748 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15749 <a href="./File:Foobar.jpg">
15750 <img resource="./File:Foobar.jpg"
15751 src="//example.com/images/3/3a/Foobar.jpg"
15752 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15753 height="25" width="220"/>
15755 <figcaption></figcaption>
15758 [[File:Foobar.jpg|thumb]]
15762 Parsoid-specific image handling - whitespace caption
15764 [[File:Foobar.jpg|thumb| ]]
15766 <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>
15770 Parsoid-specific image handling - lang option
15773 [[File:Foobar.svg|lang=de|caption]]
15777 <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>
15781 ## Edge case bugs in Parsoid from T93580
15783 T93580: 1. Templated <ref> inside block images
15785 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15789 <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>
15791 <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>
15795 T93580: 2. <ref> inside inline images
15797 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15801 <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>
15803 <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>
15807 T93580: 3. Templated <ref> inside inline images
15809 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15813 <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>
15815 <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>
15822 Subpage test/subpage
15830 subpage title=[[Subpage test]]
15834 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15839 Subpage noslash link
15841 subpage title=[[Subpage test]]
15845 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15850 Subpage test/1/2/subpage
15856 Relative subpage noslash link
15858 parsoid=wt2wt,wt2html,html2html
15859 subpage title=[[Subpage test/1/2/3/4]]
15865 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15866 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15869 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15870 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15874 Parsoid: dot-slash prefixed wikilinks
15884 </p><p>[[././baz/]]
15889 </p><p>[[././baz/]]
15894 Render invalid page names as plain text (T53090)
15906 [[foo[http://example.com]xyz]]
15908 [[{{echo|./../foo}}|bar]]
15909 [[{{echo|foo/.}}|bar]]
15910 [[{{echo|foo/..}}|bar]]
15911 [[{{echo|foo~~~~bar}}]]
15912 [[{{echo|foo>bar}}]]
15913 [[{{echo|foo././bar}}]]
15914 [[{{echo|foo{bar}}]]
15915 [[{{echo|foo}bar}}]]
15916 [[{{echo|foo[bar}}]]
15917 [[{{echo|foo]bar}}]]
15918 [[{{echo|foo<bar}}]]
15920 <p>[[./../foo|bar]]
15930 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15931 </p><p>[[./../foo|bar]]
15944 <p>[[./../foo|bar]]
15954 [[foo<a rel="mw:ExtLink" href="http://example.com"></a>xyz]]</p>
15956 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15957 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15958 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15959 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15960 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15961 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15962 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15963 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15964 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15965 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15966 [[<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>
15974 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15979 T2561: {{/Subpage}}
15981 subpage title=[[Page]]
15985 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15993 Category:MediaWiki User's Guide
16001 [[:Category:MediaWiki User's Guide]]
16003 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
16012 [[Category:MediaWiki User's Guide]]
16014 cat=MediaWiki_User's_Guide sort=
16016 <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"}}'/>
16020 PAGESINCATEGORY invalid title fatal (r33546 fix)
16022 {{PAGESINCATEGORY:<bogus>}}
16029 Category with different sort key
16033 [[Category:MediaWiki User's Guide|Foo]]
16035 cat=MediaWiki_User's_Guide sort=Foo
16037 <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"}}'/>
16041 Category with identical sort key
16045 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16047 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
16049 <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"}}'/>
16053 Category with empty sort key
16058 [[Category:MediaWiki User's Guide|]]
16060 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
16064 Category with empty sort key and parentheses
16069 [[Category:Foo (bar)|]]
16071 [[Category:Foo (bar)|Foo]]
16075 Category with link tail
16080 123[[Category:Foo]]456
16082 123[[Category:Foo]]456
16086 Category with template
16091 [[Category:{{echo|Foo}}]]
16093 [[Category:{{echo|Foo}}]]
16097 Category with template in sort key
16102 [[Category:Foo|{{echo|Bar}}]]
16104 [[Category:Foo|{{echo|Bar}}]]
16108 Category with template in sort key and title
16113 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16115 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
16118 ## We used to, but no longer wt2wt this test since the default serializer
16119 ## will normalize all categories to serialize on their own line.
16120 ## This wikitext usage is going to be fairly uncommon in production and
16121 ## selser will take care of preserving formatting in those scenarios.
16123 Category / paragraph interactions
16127 Foo [[Category:Baz]] Bar
16129 Foo [[Category:Baz]]
16137 [[Category:Baz]] Bar
16150 {{echo|[[Category:Baz]]}}
16163 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16164 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16165 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16166 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
16167 <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>
16168 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
16171 ## We used to, but no longer wt2wt this test since the default serializer
16172 ## will normalize all categories to serialize on their own line.
16173 ## This wikitext usage is going to be fairly uncommon in production and
16174 ## selser will take care of preserving formatting in those scenarios.
16176 ## The whitespace on the empty line is part of the test. Please do not delete
16178 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16184 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
16186 {{echo|[[Category:Foo]] and so should this!}}
16188 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
16193 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
16195 <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>
16198 ## Parsoid will not try to wt2wt this while preserving newlines because
16199 ## it suppresses excess newlines within list items -- and we don't want to
16200 ## introduce a special case just for categories, which is, in reality somewhat
16201 ## odd behavior -- categories are unlikely to be used in list items like this
16202 ## in top-level pages and are only likely to show up in template-generated
16203 ## list items where this RT-ing is a non-issue.
16205 ## The whitespace on the empty line is part of the test. Please do not delete
16207 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
16213 [[Category:Foo]] and this should be part of the same list item
16216 {{echo|[[Category:Foo]] and this should be part of the same list item}}
16218 <ul><li>This and this should be part of the same list item</li>
16219 <li>So should this and this should be part of the same list item</li></ul>
16222 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16223 <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>
16227 ## Newlines and categories that follow the last item of a list
16228 ## are treated differently because this (list followed by categories)
16229 ## is an extremely common pattern on wikis.
16231 3. Categories and newlines: newline suppression for last list item should RT properly
16244 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16246 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16247 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16251 4. Categories and newlines: newline suppression for last list item should RT properly
16259 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16261 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16264 ## only wt2html for this to make sure the algo only applies to the rightmost path
16266 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16279 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16281 <ul><li> d</li></ul></li></ul>
16282 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16285 ## We used to, but no longer wt2wt this test since the default serializer
16286 ## will normalize all categories to serialize on their own line.
16287 ## This wikitext usage is going to be fairly uncommon in production and
16288 ## selser will take care of preserving formatting in those scenarios.
16290 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16294 * a [[Category:Foo]]
16296 <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>
16299 # This test also demonstrates because of newline+category tunneling
16300 # through the list hander, template wrapping doesn't expand to the
16301 # containing list when the list item swallows the category.
16303 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16308 <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
16309 </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>
16313 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16317 {{echo|[[Category:Foo]]
16321 <ul><li> a</li></ul>
16323 <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">
16324 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16325 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16329 9. Categories and newlines: should behave properly with linkprefix (T87753)
16344 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16345 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16349 10. No regressions on internal links following category (T174639)
16351 parsoid=wt2html,html2html
16353 [[Category:Foo]]<div>a
16358 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16361 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16363 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16366 # Note that Parsoid differs slightly from PHP due to T175421
16368 11. Special case where only newlines separate links (T175416)
16370 parsoid=wt2html,html2html
16374 [[Foo]][[es:Alimento]]
16379 <a href="/wiki/Foo" title="Foo">Foo</a>
16380 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16383 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16385 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16387 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16391 Category links with multiple namespaces
16393 [[Category:Project:Foo]]
16395 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16399 Parsoid: Serialize link to category page with colon escape
16405 [[:Category:Foo|Bar]]
16408 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16409 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16413 # We used to, but no longer wt2wt this test since the default serializer
16414 # will normalize all categories to serialize on their own line.
16415 # This wikitext usage is going to be fairly uncommon in production and
16416 # selser will take care of preventing whitespace insertion if this
16417 # occurs in an article.
16419 # html2html disabled for the same reason (whitespace insertion between
16422 # html2wt disabled because it localizes the "Category" namespace.
16424 Link prefix/suffixes aren't applied to category links
16434 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16438 Link prefix/suffixes aren't applied to language links
16448 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16452 Parsoid: Serialize link to file page with colon escape
16458 [[:File:Foo.png|Bar]]
16461 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16462 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16467 Parsoid: Serialize a genuine category link without colon escape
16472 [[Category:Foo|Bar]]
16474 <link rel="mw:PageProp/Category" href="./Category:Foo">
16475 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16479 Normalize hrefs properly before testing for invalid link targets (T72894)
16483 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16485 [[Category:Toxine bactérienne]]
16489 Parsoid: Defaultsort
16491 {{DEFAULTSORT:Foo}}
16493 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16496 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16497 # But, this is a limitation of our representation and is documented in
16498 # TemplateHandler.js in processSpecialMagicWord
16500 Parsoid: Defaultsort (template-generated)
16502 {{{{echo|DEFAULTSORT}}:Foo}}
16504 <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"}]]}'/>
16508 ### Inter-language links
16511 Interlanguage links
16519 es:Alimento fr:Nourriture zh:食品
16521 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16522 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16523 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16527 Duplicate interlanguage links (T26502)
16538 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16539 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16540 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16541 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16548 Basic section headings
16555 ===Smaller headline===
16558 <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>
16561 <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>
16564 <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>
16570 Section headings with TOC
16573 === Subheadline 1 ===
16574 ===== Skipping a level =====
16575 ====== Skipping a level ======
16579 ===Another headline===
16581 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16583 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16585 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16587 <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>
16589 <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>
16596 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16598 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16604 <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>
16605 <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>
16606 <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>
16607 <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>
16608 <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>
16611 <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>
16616 TOC anchors don't collide
16624 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16626 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16627 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16628 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16629 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16633 <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>
16634 <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>
16635 <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>
16636 <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>
16640 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16641 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16643 Handling of sections up to level 6 and beyond
16648 == Level 2 Heading==
16649 === Level 3 Heading===
16650 ==== Level 4 Heading====
16651 ===== Level 5 Heading=====
16652 ====== Level 6 Heading======
16653 ======= Level 7 Heading=======
16654 ======== Level 8 Heading========
16655 ========= Level 9 Heading=========
16656 ========== Level 10 Heading==========
16658 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16660 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16662 <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>
16664 <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>
16666 <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>
16668 <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>
16670 <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>
16671 <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>
16672 <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>
16673 <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>
16674 <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>
16688 <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>
16689 <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>
16690 <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>
16691 <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>
16692 <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>
16693 <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>
16694 <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>
16695 <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>
16696 <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>
16697 <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>
16700 <h1 id="Level_1_Heading" data-parsoid='{}'> Level 1 Heading</h1>
16701 <h2 id="Level_2_Heading" data-parsoid='{}'> Level 2 Heading</h2>
16702 <h3 id="Level_3_Heading" data-parsoid='{}'> Level 3 Heading</h3>
16703 <h4 id="Level_4_Heading" data-parsoid='{}'> Level 4 Heading</h4>
16704 <h5 id="Level_5_Heading" data-parsoid='{}'> Level 5 Heading</h5>
16705 <h6 id="Level_6_Heading" data-parsoid='{}'> Level 6 Heading</h6>
16706 <h6 id="=_Level_7_Heading=" data-parsoid='{}'><span id=".3D_Level_7_Heading.3D" typeof="mw:FallbackId"></span>= Level 7 Heading=</h6>
16707 <h6 id="==_Level_8_Heading==" data-parsoid='{}'><span id=".3D.3D_Level_8_Heading.3D.3D" typeof="mw:FallbackId"></span>== Level 8 Heading==</h6>
16708 <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>
16709 <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>
16713 TOC regression (T11764)
16717 ==== title 1.1.1 ====
16722 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16724 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16726 <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>
16728 <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>
16731 <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>
16734 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16736 <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>
16742 <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>
16743 <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>
16744 <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>
16745 <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>
16746 <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>
16747 <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>
16752 TOC for heading containing <span id="..."></span> (T96153)
16755 ==<span id="old-anchor"></span>New title==
16757 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16759 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16763 <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>
16768 TOC with wgMaxTocLevel=3 (T8204)
16774 ==== title 1.1.1 ====
16779 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16781 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16783 <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>
16784 <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>
16787 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16789 <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>
16795 <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>
16796 <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>
16797 <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>
16798 <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>
16799 <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>
16800 <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>
16805 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16811 ====Section 1.1.1====
16812 ====Section 1.1.1.1====
16815 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16817 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16819 <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>
16822 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16826 <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>
16827 <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>
16828 <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>
16829 <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>
16830 <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>
16836 Resolving duplicate section names
16841 <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>
16842 <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>
16847 Resolving duplicate section names with differing case (T12721)
16852 <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>
16853 <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>
16865 Template with sections, __NOTOC__
16872 <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>
16873 <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>
16874 <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>
16875 <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>
16880 __NOEDITSECTION__ keyword
16886 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16887 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16892 Link inside a section heading
16894 ==Section with a [[Main Page|link]] in it==
16896 <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>
16901 TOC regression (T14077)
16908 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16910 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16912 <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>
16915 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16919 <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>
16920 <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>
16921 <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>
16926 T3219 URL next to image (good)
16928 http://example.com [[File:Foobar.jpg]]
16930 <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>
16933 <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>
16936 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16938 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16940 parsoid=wt2html,html2html
16943 The line above must have a trailing space!
16946 But just in case it doesn't...
16948 <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>
16949 <p>The line above must have a trailing space!
16951 <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>
16952 <p>But just in case it doesn't...
16955 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16956 <p>The line above must have a trailing space!</p>
16957 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16959 <p>But just in case it doesn't...</p>
16963 Header with special characters (T27462)
16965 The tooltips shall not show entities to the user (ie. be double escaped)
16982 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16984 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16986 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16987 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16988 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16989 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16990 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16994 <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>
16997 <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>
17000 <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>
17003 <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>
17006 <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>
17010 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
17012 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span> text > text </h2>
17015 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span> text < text </h2>
17018 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span> text & text </h2>
17021 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span> text ' text </h2>
17024 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span> text " text </h2>
17029 Header with space, plus and underscore as entity
17031 Id should not contain + for spaces
17033 == Space between Text ==
17036 == Space-Entity between Text ==
17039 == Plus+between+Text ==
17042 == Plus-Entity+between+Text ==
17045 == Underscore_between_Text ==
17048 == Underscore-Entity_between_Text ==
17051 [[#Space between Text]]
17052 [[#Space-Entity between Text]]
17053 [[#Plus+between+Text]]
17054 [[#Plus-Entity+between+Text]]
17055 [[#Underscore_between_Text]]
17056 [[#Underscore-Entity_between_Text]]
17058 <p>Id should not contain + for spaces
17060 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17062 <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>
17063 <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>
17064 <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>
17065 <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>
17066 <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>
17067 <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>
17071 <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>
17074 <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>
17077 <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>
17080 <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>
17083 <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>
17086 <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>
17088 </p><p><a href="#Space_between_Text">#Space between Text</a>
17089 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
17090 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
17091 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
17092 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
17093 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
17096 <p>Id should not contain + for spaces</p>
17098 <h2 id="Space_between_Text"> Space between Text </h2>
17101 <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>
17104 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span> Plus+between+Text </h2>
17107 <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>
17110 <h2 id="Underscore_between_Text"> Underscore_between_Text </h2>
17113 <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>
17116 <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>
17117 <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>
17118 <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>
17119 <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>
17120 <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>
17121 <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>
17124 # Parsoid html2wt disabled because it adds padding spaces around =
17126 Headers with excess '=' characters
17127 (Are similar tests necessary beyond the 1st level?)
17129 parsoid=wt2html,wt2wt,html2html
17133 =''italic'' heading==
17134 ==''italic'' heading=
17136 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17138 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
17139 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
17140 <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>
17141 <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>
17145 <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>
17146 <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>
17147 <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>
17148 <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>
17151 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
17152 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
17153 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
17154 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
17158 HTML headers vs TOC (T25393)
17159 (__NOEDITSECTION__ for clearer output, doesn't matter here)
17171 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
17173 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
17175 <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>
17176 <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>
17179 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
17181 <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>
17182 <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>
17188 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
17189 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
17190 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
17191 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
17192 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
17193 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
17196 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
17197 <h2 id="Header_1.1" data-parsoid='{}'> Header 1.1 </h2>
17198 <h2 id="Header_1.2" data-parsoid='{}'> Header 1.2 </h2>
17200 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
17202 <h2 id="Header_2.1" data-parsoid='{}'> Header 2.1 </h2>
17203 <h2 id="Header_2.2" data-parsoid='{}'> Header 2.2 </h2>
17204 <meta property="mw:PageProp/noeditsection"/>
17208 Single-line or multiline-comments can follow headings
17210 parsoid=wt2html,wt2wt
17218 <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>
17219 <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>
17220 <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>
17223 <h2 id="foo">foo</h2><!---->
17224 <h2 id="bar">bar</h2><!--c1-->
17225 <h2 id="baz">baz</h2><!--
17231 T3219 URL next to image (broken)
17233 http://example.com[[File:Foobar.jpg]]
17235 <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>
17238 <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>
17242 T3186 news: in the middle of text
17244 http://en.wikinews.org/wiki/Wikinews:Workplace
17246 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17252 Namespaced link must have a title
17261 Namespaced link must have a title (bad fragment version)
17263 [[Project:#fragment]]
17265 <p>[[Project:#fragment]]
17271 ### HTML tags and HTML attributes
17275 div with no attributes
17277 <div>HTML rocks</div>
17279 <div>HTML rocks</div>
17284 div with double-quoted attribute
17286 <div id="rock">HTML rocks</div>
17288 <div id="rock">HTML rocks</div>
17293 div with single-quoted attribute
17295 <div id='rock'>HTML rocks</div>
17297 <div id="rock">HTML rocks</div>
17302 div with unquoted attribute
17304 <div id=rock>HTML rocks</div>
17306 <div id="rock">HTML rocks</div>
17311 div with illegal double attributes
17313 <div id="a" id="b">HTML rocks</div>
17315 <div id="b">HTML rocks</div>
17320 div with empty attribute value, space before equals
17322 parsoid=wt2html,html2html
17324 <div class =>HTML rocks</div>
17326 <div class="">HTML rocks</div>
17329 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17333 div with multiple empty attribute values
17335 wgFragmentMode=[ 'html5', 'legacy' ]
17337 parsoid=wt2html,html2html
17339 <div id= title=>HTML rocks</div>
17341 <div id="title=">HTML rocks</div>
17344 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17348 table with multiple empty attribute values
17350 parsoid=wt2html,html2html
17356 <table title="id=">
17362 <table title="id=">
17363 <tbody><tr><td> hi</td></tr>
17368 div with braces in attribute value
17370 <div title="{}">Foo</div>
17372 <div title="{}">Foo</div>
17375 <div title="{}">Foo</div>
17379 div with empty attribute value, no space before equals
17381 parsoid=wt2html,html2html
17383 <div class=>HTML rocks</div>
17385 <div class="">HTML rocks</div>
17388 <div class="">HTML rocks</div>
17392 HTML multiple attributes correction
17394 <p class="error" class="awesome">Awesome!</p>
17396 <p class="awesome">Awesome!</p>
17401 Table multiple attributes correction
17404 !+ class="error" class="awesome"| status
17409 <th class="awesome"> status
17417 <DIV ID="x">HTML ROCKS</DIV>
17419 <div id="x">HTML ROCKS</div>
17424 Non-ASCII pseudo-tags are rendered as text
17433 Pseudo-tag with URL 'name' renders as url link
17435 <http://example.com/>
17437 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17442 text with amp in the middle of nowhere
17446 <p>Remember AT&T?
17451 text with character entity: eacute
17453 I always thought é was a cute letter.
17455 <p>I always thought é was a cute letter.
17458 <p>I always thought é was a cute letter.</p>
17462 text with entity-escaped character entity-like string: eacute
17464 I always thought &eacute; was a cute letter.
17466 <p>I always thought &eacute; was a cute letter.
17471 text with undefined character entity: xacute
17473 I always thought &xacute; was a cute letter.
17475 <p>I always thought &xacute; was a cute letter.
17482 <data value="5">five</data>
17483 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17484 <mark>This highlighted text</mark>
17486 <p><data value="5">five</data>
17487 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17488 <mark>This highlighted text</mark>
17493 HTML tag with leading space is parsed as text
17497 <p>< div>foo< /div>
17501 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17502 ## the HTML5 parsing spec.
17504 Element with broken attribute syntax
17508 <div style=" style="123">hi</div>
17511 <div style="123">hi</div>
17515 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17516 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17520 ### Nesting tests (see T43545, T52604, T53081)
17523 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17524 # Note that html2wt is considerably more difficult if we use <b> in
17525 # the test case, instead of <small>
17527 Ensure that HTML adoption agency algorithm is properly implemented.
17529 <small>X<small>Y</small>Z</small>
17531 <p><small>X<small>Y</small>Z</small>
17535 # This was T43545 in the PHP parser.
17536 # Note that tidy doesn't handle this correctly.
17540 <kbd>X<kbd>Y</kbd>Z</kbd>
17542 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17546 # The following cases were T53081 in the PHP parser.
17547 # Note that there are some other nestable tags (b, i, etc) which are
17548 # not covered; see T53081 for discussion.
17550 # Note that tidy doesn't handle this correctly.
17554 <em>X<em>Y</em>Z</em>
17556 <p><em>X<em>Y</em>Z</em>
17560 # Note that tidy doesn't handle this correctly.
17562 Nesting of <strong>
17564 <strong>X<strong>Y</strong>Z</strong>
17566 <p><strong>X<strong>Y</strong>Z</strong>
17575 <p><q>X<q>Y</q>Z</q></p>
17578 # Note that tidy doesn't handle this correctly.
17582 <ruby>X<ruby>Y</ruby>Z</ruby>
17584 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17588 # Note that tidy doesn't handle this correctly.
17592 <bdo>X<bdo>Y</bdo>Z</bdo>
17594 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17606 [[Media:Foobar.jpg]]
17607 [[Media:Video.ogv]]
17608 [[:Media:Video.ogv]]
17610 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17611 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17612 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17615 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17616 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17617 <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>
17621 Media link with text
17623 [[Media:Foobar.jpg|A neat file to look at]]
17625 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17628 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17631 # FIXME: this is still bad HTML tag nesting
17632 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17634 Media link with nasty text
17636 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17638 <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>
17641 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p>
17642 <div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div>
17644 <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>
17649 Media link to nonexistent file (T3702)
17651 [[Media:No such.jpg]]
17652 [[Media:No_such file.jpg]]
17654 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17655 <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>
17658 <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>
17659 <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>
17663 Image link to nonexistent file (T3850 - good)
17665 [[File:No_such.jpg]]
17667 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17670 <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>
17674 :Image link to nonexistent file (T3850 - bad)
17676 [[:Image:No such.jpg]]
17678 <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>
17681 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17685 Character reference normalization in link text (T3938)
17687 [[Main Page|this&that]]
17689 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17696 Test for unicode normalization
17698 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17702 (T21451) Links should refer to the normalized form.
17710 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17711 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17712 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17713 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17714 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17719 Empty attribute crash test (T4067)
17721 <font color="">foo</font>
17723 <p><font color="">foo</font>
17728 Empty attribute crash test single-quotes (T4067)
17730 <font color=''>foo</font>
17732 <p><font color="">foo</font>
17737 Attribute test: equals, then nothing
17739 parsoid=wt2html,html2html
17741 <font color=>foo</font>
17743 <p><font color="">foo</font>
17746 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17750 Attribute test: unquoted value
17752 parsoid=wt2html,html2html
17754 <font color=x>foo</font>
17756 <p><font color="x">foo</font>
17759 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17763 Attribute test: unquoted but illegal value (hash)
17765 <font color=#x>foo</font>
17767 <p><font color="#x">foo</font>
17771 # Parsoid does not serialize to empty attribute syntax,
17772 # so wt2wt and html2wt cases are skipped
17774 Attribute test: no value (T54330)
17776 parsoid=wt2html,html2html
17778 <font color>foo</font>
17780 <p><font color="">foo</font>
17783 <p><font color="">foo</font></p>
17787 T4095: link with three closing brackets
17791 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17794 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17798 T4095: link with pipe and three closing brackets
17800 [[Main Page|link]]]
17802 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17805 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17809 T4095: link with pipe and three closing brackets, version 2
17811 [[Main Page|[http://example.com/]]]
17813 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17816 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17825 Template:Dangerous attribute
17827 " onmouseover="alert(document.cookie)
17831 Template:Dangerous style attribute
17833 border-size: expression(alert(document.cookie))
17839 <div style="float: right; {{{1}}}">Magic div</div>
17843 T4304: HTML attribute safety (safe template; regression T4309)
17845 <div title="{{test}}"></div>
17847 <div title="This is a test template"></div>
17850 <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>
17853 # Parsoid has enough context to handle this case
17855 T4304: HTML attribute safety (dangerous template; 2309)
17857 <div title="{{dangerous attribute}}"></div>
17859 <div title=""></div>
17862 <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>
17866 T4304: HTML attribute safety (dangerous style template; 2309)
17868 <div style="{{dangerous style attribute}}"></div>
17870 <div style="/* insecure input */"></div>
17873 <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>
17877 T4304: HTML attribute safety (safe parameter; 2309)
17879 {{div style|width: 200px}}
17881 <div style="float: right; width: 200px">Magic div</div>
17884 <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>
17888 T4304: HTML attribute safety (unsafe parameter; 2309)
17890 {{div style|width: expression(alert(document.cookie))}}
17892 <div style="/* insecure input */">Magic div</div>
17895 <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>
17898 ## Parsoid output here differs; needs investigation.
17900 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17902 {{div style|"><script>alert(document.cookie)</script>}}
17904 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17908 ## Parsoid output here differs; needs investigation.
17910 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17912 {{div style|" ><script>alert(document.cookie)</script>}}
17914 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17919 T4304: HTML attribute safety (link)
17921 <div title="[[Main Page]]"></div>
17923 <div title="[[Main Page]]"></div>
17926 <div title="[[Main Page]]"></div>
17930 T4304: HTML attribute safety (italics)
17932 <div title="''foobar''"></div>
17934 <div title="''foobar''"></div>
17939 T4304: HTML attribute safety (bold)
17941 <div title="'''foobar'''"></div>
17943 <div title="'''foobar'''"></div>
17948 T4304: HTML attribute safety (ISBN)
17950 <div title="ISBN 1234567890"></div>
17952 <div title="ISBN 1234567890"></div>
17957 T4304: HTML attribute safety (RFC)
17959 <div title="RFC 1234"></div>
17961 <div title="RFC 1234"></div>
17966 T4304: HTML attribute safety (PMID)
17968 <div title="PMID 1234567890"></div>
17970 <div title="PMID 1234567890"></div>
17975 T4304: HTML attribute safety (web link)
17977 <div title="http://example.com/"></div>
17979 <div title="http://example.com/"></div>
17984 T4304: HTML attribute safety (named web link)
17986 <div title="[http://example.com/ link]"></div>
17988 <div title="[http://example.com/ link]"></div>
17991 <div title="[http://example.com/ link]"></div>
17995 T5244: HTML attribute safety (extension; safe)
17997 <div style="<nowiki>background:blue</nowiki>"></div>
17999 <div style="background:blue"></div>
18002 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
18006 T5244: HTML attribute safety (extension; unsafe)
18008 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
18010 <div style="/* insecure input */"></div>
18013 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
18016 # More MSIE fun discovered by Tom Gilder
18019 MSIE CSS safety test: spurious slash
18021 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
18023 <div style="/* insecure input */">evil</div>
18026 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
18030 MSIE CSS safety test: hex code
18032 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
18034 <div style="/* insecure input */">evil</div>
18037 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
18041 MSIE CSS safety test: comment in url
18043 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
18045 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
18048 <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>
18052 MSIE CSS safety test: comment in expression
18054 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
18056 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
18059 <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>
18063 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
18065 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
18067 <p style="/* invalid control char */">A</p>
18070 <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>
18074 MSIE 6 CSS safety test: Fullwidth (T57332)
18076 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
18077 <div style="top:EXPRESSION(alert())">B</div>
18079 <p style="/* insecure input */">A</p>
18080 <div style="/* insecure input */">B</div>
18083 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
18084 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
18088 MSIE 6 CSS safety test: IPA extensions (T57332)
18090 <div style="background-image:uʀʟ(javascript:alert())">A</div>
18091 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
18093 <div style="/* insecure input */">A</div>
18094 <p style="/* insecure input */">B</p>
18097 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
18098 <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>
18102 MSIE 6 CSS safety test: sup/sub script (T57332)
18104 <div style="background-image:url⁽javascript:alert())">A</div>
18105 <div style="background-image:url₍javascript:alert())">B</div>
18106 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
18108 <div style="/* insecure input */">A</div>
18109 <div style="/* insecure input */">B</div>
18110 <p style="/* insecure input */">C</p>
18113 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
18114 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
18115 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
18121 parsoid=wt2html,html2html
18124 title="data:text/html,<img src=1 onerror=alert(1)>"
18125 style="-o-link:attr(title);-o-link-source:current">X</div>
18127 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
18130 <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>
18134 MSIE 6 CSS safety test: Repetition markers (T57332)
18136 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
18137 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
18138 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
18139 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
18140 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
18141 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
18142 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
18144 <p style="/* insecure input */">A</p>
18145 <p style="/* insecure input */">B</p>
18146 <p style="/* insecure input */">C</p>
18147 <p style="/* insecure input */">D</p>
18148 <p style="/* insecure input */">E</p>
18149 <p style="/* insecure input */">F</p>
18150 <p style="/* insecure input */">G</p>
18153 <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>
18154 <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>
18155 <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>
18156 <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>
18157 <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>
18158 <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>
18159 <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>
18163 Table attribute legitimate extension
18166 !+ style="<nowiki>color:blue</nowiki>"| status
18171 <th style="color:blue"> status
18177 Table attribute safety
18180 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
18185 <th style="/* insecure input */"> status
18191 CSS line continuation 1
18193 <div style="background-image: u\ rl(test.jpg);"></div>
18195 <div style="/* insecure input */"></div>
18200 CSS line continuation 2
18202 <div style="background-image: u\ rl(test.jpg); "></div>
18204 <div style="/* invalid control char */"></div>
18215 Expansion of multi-line templates in attribute values (T8255)
18217 <div style="background: {{identity|#00FF00}}">-</div>
18219 <div style="background: #00FF00">-</div>
18224 Expansion of multi-line templates in attribute values (T8255 sanity check)
18226 <div style="background:
18229 <div style="background: #00FF00">-</div>
18232 <div style="background:
18237 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18239 <div style="background: #00FF00">-</div>
18241 <div style="background: #00FF00">-</div>
18246 Tags which are hidden from Tidy cannot pass through the Sanitizer
18248 <mw:toc><script>alert();</script></mw:toc>
18250 <p><mw:toc><script>alert();</script></mw:toc></p>
18254 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18258 Parser hook: empty input
18269 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18272 ## Don't expect parsoid to rt this form.
18274 Parser hook: empty input using terminated empty elements
18276 parsoid=wt2html,html2html
18287 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18291 Parser hook: empty input using terminated empty elements (space before)
18302 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18306 Parser hook: basic input
18317 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18320 ## Don't expect parsoid to rt this form.
18322 Parser hook: case insensitive
18324 parsoid=wt2html,html2html
18335 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18338 ## Don't expect parsoid to rt this form.
18340 Parser hook: case insensitive, redux
18342 parsoid=wt2html,html2html
18353 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18357 Parser hook: nested tags
18359 <tag><tag></tag></tag>
18368 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18372 Parser hook: basic arguments
18374 <tag width="200" height="100" depth="50" square=""></tag>
18387 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18390 ## Don't expect parsoid to rt this form.
18392 Parser hook: basic arguments, variations
18394 parsoid=wt2html,html2html
18396 <tag width=200 height = "100" depth = '50' square></tag>
18409 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18413 Parser hook: argument containing a forward slash (T7344)
18415 <tag filename="/tmp/bla"></tag>
18420 'filename' => '/tmp/bla',
18425 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18428 ## Don't expect parsoid to rt this form.
18430 Parser hook: empty input using terminated empty elements (T4374)
18432 parsoid=wt2html,html2html
18444 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18447 ## </tag> should be output literally since there is no matching tag that begins it
18448 ## Don't expect parsoid to rt this form.
18450 Parser hook: basic arguments using terminated empty elements (T4374)
18454 <tag width=200 height = "100" depth = '50' square/>
18471 <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
18475 ## Don't expect parsoid to rt this form.
18477 Parser hook: Don't allow unclosed extension tags
18483 this is a '''test'''
18485 <p>test <tag>123
18486 </p><p>this is a <b>test</b>
18489 <p>test <tag>123</p>
18491 <p>this is a <b>test</b></p>
18495 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18499 Parser hook: static parser hook not inside a comment
18501 <statictag>hello, world</statictag>
18503 <statictag action="flush" />
18509 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18510 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18514 Parser hook: static parser hook inside a comment
18516 <!-- <statictag>hello, world</statictag> -->
18517 <statictag action="flush" />
18522 <!-- <statictag>hello, world</statictag> -->
18523 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18526 # Nested template calls; this case was broken by Parser.php rev 1.506,
18530 Template:One-parameter
18532 (My parameter is: {{{1}}})
18536 Template:Map-one-parameter
18538 {{{{{1}}}|{{{2}}}}}
18542 Nested template calls
18544 {{Map-one-parameter|One-parameter|param}}
18546 <p>(My parameter is: param)
18555 # HTML+Tidy strips out empty tags completely. Parsoid doesn't.
18556 # FIXME: Wikitext for this first test doesn't match its title.
18558 Sanitizer: Closing of open tags
18560 <s></s><table></table>
18564 <s></s><table></table>
18568 Sanitizer: Closing of open but not closed tags
18577 Sanitizer: Closing of closed but not open tags
18587 Sanitizer: Closing of closed but not open table tags
18591 Table not started</td></tr></table>
18593 <p>Table not started</p>
18595 <p>Table not started</p>
18599 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18601 wgFragmentMode=[ 'html5', 'legacy' ]
18603 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18605 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18608 <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>
18612 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18614 wgFragmentMode=[ 'legacy' ]
18616 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18618 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18622 # In HTML5, the restrictions are that id must contain at least one character,
18623 # and must not contain any space characters.
18625 Sanitizer: Validating the contents of the id attribute (T6515)
18629 <br id="" /><br id="a space" />
18634 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18636 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18640 <br id="foo" /><br id="foo" />
18642 Something need to be done. foo-2 ?
18646 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18649 <meta itemprop="hello" content="world">
18650 <meta http-equiv="refresh" content="5">
18651 <meta itemprop="hello" http-equiv="refresh" content="5">
18652 <link itemprop="hello" href="{{SERVER}}">
18653 <link rel="stylesheet" href="{{SERVER}}">
18654 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18658 <p> <meta itemprop="hello" content="world" />
18659 <meta http-equiv="refresh" content="5">
18660 <meta itemprop="hello" content="5" />
18661 <link itemprop="hello" href="http://example.org" />
18662 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18663 <link itemprop="hello" href="http://example.org" />
18670 Sanitizer: Strip comments from CSS attributes
18672 parsoid=wt2html,wt2wt
18674 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18676 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18679 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18683 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18685 [[meatball:Soft"Security]]
18687 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18690 <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>
18694 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18696 [[meatball:Foo<Bar]]
18697 [[meatball:Foo>Bar]]
18698 [[meatball:Foo<bar]]
18699 [[meatball:Foo>bar]]
18701 <p>[[meatball:Foo<Bar]]
18702 [[meatball:Foo>Bar]]
18703 [[meatball:Foo<bar]]
18704 [[meatball:Foo>bar]]
18707 <p>[[meatball:Foo<Bar]]
18708 [[meatball:Foo>Bar]]
18709 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18710 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18714 Language converter: output gets cut off unexpectedly (T7757)
18718 this bit is safe: }-
18720 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18722 then we get cut off here: }-
18724 all additional text is vanished
18726 <p>this bit is safe: }-
18727 </p><p>but if we add a conversion instance: xxx
18728 </p><p>then we get cut off here: }-
18729 </p><p>all additional text is vanished
18732 <p>this bit is safe: }-</p>
18733 <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>
18734 <p>then we get cut off here: }-</p>
18735 <p>all additional text is vanished</p>
18739 Language converter glossary rules inside attributes (T119158)
18741 language=sr variant=sr-el
18743 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18745 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18748 </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>
18751 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18753 <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>
18757 Self closed html pairs (T7487)
18759 <center><font id="bug" />Centered text</center>
18760 <div><font id="bug2" />In div text</div>
18762 <center><font id="bug"></font>Centered text</center>
18763 <div><font id="bug2"></font>In div text</div>
18771 Punctuation: nbsp before exclamation
18775 <p>C'est grave !
18780 Punctuation: CSS !important (T13874)
18782 <div style="width:50% !important">important</div>
18784 <div style="width:50% !important">important</div>
18789 Punctuation: CSS ! important (T13874; with space after)
18791 <div style="width:50% ! important">important</div>
18793 <div style="width:50% ! important">important</div>
18798 HTML bullet list, closed tags (T7497)
18811 <ul data-parsoid='{"stx":"html"}'>
18812 <li data-parsoid='{"stx":"html"}'>One</li>
18813 <li data-parsoid='{"stx":"html"}'>Two</li>
18819 HTML bullet list, unclosed tags (T7497)
18831 <ul data-parsoid='{"stx":"html"}'>
18832 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18833 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18839 HTML ordered list, closed tags (T7497)
18852 <ol data-parsoid='{"stx":"html"}'>
18853 <li data-parsoid='{"stx":"html"}'>One</li>
18854 <li data-parsoid='{"stx":"html"}'>Two</li>
18860 HTML ordered list, unclosed tags (T7497)
18873 <ol data-parsoid='{"stx":"html"}'>
18874 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18875 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18881 HTML nested bullet list, closed tags (T7497)
18904 <ul data-parsoid='{"stx":"html"}'>
18905 <li data-parsoid='{"stx":"html"}'>One</li>
18906 <li data-parsoid='{"stx":"html"}'>Two:
18907 <ul data-parsoid='{"stx":"html"}'>
18908 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18909 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18916 HTML nested bullet list, open tags (T7497)
18953 HTML nested ordered list, closed tags (T7497)
18978 HTML nested ordered list, open tags (T7497)
19015 HTML ordered list item with parameters oddity
19017 <ol><li id="fragment">One</li>
19020 <ol><li id="fragment">One</li>
19025 # parsoid doesn't explicitly mark autonumbered links, see T55505
19027 T7918: autonumbering
19029 [http://first/] [http://second] [ftp://ftp]
19033 [mailto:enclosed@mail.tld With target]
19035 [mailto:enclosed@mail.tld]
19037 mailto:inline@mail.tld
19039 <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>
19040 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
19041 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
19042 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
19043 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
19046 <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>
19047 <p><a rel="mw:ExtLink" href="ftp://inlineftp">ftp://inlineftp</a></p>
19048 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld">With target</a></p>
19049 <p><a rel="mw:ExtLink" href="mailto:enclosed@mail.tld"></a></p>
19050 <p><a rel="mw:ExtLink" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
19055 # Security and HTML correctness
19056 # From Nick Jenkins' fuzz testing
19060 Fuzz testing: Parser13
19074 # Note that Parsoid output differs from the PHP parser here: the PHP
19075 # parser breaks the URL for the magic word, while in Parsoid the URL
19076 # production takes precedence.
19078 Fuzz testing: Parser14
19083 <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>
19084 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
19086 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19092 <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>
19094 <div id="toc" class="toc">
19095 <div class="toctitle" lang="en" dir="ltr" xml:lang="en">
19099 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
19104 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span> onmouseover= </h2>
19105 <p><a rel="mw:ExtLink" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
19109 Fuzz testing: Parser14-table
19111 parsoid=wt2html,html2html
19116 <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>
19117 <table style="__TOC__">
19122 <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>
19123 <table style="__TOC__">
19130 <table style="__TOC__"></table>
19133 # Known to produce bogus xml (extra </td>)
19135 Fuzz testing: Parser16
19162 Fuzz testing: Parser21
19165 ! irc://{{ftp://a" onmouseover="alert('hello world');"
19170 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
19180 Fuzz testing: Parser22
19182 http://===r:::https://b
19186 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
19194 # Known to produce bad XML for now
19196 Fuzz testing: Parser24
19203 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
19204 <br style="onmouseover='alert(document.cookie);' " />
19206 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19211 <u class="|">}}}} >
19212 <br style="onmouseover='alert(document.cookie);'" />
19214 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
19222 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
19223 <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>"}'/>}}}} >
19224 <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}'>
19228 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
19231 # Note: the current result listed for this is not what the original one was,
19232 # but the original bug was JavaScript injection, which is fixed in any case.
19233 # It's not clear that the original result listed was any more correct than the
19234 # current one. Original result:
19237 # <li class="||">
19238 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19240 Fuzz testing: Parser25 (T8055)
19246 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19248 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19251 <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"]}'>
19252 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19256 Fuzz testing: URL adjacent extension (with space, clean)
19258 http://example.com <nowiki>junk</nowiki>
19260 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19263 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
19267 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19269 http://example.com<nowiki>junk</nowiki>
19271 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19274 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
19278 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19280 http://example.com<pre>junk</pre>
19282 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19285 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p>
19290 <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>
19294 Fuzz testing: image with bogus manual thumbnail
19296 [[Image:foobar.jpg|thumbnail= ]]
19298 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19301 <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>
19304 # Parsoid will emit the newline literally in wt2wt; see next test case.
19306 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19310 <pre dir=" "></pre>
19312 <pre dir=" "></pre>
19315 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19316 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19320 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19324 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19325 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19335 Templates in extension attributes are not expanded
19337 <pre dir="{{echo|ltr}}"></pre>
19339 <pre dir="{{echo|ltr}}"></pre>
19342 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19346 Parsing optional HTML elements (T8171)
19351 <td> Some tabular data</td>
19352 <td> More tabular data ...
19353 <td> And yet som tabular data</td>
19359 <td> Some tabular data</td>
19360 <td> More tabular data ...
19361 </td><td> And yet som tabular data</td>
19368 Correct handling of <td>, <tr> (T8171)
19373 <td> Some tabular data</td>
19374 <td> More tabular data ...</td>
19375 <td> And yet som tabular data</td>
19381 <td> Some tabular data</td>
19382 <td> More tabular data ...</td>
19383 <td> And yet som tabular data</td>
19391 Parsing crashing regression (fr:JavaScript)
19395 <p></body></x>
19400 Inline wiki vs wiki block nesting
19406 <p><b>Bold paragraph</b>
19407 </p><p>New wiki paragraph
19411 # FIXME: The current php output is documented
19412 # and desired output is the parsoid target.
19414 Inline HTML vs wiki block nesting
19420 <p><b>Bold paragraph
19421 </p><p>New wiki paragraph</b>
19424 <p><b>Bold paragraph</b>
19425 </p><p>New wiki paragraph
19429 # Original result was this:
19430 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19432 # While that might be marginally more intuitive, maybe, the six-apostrophe
19433 # construct is clearly pathological and the result stated here (which is what
19434 # the parser actually does) is about as reasonable as anything.
19436 Mixing markup for italics and bold
19439 '''bold''''''bold''bolditalics'''''
19441 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19449 Article for special page transclusion test
19453 Special page transclusion
19456 {{Special:Prefixindex/Xyzzyx}}
19458 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19464 Special page transclusion twice (T7021)
19467 {{Special:Prefixindex/Xyzzyx}}
19468 {{Special:Prefixindex/Xyzzyx}}
19470 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19472 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19478 Transclusion of default MediaWiki message
19480 {{MediaWiki:Mainpage}}
19487 Transclusion of nonexistent MediaWiki message
19489 {{MediaWiki:Mainpagexxx}}
19491 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19496 Transclusion of MediaWiki message with underscore
19498 {{MediaWiki:history_short}}
19505 Transclusion of MediaWiki message with space
19507 {{MediaWiki:history short}}
19514 Invalid header with following text
19524 Section extraction test (section 0)
19544 Section extraction test (section 1)
19566 Section extraction test (section 2)
19587 Section extraction test (section 3)
19607 Section extraction test (section 4)
19631 Section extraction test (section 5)
19651 Section extraction test (section 6)
19672 Section extraction test (section 7)
19692 Section extraction test (section 8)
19712 Section extraction test (section 9)
19733 Section extraction test (section 10)
19753 Section extraction test (nonexistent section 11)
19772 Section extraction test with bogus heading (section 1)
19777 ==bogus== not a legal section
19781 ==bogus== not a legal section
19785 Section extraction test with bogus heading (section 2)
19790 ==bogus== not a legal section
19797 Section extraction test with comment after heading (section 1)
19809 Section extraction test with comment after heading (section 2)
19821 Section extraction test with bogus <nowiki> heading (section 1)
19826 ==bogus== <nowiki>not a legal section</nowiki>
19830 ==bogus== <nowiki>not a legal section</nowiki>
19834 Section extraction test with bogus <nowiki> heading (section 2)
19839 ==bogus== <nowiki>not a legal section</nowiki>
19845 # Formerly testing for T4587, now resolved by the use of unmarked sections
19846 # instead of respecting commented sections
19848 Section extraction prefixed by comment (section 1)
19859 Section extraction prefixed by comment (section 2)
19869 # Formerly testing for T4607, now resolved by the use of unmarked sections
19870 # instead of respecting HTML-style headings
19872 Section extraction, mixed wiki and html (section 1)
19888 Section extraction, mixed wiki and html (section 2)
19904 # Formerly testing for T5342
19906 Section extraction, heading surrounded by <noinclude>
19910 <noinclude>==unmarked==</noinclude>
19916 # Test behavior of T21910
19918 Sectiion with all-equals
19923 The line above must have a trailing space
19926 But just in case it doesn't...
19930 But just in case it doesn't...
19934 Section replacement test (section 0)
19965 Section replacement test (section 1)
19994 Section replacement test (section 2)
20024 Section replacement test (section 3)
20055 Section replacement test (section 4)
20082 Section replacement test (section 5)
20113 Section replacement test (section 6)
20143 Section replacement test (section 7)
20174 Section replacement test (section 8)
20205 Section replacement test (section 9)
20234 Section replacement test (section 10)
20264 Section replacement test with initial whitespace (T15728)
20268 Preformatted initial line
20272 Preformatted initial line
20279 Section extraction, heading followed by pre with 20 spaces (T8398)
20291 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20304 Section extraction, <pre> around bogus header (T12309)
20321 Section replacement, <pre> around bogus header (T12309)
20342 Handling of 
 in URLs
20346 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20349 <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>
20353 Handling of %0A in URLs
20357 <ul><li><ul><li> <a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20360 <ul><li><ul><li> <a rel="mw:ExtLink" href="irc://%0Aa">irc://%0Aa</a></li></ul></li></ul>
20363 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20365 5 quotes, code coverage +1 line
20375 # same html as previous, but wikitext adjusted to match parsoid html2wt
20376 # note that wt2html and html2html will put the <i> before the <b>
20378 5 quotes, code coverage +1 line w/ nowiki (1)
20380 parsoid=wt2wt,html2wt
20382 '''''<nowiki/>'''''
20387 <p><b><i></i></b></p>
20390 # same as previous, just swapping the <i> and <b>
20392 5 quotes, code coverage +1 line w/ nowiki (2)
20394 '''''<nowiki/>'''''
20399 <p><i><b></b></i></p>
20403 Special:Search page linking.
20407 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20412 {{!}} is a magic word
20414 {{!}} is a magic word there and {{!}} is still a magic word here
20415 | is not a magic word here but {{!}} is still a magic word here
20417 <p>| is a magic word there and | is still a magic word here
20418 | is not a magic word here but | is still a magic word here
20421 <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
20422 | 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>
20428 title=[[Parser test]]
20433 * {{FULLPAGENAMEE}}
20435 * {{BASEPAGENAMEE}}
20439 * {{ROOTPAGENAMEE}}
20441 * {{TALKPAGENAMEE}}
20442 * {{SUBJECTPAGENAME}}
20443 * {{SUBJECTPAGENAMEE}}
20446 * {{NAMESPACENUMBER}}
20450 * {{SUBJECTSPACEE}}
20451 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20453 <ul><li> Parser test</li>
20454 <li> Parser_test</li>
20455 <li> Parser test</li>
20456 <li> Parser_test</li>
20457 <li> Parser test</li>
20458 <li> Parser_test</li>
20459 <li> Parser test</li>
20460 <li> Parser_test</li>
20461 <li> Parser test</li>
20462 <li> Parser_test</li>
20463 <li> Talk:Parser test</li>
20464 <li> Talk:Parser_test</li>
20465 <li> Parser test</li>
20466 <li> Parser_test</li>
20474 <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>
20477 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20480 Gallery with valid attributes
20482 <gallery type="123" summary="345">
20483 File:File:Foobar.jpg
20486 <ul class="gallery mw-gallery-traditional" type="123">
20487 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20488 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20489 <div class="gallerytext">
20495 <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"}}'>
20496 <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>
20500 ## Parsoid thinks the "centre" here is a property, not a caption.
20505 "modes": ["wt2html"],
20506 "nativeGallery": true
20514 image4 |300px| centre
20515 image5.svg| http://///////
20520 <ul class="gallery mw-gallery-traditional">
20521 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20522 <div class="thumb" style="height: 150px;">Image1.png</div>
20523 <div class="gallerytext">
20526 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20527 <div class="thumb" style="height: 150px;">Image2.gif</div>
20528 <div class="gallerytext">
20531 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20532 <div class="thumb" style="height: 150px;">Image3</div>
20533 <div class="gallerytext">
20536 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20537 <div class="thumb" style="height: 150px;">Image4</div>
20538 <div class="gallerytext">
20543 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20544 <div class="thumb" style="height: 150px;">Image5.svg</div>
20545 <div class="gallerytext">
20546 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20550 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20551 <div class="thumb" style="height: 150px;">* image6</div>
20552 <div class="gallerytext">
20558 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20559 <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>
20560 <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>
20561 <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>
20562 <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>
20563 <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>
20564 <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>
20569 Gallery (with options, html)
20572 "modes": ["wt2html", "html2html"],
20573 "nativeGallery": true
20576 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20577 File:Nonexistent.jpg|caption
20578 File:Nonexistent.jpg
20579 image:foobar.jpg|some '''caption''' [[Main Page]]
20581 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20584 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20585 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20586 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20587 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20588 <div class="gallerytext">
20593 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20594 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20595 <div class="gallerytext">
20598 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20599 <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>
20600 <div class="gallerytext">
20601 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20605 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20606 <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>
20607 <div class="gallerytext">
20610 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20611 <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>
20612 <div class="gallerytext">
20620 <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":{}}'>
20621 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20622 <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>
20623 <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>
20624 <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>
20625 <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>
20626 <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>
20631 Gallery (with options, extsrc)
20634 "nativeGallery": false
20637 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20638 File:Nonexistent.jpg|caption
20639 File:Nonexistent.jpg
20640 image:foobar.jpg|some '''caption''' [[Main Page]]
20642 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20645 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20646 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20647 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20648 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20649 <div class="gallerytext">
20654 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20655 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20656 <div class="gallerytext">
20659 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20660 <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>
20661 <div class="gallerytext">
20662 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20666 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20667 <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>
20668 <div class="gallerytext">
20671 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20672 <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>
20673 <div class="gallerytext">
20681 <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"}}'>
20682 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20683 <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>
20684 <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>
20685 <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>
20686 <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>
20687 <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>
20692 Gallery with link that has fragment
20695 "modes": ["wt2html", "html2html"],
20696 "nativeGallery": true
20700 image:foobar.jpg|link=Main_Page
20701 image:foobar.jpg|link=Main_Page#section
20702 image:foobar.jpg|link=Main Page#section|caption
20705 <ul class="gallery mw-gallery-traditional">
20706 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20707 <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>
20708 <div class="gallerytext">
20711 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20712 <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>
20713 <div class="gallerytext">
20716 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20717 <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>
20718 <div class="gallerytext">
20726 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20727 <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>
20728 <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>
20729 <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>
20733 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20735 Gallery with template inside caption
20738 "nativeGallery": true
20741 <gallery caption="{{echo|hi}}">
20742 File:Foobar.jpg|{{echo|ho}}
20745 <ul class="gallery mw-gallery-traditional">
20746 <li class='gallerycaption'>{{echo|hi}}</li>
20747 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20748 <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>
20749 <div class="gallerytext">
20757 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20758 <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>
20759 <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>
20764 Gallery with wikitext inside caption
20767 "nativeGallery": true
20771 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20772 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20775 <ul class="gallery mw-gallery-traditional">
20776 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20777 <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>
20778 <div class="gallerytext">
20779 <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>
20783 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20784 <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>
20785 <div class="gallerytext">
20786 <p>This is a test template
20793 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20794 <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>
20795 <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>
20800 Gallery (with showfilename option)
20803 "nativeGallery": true
20806 <gallery showfilename="">
20807 File:Nonexistent.jpg|caption
20808 File:Nonexistent.jpg
20809 File:Foobar.jpg|some '''caption''' [[Main Page]]
20813 <ul class="gallery mw-gallery-traditional">
20814 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20815 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20816 <div class="gallerytext">
20817 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20822 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20823 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20824 <div class="gallerytext">
20825 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20829 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20830 <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>
20831 <div class="gallerytext">
20832 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20833 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20837 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20838 <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>
20839 <div class="gallerytext">
20840 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20847 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20848 <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>
20849 <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>
20850 <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>
20851 <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>
20855 ## Should Parsoid be preserving these variations? See T151367
20857 Gallery (with namespace-less filenames)
20860 "modes": ["wt2html", "html2html"],
20861 "nativeGallery": true
20865 File:Nonexistent.jpg
20871 <ul class="gallery mw-gallery-traditional">
20872 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20873 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20874 <div class="gallerytext">
20877 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20878 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20879 <div class="gallerytext">
20882 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20883 <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>
20884 <div class="gallerytext">
20887 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20888 <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>
20889 <div class="gallerytext">
20895 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20896 <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>
20897 <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>
20898 <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>
20899 <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>
20904 Gallery override link with wikilink (T36852)
20907 "nativeGallery": true
20911 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20914 <ul class="gallery mw-gallery-traditional">
20915 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20916 <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>
20917 <div class="gallerytext">
20923 <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":{}}'>
20924 <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>
20929 Gallery override link with absolute external link (T36852)
20932 "nativeGallery": true
20936 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20939 <ul class="gallery mw-gallery-traditional">
20940 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20941 <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>
20942 <div class="gallerytext">
20948 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20949 <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>
20954 Gallery override link with absolute external link with LanguageConverter
20959 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20962 <ul class="gallery mw-gallery-traditional">
20963 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20964 <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>
20965 <div class="gallerytext">
20975 Gallery override link with malicious javascript (T36852)
20978 "modes": ["wt2html", "html2html"],
20979 "nativeGallery": true
20983 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20986 <ul class="gallery mw-gallery-traditional">
20987 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20988 <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>
20989 <div class="gallerytext">
20995 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20996 <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>
21000 # Note that parsoid uses the invalid link as a caption, PHP does not.
21002 Gallery with invalid title as link (T45964)
21005 "modes": ["wt2html", "html2html"],
21006 "nativeGallery": true
21010 File:Foobar.jpg|link=<
21013 <ul class="gallery mw-gallery-traditional">
21014 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21015 <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>
21016 <div class="gallerytext">
21022 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
21023 <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>
21028 Serialize gallery without attrs in data-mw
21031 "modes": ["html2wt"],
21032 "nativeGallery": true
21035 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
21036 <li class="gallerycaption">123</li>
21037 <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>
21040 <gallery caption="123">
21046 Gallery with class and style attributes
21049 "nativeGallery": true
21052 <gallery class="center" style="text-align: center;">
21056 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
21057 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21058 <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>
21059 <div class="gallerytext">
21065 <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":{}}'>
21066 <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>
21071 Gallery in slideshow mode
21074 "nativeGallery": true
21077 <gallery mode="slideshow" showthumbnails="">
21081 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
21082 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
21083 <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>
21084 <div class="gallerytext">
21090 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
21091 <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>
21096 HTML Hex character encoding (spells the word "JavaScript")
21098 parsoid=wt2html,wt2wt,html2html
21100 JavaScript
21102 <p>JavaScript
21107 <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>
21111 HTML Hex character encoding bogus encoding (T28437 regression check)
21115 <p>&#xsee;&#XSEE;
21118 <p>&#xsee;&#XSEE;</p>
21122 HTML Hex character encoding mixed case
21124 parsoid=wt2html,wt2wt,html2html
21133 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
21136 # See: https://www.w3.org/TR/html5/syntax.html#character-references
21137 # Note that U+000C (form feed) is not a valid XML character, so
21138 # it is banned even though allowed in HTML5.
21140 Illegal character references (T106578)
21145 ; Control (low): 
21146 ; Control (high):  Ÿ
21147 ; Surrogate: ��
21148 ; This is an okay astral character: 💩
21157 <dt>Control (low)</dt>
21159 <dt>Control (high)</dt>
21160 <dd>&#x7F; &#x9F;</dd>
21162 <dd>&#xD83D;&#xDCA9;</dd>
21163 <dt>This is an okay astral character</dt>
21169 __FORCETOC__ override
21181 ISBN 978-0-1234-56 789
21183 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
21186 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789</p>
21188 <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>
21192 ISBN followed by 5 spaces
21203 ISBN ISBN 1234567890
21205 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21208 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21211 # Uppercase X and lowercase x as well
21222 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21223 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21224 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21225 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21226 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21227 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21230 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21231 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21232 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21233 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21234 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21235 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21239 ISBN with empty prefix (parsoid test)
21243 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21246 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21250 T24905: <abbr> followed by ISBN followed by </a>
21252 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21254 <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>
21257 <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>
21265 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21270 Double RFC with a wiki link
21274 <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>
21283 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21286 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987</p>
21290 Centre-aligned image
21292 [[Image:foobar.jpg|centre]]
21294 <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>
21301 [[Image:foobar.jpg|none]]
21303 <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>
21308 Width + Height sized image (using px) (height is ignored)
21310 [[Image:foobar.jpg|640x480px]]
21312 <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>
21317 Width-sized image (using px, no following whitespace)
21319 [[Image:foobar.jpg|640px]]
21321 <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>
21326 Width-sized image (using px, with following whitespace - test regression from r39467)
21328 [[Image:foobar.jpg|640px ]]
21330 <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>
21335 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21337 [[Image:foobar.jpg| 640px]]
21339 <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>
21344 Image with page parameter
21348 [[File:LoremIpsum.djvu|page=2]]
21350 <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>
21353 <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>
21357 Another italics / bold test
21365 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21371 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21374 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21378 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21380 Images with the "|" character in the comment
21382 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21384 <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>
21387 <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>
21391 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21393 <html><script>alert(1);</script></html>
21395 <p><html><script>alert(1);</script></html>
21400 HTML with raw HTML ($wgRawHtml==true)
21404 <html><script>alert(1);</script></html>
21406 <p><script>alert(1);</script>
21411 Parents of subpages, one level up
21413 subpage title=[[Subpage test/L1/L2/L3]]
21417 <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>
21423 Parents of subpages, one level up, not named
21425 subpage title=[[Subpage test/L1/L2/L3]]
21429 <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>
21436 Parents of subpages, two levels up
21438 subpage title=[[Subpage test/L1/L2/L3]]
21444 <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
21445 </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>
21450 Parents of subpages, two levels up, without trailing slash or name.
21452 subpage title=[[Subpage test/L1/L2/L3]]
21461 Parents of subpages, two levels up, with lots of extra trailing slashes.
21463 subpage title=[[Subpage test/L1/L2/L3]]
21467 <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>
21472 Subpage test/L1/L2/L3Sibling
21478 Transclusion of a sibling page (one level up)
21480 subpage title=[[Subpage test/L1/L2/L3]]
21489 Transclusion of a child page
21491 subpage title=[[Subpage test/L1/L2]]
21499 # This is wt2html only in Parsoid because we add <nowiki>
21500 # because of {{..}} and we don't expect to fix that to
21501 # eliminate the nowikis selective for {{..}} markup.
21503 Non-transclusion because of too many up levels
21505 subpage title=[[Subpage test/L1/L2/L3]]
21508 {{../../../../More than parent}}
21510 <p>{{../../../../More than parent}}
21513 <p>{{../../../../More than parent}}</p>
21517 Definition list code coverage
21523 <dl><dt> title  </dt>
21525 <dt> title </dt>
21531 <dl><dt> title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21532 <dt> title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21533 <dt>title</dt><dd> def</dd></dl>
21537 Don't fall for the self-closing div
21539 <div>hello world</div/>
21541 <div>hello world</div>
21550 <p>[[:Template:Msg]]
21559 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21563 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21565 Always escape literal '>' in output, not just after '<'
21579 <p>This is a test template
21580 This is a test template
21592 Inclusion of !userCanEdit() content
21596 <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>
21602 Out-of-order TOC heading levels
21611 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21613 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21615 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21616 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21619 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21621 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21622 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21628 <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>
21629 <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>
21630 <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>
21631 <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>
21632 <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>
21633 <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>
21639 ISBN with a dummy number
21649 ISBN with space-delimited number
21653 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21656 <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>
21661 ISBN with multiple spaces, no number
21680 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21681 </p><p>ISBN 12345678901
21684 <p>ISBN 123456789</p>
21686 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21688 <p>ISBN 12345678901</p>
21693 ISBN with trailing year (T9110)
21695 ISBN 1-234-56789-0 - 2006
21697 ISBN 1 234 56789 0 - 2006
21699 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21700 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21703 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21705 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21712 wgFragmentMode=[ 'html5', 'legacy' ]
21714 {{anchorencode:foo bar©#%n}}
21719 <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>
21723 anchorencode (legacy)
21725 wgFragmentMode=[ 'legacy' ]
21727 {{anchorencode:foo bar©#%n}}
21729 <p>foo_bar.C2.A9.23.25n
21734 anchorencode trims spaces
21736 wgFragmentMode=[ 'html5', 'legacy' ]
21738 {{anchorencode: __pretty__please__}}
21743 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21747 anchorencode deals with links
21749 wgFragmentMode=[ 'html5', 'legacy' ]
21751 {{anchorencode: [[hello|world]] [[hi]]}}
21756 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21760 anchorencode deals with templates
21762 wgFragmentMode=[ 'html5', 'legacy' ]
21764 {{anchorencode: {{Foo}} x}}
21769 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21773 anchorencode encodes like the TOC generator: (T20431)
21775 wgFragmentMode=[ 'html5', 'legacy' ]
21777 === _ +:.3A%3A _ &&]] x ===
21778 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21781 <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>
21782 <p>+:.3A%3A_&&]]_x
21785 <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>
21786 <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>
21787 <meta property="mw:PageProp/noeditsection"/>
21791 anchorencode encodes like the TOC generator: (T20431) (legacy)
21793 wgFragmentMode=[ 'legacy' ]
21795 === _ +:.3A%3A&&]] ===
21796 {{anchorencode: _ +:.3A%3A&&]] }}
21799 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21800 <p>.2B:.3A.253A.26.26.5D.5D
21805 T8200: blockquotes and paragraph formatting
21826 T10293: Use of center tag ruins paragraph formatting
21847 Parsing of overlapping (improperly nested) inline html tags
21849 <span><s>x</span></s>
21851 <p><span><s>x</span></s></span>
21854 <p><span><s>x</s></span>
21859 ### Language variants related tests
21862 # Parsoid does not mark self-links.
21863 # Parsoid does not convert links; PHP will do any necessary redirects.
21866 Self-link in language variants
21868 title=[[Dunav]] language=sr
21870 Both [[Dunav]] and [[Дунав]] are names for this river.
21872 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21875 <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>
21885 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21887 title=[[Duna]] language=sr
21889 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21891 <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.
21894 <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>
21898 Link to a section of a variant of this title shouldn't be parsed as self-link
21900 title=[[Duna]] language=sr
21902 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21904 <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.
21907 <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>
21911 Link to pages in language variants
21915 Main Page can be written as [[Маин Паге]]
21917 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21920 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21925 Multiple links to pages in language variants
21929 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21931 <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>.
21934 <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>
21939 Simple template in language variants
21945 <p>This is a test template
21951 Template with explicit namespace in language variants
21957 <p>This is a test template
21963 Basic test for template parameter in language variants
21967 {{парамтест|param=foo}}
21969 <p>This is a test template with parameter foo
21974 Simple category in language variants
21978 [[Category:МедиаWики Усер'с Гуиде]]
21980 cat=МедиаWики_Усер'с_Гуиде sort=
21982 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21997 ## We used to, but no longer wt2wt this test since the default serializer
21998 ## will normalize all categories to serialize on their own line.
21999 ## This wikitext usage is going to be fairly uncommon in production and
22000 ## selser will take care of preserving formatting in those scenarios.
22002 Don't convert blue categorylinks to another variant (T35210)
22008 [[A]][[Category:分类]]
22012 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
22013 <link rel="mw:PageProp/Category" href="./Category:分类"/>
22017 Stripping -{}- tags (language variants)
22021 Latin proverb: -{Ne nuntium necare}-
22023 <p>Latin proverb: Ne nuntium necare
22026 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22031 Prevent conversion with -{}- tags (language variants)
22033 language=sr variant=sr-ec
22035 Latinski: -{Ne nuntium necare}-
22037 <p>Латински: Ne nuntium necare
22040 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22045 Prevent conversion of text with -{}- tags (language variants)
22047 language=sr variant=sr-ec
22049 Latinski: -{Ne nuntium necare}-
22051 <p>Латински: Ne nuntium necare
22054 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
22059 Prevent conversion of links with -{}- tags (language variants)
22061 language=sr variant=sr-ec
22065 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
22068 <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>
22073 -{}- tags within headlines (within html for parserConvert())
22075 wgFragmentMode=[ 'html5', 'legacy' ]
22077 language=sr variant=sr-ec
22081 Note that even an unprotected headline ID is not affected by language
22086 <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>
22087 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
22090 <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>
22093 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span> <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span> </h2>
22095 <p>Note that even an unprotected headline ID is not affected by language
22098 <h2 id="Latinski">Latinski</h2>
22102 Explicit definition of language variant alternatives
22104 language=zh variant=zh-tw
22106 -{zh:China;zh-tw:Taiwan}-, not China
22108 <p>Taiwan, not China
22111 <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>
22115 Filter syntax for language variants
22117 language=zh variant=zh-tw
22119 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
22121 <p>fooblog, WEBJOURNAL, WEBLOGquux
22124 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
22127 # Note that Parsoid post-processing for language variants needs to
22128 # update the `title` attribute here, based on the mw:ExpandedAttrs property
22130 Conversion around HTML tags
22132 language=sr variant=sr-ec
22134 -{H|span=>sr-ec:script;title=>sr-ec:src}-
22135 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
22138 <span title="ЛаCтин">ски</span>
22141 <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"}]}'/>
22142 <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>
22146 Explicit session-wise two-way language variant mapping (A flag and - flag)
22148 language=zh variant=zh-tw
22150 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
22152 Taiwan is not China.
22154 But -{A|zh:China; zh-tw:Taiwan}- is China,
22156 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
22158 and -{China}- is China.
22160 <p>This is Taiwan, but we'll forget that now.
22161 </p><p>Taiwan is not China.
22162 </p><p>But Taiwan is Taiwan,
22163 </p><p>(This should be stripped!)
22164 </p><p>and China is China.
22167 <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>
22168 <p>Taiwan is not China.</p>
22169 <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>
22170 <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>
22171 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
22175 Explicit session-wise one-way language variant mapping (A flag and - flag)
22177 language=zh variant=zh-tw
22179 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
22181 COUNTRY is China or Taiwan.
22183 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
22185 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22187 and -{COUNTRY}- is COUNTRY.
22189 <p>This is Taiwan, but we'll forget that now.
22190 </p><p>COUNTRY is China or Taiwan.
22191 </p><p>But Taiwan is Taiwan,
22192 </p><p>(This should be stripped!)
22193 </p><p>and COUNTRY is COUNTRY.
22196 <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>
22197 <p>COUNTRY is China or Taiwan.</p>
22198 <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>
22199 <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>
22200 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22204 Explicit session-wise two-way language variant mapping (H flag for hide)
22206 language=zh variant=zh-tw
22208 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22212 <p>(This should be stripped!)
22213 </p><p>Taiwan is Taiwan.
22216 <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>
22217 <p>Taiwan is China.</p>
22221 Explicit session-wise one-way language variant mapping (H flag for hide)
22223 language=zh variant=zh-tw
22225 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22227 COUNTRY is Taiwan or China.
22229 <p>(This should be stripped!)
22230 </p><p>Taiwan is Taiwan or China.
22233 <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>
22234 <p>COUNTRY is Taiwan or China.</p>
22237 ## Note that parsoid test runner does not support 'showtitle' option.
22239 Adding explicit conversion rule for title (T flag)
22241 language=zh variant=zh-tw showtitle
22243 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22248 <p>Should be stripped!
22249 </p><p>Taiwan is China.
22252 <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>
22253 <p>Taiwan is China.</p>
22257 Code coverage: T combined with H flag
22259 language=zh variant=zh-tw showtitle
22261 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22266 <p>Should be stripped!
22267 </p><p>Taiwan is Taiwan.
22270 <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>
22271 <p>Taiwan is China.</p>
22275 Code coverage: T with no variants
22277 language=zh variant=zh-tw showtitle
22279 -{H|zh:China; zh-tw:Taiwan}-
22280 Taiwan is China.-{T|Taiwan is China}-
22287 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22288 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22292 Code coverage: rules with no variants
22294 language=zh variant=zh-tw
22296 -{H|zh:China; zh-tw:Taiwan}-
22307 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22309 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22310 Taiwan is China.</p>
22315 Code coverage: D flag for conversion rule
22317 language=zh variant=zh-tw
22319 -{D|zh-cn:XA; zh-tw:YA}-
22320 -{A;D|zh-cn:XB; zh-tw:YB}-
22321 -{D;H|zh-cn:XC; zh-tw:YC}-
22323 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22329 XA XB XC YA YB YC FOO BAR BAT 012345
22334 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22338 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22341 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22342 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22343 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22344 <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>
22345 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22346 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22347 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22348 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22352 Code coverage: N flag for conversion rule
22354 language=zh variant=zh-cn
22364 </p><p>српски (ћирилица)
22367 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22368 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22369 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22372 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22374 Code coverage: N flag for conversion rule (wt2html only)
22376 language=zh variant=zh-cn
22377 parsoid=wt2html,html2html
22384 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22388 Testing that changing the language variant here in the tests actually works
22390 language=zh variant=zh showtitle
22392 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22395 <p>Should be stripped!
22398 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22402 Recursive conversion of alt and title attrs shouldn't clear converter state
22404 language=zh variant=zh-cn
22407 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22408 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22412 Should be stripped<span title="Exclamation">!</span>
22415 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22416 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>
22420 T26072: more test on conversion rule for title
22422 language=zh variant=zh-tw showtitle
22424 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22426 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22429 <p>This should be stripped!
22430 </p><p>This won't take interferes with the title rule.
22433 <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>
22434 <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>
22438 Partly disable title conversion if variant == main language code
22440 language=zh variant=zh title=[[ZH]] showtitle
22442 -{T|zh-cn:CN;zh-tw:TW}-
22448 <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>
22452 Partly disable title conversion if variant == main language code, more
22454 language=zh variant=zh title=[[ZH]] showtitle
22462 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22466 Raw output of variant escape tags (R flag)
22468 language=zh variant=zh-tw
22470 Raw: -{R|zh:China;zh-tw:Taiwan}-
22472 <p>Raw: zh:China;zh-tw:Taiwan
22475 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22478 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22480 Raw output of variant escape tags (R flag) (wt2html only)
22482 language=zh variant=zh-tw
22483 parsoid=wt2html,html2html
22485 -{Variant}- -{D|syntax}- -{D;R|options}-
22487 <p>Variant syntax options
22490 <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>
22494 Nested markup inside raw output of variant escape tags (R flag)
22496 language=zh variant=zh-tw
22498 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22500 <p>Nested raw: nested Taiwan nested
22503 <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>
22507 Nested markup and spaces inside raw output of variant escape tags (R flag)
22509 language=zh variant=zh-tw
22511 X-{ outer -{ inner }- outer }-X
22513 <p>X outer inner outer X
22516 <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>
22520 Templates inside raw output of variant escape tags (R flag)
22522 language=zh variant=zh-tw
22524 Nested raw: -{R|nested {{echo|hi}} templates}-
22526 <p>Nested raw: nested hi templates
22529 <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>
22533 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22535 language=zh variant=zh-cn
22537 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22542 <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>
22546 Conversion rules from [numeric-only string] to [something else] (T48634)
22548 language=zh variant=zh-cn
22550 -{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
22555 <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>
22559 Two-way converter rule entries with an empty value should be ignored (T53551)
22561 language=zh variant=zh-cn
22563 -{H|zh-cn:foo;zh-tw:;}-foobar
22568 <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>
22572 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22574 language=zh variant=zh-cn
22576 -{H|=>zh-cn:foo;}-foobar
22581 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22585 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22587 language=zh variant=zh-cn
22594 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22598 Nested using of manual convert syntax
22600 language=zh variant=zh-hk
22602 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22604 <p>Nested: Hello Hong Kong!
22607 <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>
22611 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22613 language=zh variant=zh-cn
22615 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22617 <p><span title="X">A</span>
22620 <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>
22624 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22626 language=zh variant=zh-cn
22628 -{<span title="-{X}-">A</span>}-
22629 !! html/php+disabled
22630 <p><span title="X">A</span>
22633 <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>
22636 # Parsoid and PHP disagree on how to parse this example: Parsoid
22637 # insists that the content of a language converter element be a valid
22638 # DOM fragment or attribute string
22640 Language converter markup with block content
22642 language=zh variant=zh-cn
22644 <span>a-{b<div>c}-d
22646 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22648 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22650 <p><span>ab</span></p>
22651 <div><span>cd <span>ab</span></span>
22652 <div><span>cd <span>ad</span></span></div>
22655 <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>
22657 <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>
22659 <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>
22663 LanguageConverter selser (1)
22665 language=zh variant=zh-cn
22667 "modes": ["wt2wt", "selser"],
22669 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22679 LanguageConverter selser (2)
22681 language=zh variant=zh-cn
22683 "modes": ["wt2wt", "selser"],
22685 ["span[class='x']", "contents", "text", "-{foo}-"],
22686 ["a", "contents", "text", "-{"],
22687 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22691 <span class="x">TEXT1</span>
22692 [http://example.com TEXT2]
22696 <span class="x"><nowiki>-{foo}-</nowiki></span>
22697 [http://example.com -{]
22698 [[Foo|<nowiki>-{</nowiki>]]
22699 {{1x|<nowiki>-{</nowiki>}}
22702 # Tests LanguageVariantText in ConstrainedText
22704 LanguageConverter selser (3)
22706 language=zh variant=zh-cn
22708 "modes": ["wt2wt", "selser"],
22710 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22711 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22722 |<nowiki/>-{edited}-
22726 # Tests LanguageVariantText._fromSelSer
22728 LanguageConverter selser (4)
22730 language=zh variant=zh-cn
22732 "modes": ["wt2wt", "selser"],
22734 ["td > span.x", "remove"]
22740 |<span class="x">Foo</span>-{Bar}-
22741 ||<span class="x">Foo</span>-{Bar}-
22751 # Since Parsoid is starting to emit canonical wikitext for links,
22752 # [http://example.com http://example.com] will not RT back to that
22754 # Parsoid does not language-convert links (it is done in a
22755 # post-processing step)
22757 Proper conversion of text in external links
22759 language=sr variant=sr-ec
22762 http://www.google.com
22763 gopher://www.google.com
22764 [http://www.google.com http://www.google.com]
22765 [gopher://www.google.com gopher://www.google.com]
22766 [https://www.google.com irc://www.google.com]
22767 [ftp://www.google.com www.google.com/ftp://dir]
22768 [//www.google.com www.google.com]
22770 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22771 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22772 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22773 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22774 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22775 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22776 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22779 <p><a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22780 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22781 <a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>
22782 <a rel="mw:ExtLink" href="gopher://www.google.com">gopher://www.google.com</a>
22783 <a rel="mw:ExtLink" href="https://www.google.com">irc://www.google.com</a>
22784 <a rel="mw:ExtLink" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22785 <a rel="mw:ExtLink" href="//www.google.com">www.google.com</a></p>
22789 Do not convert roman numbers to language variants
22791 language=sr variant=sr-ec
22795 <p>Фридрих IV је цар.
22798 <p>Fridrih IV je car.</p>
22802 Unclosed language converter markup "-{"
22813 Don't convert raw rule "-{R|=>}-" to "=>"
22822 <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>
22826 Don't break link parsing if language converter markup is in the caption.
22828 language=sr variant=sr-ec
22830 [[Main Page|-{R|main page}-]]
22832 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22835 <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>
22839 T146304: Don't break template parsing if language converter markup is in the parameter.
22841 language=sr variant=sr-ec
22848 <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>
22852 T146305: Don't break image parsing if language converter markup is in the caption.
22856 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22858 <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>
22861 <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>
22865 T146305: Don't break image parsing if nested language converter markup is in the caption.
22867 language=zh variant=zh-cn
22869 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22871 <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>
22874 <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>
22877 # XXX html2wt disabled because rich markup in alt is not preserved.
22879 Don't break gallery if language converter markup is inside.
22884 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22885 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22888 <ul class="gallery mw-gallery-traditional">
22889 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22890 <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>
22891 <div class="gallerytext">
22892 <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>
22896 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22897 <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>
22898 <div class="gallerytext">
22899 <p>This is a test template
22906 <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"}}'>
22907 <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>
22908 <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>
22913 T153135: Don't break list handling if language converter markup is in the item.
22915 language=zh variant=zh-cn
22917 ;-{zh-cn:AAA;zh-tw:BBB}-
22921 <dt>foo:bar</dt></dl>
22924 <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>
22925 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22929 // Note that parsoid does not protect colons unless language converter
22930 // markup is properly nested, because it is a backtracking parser.
22932 T153135: Unclosed markup in definition list (code coverage)
22934 language=zh variant=zh-cn
22940 <dt><b>foo:bar</b></dt>
22941 <dt><b>-{zh-cn:AAA</b></dt>
22944 <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}'>
22945 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22946 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22951 T153135: Nested language converter markup in definition list (code coverage)
22953 language=zh variant=zh-cn
22955 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22957 <dl><dt>AAA foo:bar bat:baz</dt>
22961 <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>
22962 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22966 # html2wt mode disabled due to <nowiki> insertion.
22968 T153140: Don't break table handling if language converter markup is in the cell.
22970 language=sr variant=sr-ec
22971 parsoid=wt2html,wt2wt,html2html
22988 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22995 Language converter tricky html2wt cases (1)
22998 parsoid=html2wt,wt2wt
23000 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
23002 -{<nowiki>}-</nowiki>}-
23009 Language converter tricky html2wt cases (2)
23012 parsoid=html2wt,wt2wt
23016 <nowiki>-{foo}-</nowiki>
23018 <p>-{foo}-
23023 Language converter tricky html2wt cases (3)
23026 parsoid=html2wt,wt2wt
23028 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
23029 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
23030 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
23036 -{<nowiki>-{foo}-</nowiki>}-
23040 </p><p>-{foo}-
23045 Language converter tricky html2wt cases (4)
23048 parsoid=html2wt,wt2wt
23050 <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>
23058 # Note that the <nowiki> escaping added by parsoid for source text,
23059 # destination text, and language names only works on the PHP side
23060 # for *destination text*. (HTML entity escaping wouldn't work
23061 # any better.) This is probably a bug, at least for source texts.
23062 # (For language names PHP uses a precise regexp based on the languages
23063 # it currently knows have variants, which is fragile since this set
23064 # can grow/shrink over time.)
23066 Language converter tricky html2wt cases (5)
23068 language=zh variant=zh-cn
23070 <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>
23071 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
23072 <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>
23073 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
23076 -{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
23078 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
23080 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
23082 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
23085 !! html/php+disabled
23086 <p>foobat;xyz=>zh-cn:abc
23090 </p><p>a:b=>c 0;zh-tw:bar
23095 T179579: Nowiki and lc interaction
23102 -{123<nowiki>|</nowiki>456}-
23104 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
23106 <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>
23110 T2529: Uncovered bullet
23119 # Plain MediaWiki does not remove empty lists, but tidy actually does.
23120 # Templates in Wikipedia rely on this behavior, as tidy has always been
23121 # enabled there. These tests are normally run *without* tidy, so specify the
23122 # full output here.
23123 # To test realistic parsing behavior, apply a tidy-like transformation to both
23124 # the expected output and your parser's output.
23126 T2529: Uncovered bullet leaving empty list, normally removed by tidy
23128 ******* Foo {{bullet}}
23130 <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>
23136 T2529: Uncovered table already at line-start
23159 T2529: Uncovered bullet in parser function result
23161 * Foo {{lc:{{bullet}} }}
23169 T7678: Double-parsed template argument
23171 {{lc:{{{1}}}|hello}}
23178 T7678: Double-parsed template invocation
23180 {{lc:{{paramtest {{!}} param = hello }} }}
23182 <p>{{paramtest | param = hello }}
23187 Case insensitivity of parser functions for non-ASCII characters (T10143)
23190 title=[[Main Page]]
23192 {{PRVNÍVELKÉ:ěščř}}
23193 {{prvnívelké:ěščř}}
23213 Morwen/13: Unclosed link followed by heading
23220 <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>
23225 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23232 <h1><span class="mw-headline" id="heading">heading</span></h1>
23237 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23244 <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>
23259 Paragraphs inside divs (no extra line breaks)
23271 Paragraphs inside divs (extra line break on open)
23286 Paragraphs inside divs (extra line break on close)
23301 Paragraphs inside divs (extra line break on open and close)
23318 Nesting tags, paragraphs on lines which begin with <div>
23320 <div></div><strong>A
23323 <p><strong>A</strong></p>
23324 <p><strong>B</strong></p>
23332 # T8200: <blockquote> should behave like <div> with respect to line breaks
23334 T8200: paragraphs inside blockquotes (no extra line breaks)
23336 <blockquote>Line one
23338 Line two</blockquote>
23340 <blockquote>Line one
23341 Line two</blockquote>
23345 <p>Line one Line two</p>
23350 T8200: paragraphs inside blockquotes (extra line break on open)
23355 Line two</blockquote>
23360 Line two</blockquote>
23365 Line two</blockquote>
23369 T8200: paragraphs inside blockquotes (extra line break on close)
23371 <blockquote>Line one
23376 <blockquote>Line one
23389 T8200: paragraphs inside blockquotes (extra line break on open and close)
23411 Paragraphs inside blockquotes/divs (no extra line breaks)
23413 <blockquote><div>Line one
23415 Line two</div></blockquote>
23417 <blockquote><div>Line one
23418 Line two</div></blockquote>
23423 Paragraphs inside blockquotes/divs (extra line break on open)
23428 Line two</div></blockquote>
23433 Line two</div></blockquote>
23438 Paragraphs inside blockquotes/divs (extra line break on close)
23440 <blockquote><div>Line one
23443 </div></blockquote>
23445 <blockquote><div>Line one
23448 </div></blockquote>
23453 Paragraphs inside blockquotes/divs (extra line break on open and close)
23459 </div></blockquote>
23465 </div></blockquote>
23470 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23472 wgLinkHolderBatchSize=0
23478 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23479 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23480 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23485 Free external link invading image caption
23487 [[Image:Foobar.jpg|thumb|http://x|hello]]
23489 <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>
23494 T17196: localised external link numbers
23498 [http://en.wikipedia.org/]
23500 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23503 <p><a rel="mw:ExtLink" href="http://en.wikipedia.org/"></a></p>
23507 Multibyte character in padleft
23509 {{padleft:-Hello|7|Æ}}
23516 Multibyte character in padright
23518 {{padright:Hello-|7|Æ}}
23525 formatdate parser function
23527 {{#formatdate:2009-03-24}}
23529 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23534 formatdate parser function, with default format
23536 {{#formatdate:2009-03-24|mdy}}
23538 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23543 Spacing of numbers in formatted dates
23545 {{#formatdate:January 15}}
23547 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23552 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
23554 language=nl title=[[MediaWiki:Common.css]]
23556 {{#formatdate:2009-03-24|dmy}}
23558 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23571 Edit comment with link
23575 I like the [[Main Page]] a lot
23577 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23581 Edit comment with link and link text
23585 I like the [[Main Page|best pages]] a lot
23587 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23591 Edit comment with link and link text with suffix
23595 I like the [[Main Page|best page]]s a lot
23597 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23601 Edit comment with section link (non-local, eg in history list)
23603 comment title=[[Main Page]]
23605 /* External links */ removed bogus entries
23607 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23611 Edit comment with section link and text before it (non-local, eg in history list)
23613 comment title=[[Main Page]]
23615 pre-comment text /* External links */ removed bogus entries
23617 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>
23621 Edit comment with section link (local, eg in diff view)
23623 comment local title=[[Main Page]]
23625 /* External links */ removed bogus entries
23627 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23631 Edit comment with subpage link (T16080)
23635 title=[[Subpage test]]
23637 Poked at a [[/subpage]] here...
23639 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23643 Edit comment with subpage link and link text (T16080)
23647 title=[[Subpage test]]
23649 Poked at a [[/subpage|neat little page]] here...
23651 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23655 Edit comment with bogus subpage link in non-subpage NS (T16080)
23658 title=[[Subpage test]]
23660 Poked at a [[/subpage]] here...
23662 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23666 Edit comment with bare anchor link (local, as on diff)
23670 title=[[Main Page]]
23674 <a href="#section">#section</a>
23678 Edit comment with bare anchor link (non-local, as on history)
23681 title=[[Main Page]]
23685 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23689 Anchor starting with underscore
23695 <p><a href="#_ref">One</a>
23698 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23702 Id starting with underscore
23704 <div id="_ref"></div>
23706 <div id="_ref"></div>
23711 Edit comment with link with more than one pipe (T99346)
23715 [[Main Page|Many|pipes]]
23717 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23721 Complex edit comment with link with more than one pipe (T99346)
23725 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23727 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..."
23731 Space normalisation on autocomment (T24784)
23734 title=[[Main Page]]
23736 /* __hello__world__ */
23738 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23742 percent-encoding and + signs in comments (T28410)
23746 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23748 <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>
23751 # Parsoid doesn't support this yet: see T75581
23752 # but it *should* omit the 'src' attribute if the image is bad.
23753 # PHP side of tests was disabled in
23754 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23755 # because of issues in the PHP parserTests infrastructure
23756 # (but the output below is indeed what the PHP side emits)
23758 Bad images - basic functionality
23761 !! DISABLED/html/php
23763 <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>
23767 Bad images - T18039: text after bad image disappears
23772 !! DISABLED/html/php
23778 <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>
23783 Verify that displaytitle works (T24501) no displaytitle
23787 wgAllowDisplayTitle=true
23788 wgRestrictDisplayTitle=false
23790 this is not the the title
23793 <p>this is not the the title
23798 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23803 wgAllowDisplayTitle=true
23804 wgRestrictDisplayTitle=false
23806 this is not the the title
23807 {{DISPLAYTITLE:whatever}}
23810 <p>this is not the the title
23815 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23820 wgAllowDisplayTitle=true
23821 wgRestrictDisplayTitle=true
23823 this is not the the title
23824 {{DISPLAYTITLE:whatever}}
23827 <p>this is not the the title
23832 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23837 wgAllowDisplayTitle=true
23838 wgRestrictDisplayTitle=true
23840 this is not the the title
23841 {{DISPLAYTITLE:screen}}
23844 <p>this is not the the title
23849 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23854 wgAllowDisplayTitle=false
23856 this is not the the title
23857 {{DISPLAYTITLE:screen}}
23860 <p>this is not the the title
23861 <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>
23866 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23871 wgAllowDisplayTitle=false
23873 this is not the the title
23876 <p>this is not the the title
23881 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23886 wgAllowDisplayTitle=true
23887 wgRestrictDisplayTitle=true
23889 this is not the the title
23890 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23892 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23893 <p>this is not the the title
23898 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23903 wgAllowDisplayTitle=true
23904 wgRestrictDisplayTitle=true
23906 this is not the the title
23907 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23909 <span style="color: red;">s</span>creen
23910 <p>this is not the the title
23915 Page status indicators: Empty name is invalid
23919 <indicator name=" "></indicator>
23920 <indicator></indicator>
23922 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23923 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23928 Page status indicators: Weird syntaxes that are okay
23932 <indicator name="empty" />
23933 <indicator name="name"></indicator>
23942 Page status indicators: Torture test
23946 <indicator name="01">hello world</indicator>
23947 <indicator name="02">[[Main Page]]</indicator>
23948 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23949 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23950 <indicator name="05">* foo
23952 <indicator name="06"><nowiki>foo</nowiki></indicator>
23953 <indicator name="07"> Preformatted</indicator>
23954 <indicator name="08"><div>Broken tag</indicator>
23955 <indicator name="09">{| class=wikitable
23958 <indicator name="10">Two
23960 paragraphs</indicator>
23963 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23964 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" />
23965 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>
23966 05=<ul><li> foo</li>
23970 07=<pre>Preformatted
23972 08=<div>Broken tag</div>
23974 09=<table class="wikitable">
23991 preload: check <noinclude> and <includeonly>
23995 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
24001 preload: check <onlyinclude>
24005 Goodbye <onlyinclude>Hello world</onlyinclude>
24011 preload: can pass tags through if we want to
24015 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
24017 <includeonly>Hello world</includeonly>
24021 preload: check that it doesn't try to do tricks
24025 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24027 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
24031 Play a bit with r67090 and T5158
24033 <div style="width:50% !important"> </div>
24034 <div style="width:50% !important"> </div>
24035 <div style="width:50% !important"> </div>
24036 <div style="border : solid;"> </div>
24038 <div style="width:50% !important"> </div>
24039 <div style="width:50% !important"> </div>
24040 <div style="width:50% !important"> </div>
24041 <div style="border : solid;"> </div>
24044 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24045 <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>
24046 <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>
24047 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
24052 HTML5 data attributes
24054 <span data-foo="bar">Baz</span>
24055 <p data-abc-def_hij="">Quuz</p>
24057 <p><span data-foo="bar">Baz</span>
24059 <p data-abc-def_hij="">Quuz</p>
24062 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
24063 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
24067 Strip reserved data attributes
24069 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
24071 <div data-ok="fred">d</div>
24074 <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>
24078 percent-encoding and + signs in internal links (T28410)
24080 [[User:+%]] [[Page+title%]]
24081 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
24082 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
24083 [[%33%45]] [[%33%45+]]
24085 <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>
24086 <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>
24087 <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>
24088 <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>
24091 <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>
24092 <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>
24093 <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>
24094 <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>
24098 Special characters in embedded file links (T29679)
24100 [[File:Contains & ampersand.jpg]]
24101 [[File:Does not exist.jpg|Title with & ampersand]]
24103 <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>
24104 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
24107 <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>
24108 <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>
24112 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
24114 Text's been normalized?
24116 <p>Text's been normalized?
24121 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
24123 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
24125 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
24130 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
24132 [http://www.example.org/ ideograms]
24134 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
24139 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
24141 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
24143 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
24167 T33098 Template which includes system messages which includes the template
24171 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24172 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
24177 T33490 Turkish: ucfirst 'blah'
24188 T33490 Turkish: ucfirst 'ix'
24199 T33490 Turkish: lcfirst 'BLAH'
24210 T33490 Turkish: ucfırst (with a dotless i)
24216 <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>
24221 T33490 ucfırst (with a dotless i) with English language
24227 <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>
24231 # Note that Parsoid doesn't emit an explicit TOC.
24232 # Note also that the html2wt direction tends to emit an extra newline
24233 # between the __TOC__ magicword and the first heading unless *both*
24234 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24238 T28375: TOC with italics
24240 title=[[Main Page]]
24243 == ''Lost'' episodes ==
24245 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24247 <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>
24251 <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>
24254 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24255 <h2 id="Lost_episodes" data-parsoid='{}'> <i>Lost</i> episodes </h2>
24259 T28375: TOC with bold
24261 title=[[Main Page]]
24264 == '''should be bold''' then normal text ==
24266 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24268 <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>
24272 <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>
24275 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24276 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'> <b>should be bold</b> then normal text </h2>
24280 T35845: Headings become cursive in TOC when they contain an image
24282 title=[[Main Page]]
24285 == Image [[Image:foobar.jpg]] ==
24287 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24289 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24293 <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>
24296 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24297 <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>
24301 T35845 (2): Headings become bold in TOC when they contain a blockquote
24303 title=[[Main Page]]
24306 == <blockquote>Quote</blockquote> ==
24308 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24310 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24314 <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>
24318 <div id="toc" class="toc">
24319 <div class="toctitle" lang="en" dir="ltr" xml:lang="en">
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"></span></h2>
24329 <p><span class="mw-headline" id="Quote">Quote</span></p>
24331 <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>
24333 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24334 <h2 id="Quote" data-parsoid='{}'> <blockquote>Quote</blockquote> </h2>
24338 Unclosed tags in TOC
24340 wgFragmentMode=[ 'html5', 'legacy' ]
24342 title=[[Main Page]]
24346 <small>Hanc marginis exiguitas non caperet.</small>
24349 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24351 <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>
24355 <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>
24356 <p><small>Hanc marginis exiguitas non caperet.</small>
24360 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24361 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span> Proof: 2 < 3 </h2>
24362 <p><small>Hanc marginis exiguitas non caperet.</small>
24367 Multiple tags in TOC
24370 == <i>Foo</i> <b>Bar</b> ==
24372 == <i>Foo</i> <blockquote>Bar</blockquote> ==
24374 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24376 <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>
24377 <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>
24381 <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>
24382 <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>
24386 <div id="toc" class="toc">
24387 <div class="toctitle" lang="en" dir="ltr" xml:lang="en">
24391 <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>
24392 <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>
24396 <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>
24397 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i></span></h2>
24399 <p><span class="mw-headline" id="Foo_Bar_2">Bar</span></p>
24401 <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>
24403 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24404 <h2 id="Foo_Bar" data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b> </h2>
24406 <h2 id="Foo_Bar_2" data-parsoid='{}'> <i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote> </h2>
24409 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24410 # html5 tag parsing.
24412 Tags with parameters in TOC
24417 == <sup class="in-h2">Hello</sup> ==
24419 == <sup class="a > b">Evilbye</sup> ==
24421 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24423 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24424 <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>
24428 <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>
24429 <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>
24432 <meta property="mw:PageProp/toc" />
24433 <h2 id="Hello"> <sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup> </h2>
24435 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span> <sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup> </h2>
24439 span tags with directionality in TOC
24442 == <span dir="ltr">C++</span> ==
24444 == <span dir="rtl">זבנג!</span> ==
24446 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
24448 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
24450 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
24452 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24454 <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>
24455 <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>
24456 <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>
24457 <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>
24458 <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>
24462 <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>
24463 <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>
24464 <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>
24465 <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>
24466 <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>
24469 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24470 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span> <span dir="ltr">C++</span> </h2>
24471 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span> <span dir="rtl">זבנג!</span> </h2>
24472 <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>
24473 <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>
24474 <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>
24478 T74884: bdi element in ToC
24481 == <bdi>test</bdi> ==
24483 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24485 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24489 <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>
24492 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24493 <h2 id="test" data-parsoid='{}'> <bdi>test</bdi> </h2>
24497 T35715: s/strike element in ToC
24500 == <s>test</s> test <strike>test</strike> ==
24502 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24504 <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>
24508 <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>
24511 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24512 <h2 id="test_test_test" data-parsoid='{}'> <s>test</s> test <strike>test</strike> </h2>
24515 # Note that the html output does not have the <p></p>, but the
24516 # html+tidy output *does*. This is because the empty <p></p> is
24517 # removed by the sanitizer, but only when tidy is *not* enabled (!).
24519 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24524 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24526 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24530 <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>
24534 <div id="toc" class="toc">
24535 <div class="toctitle" lang="en" dir="ltr" xml:lang="en">
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>
24545 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24546 <h2 id="x" data-parsoid='{}'> x </h2>
24552 == {{int:headline_sample}} ==
24556 T34057: Title needed when expanding <h> nodes.
24558 title=[[Main Page]]
24562 <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>
24567 Strip marker in urlencode
24569 {{urlencode:x<nowiki/>y}}
24570 {{urlencode:x<nowiki/>y|wiki}}
24571 {{urlencode:x<nowiki/>y|path}}
24572 {{urlencode:x<pre id="one">two</pre>y}}
24600 Strip marker in formatNum
24602 {{formatnum:1<nowiki/>2}}
24603 {{formatnum:1<nowiki/>2|R}}
24611 Check noCommafy in formatNum
24615 {{formatnum:123456.78}}
24616 {{formatnum:123456.78|NOSEP}}
24624 Wrong option for formatNum (T58199)
24626 {{formatnum:1,234.56|Random}}
24627 {{formatnum:1,234.56|EVERYTHING}}
24628 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24637 Strip marker in grammar
24641 {{grammar:elative|foo<nowiki/>bar}}
24648 Strip marker in padleft
24650 {{padleft:|2|x<nowiki/>y}}
24657 Strip marker in padright
24659 {{padright:|2|x<nowiki/>y}}
24666 Strip marker in anchorencode
24668 {{anchorencode:x<nowiki/>y}}
24673 <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>
24677 nowiki inside link inside heading (T20295)
24679 ==[[foo|x<nowiki>y</nowiki>z]]==
24681 <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>
24686 new support for bdi element (T33817)
24688 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24690 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24695 Ignore pipe between table row attributes
24699 |- id=foo | style='color: red'
24707 <tr id="foo" style="color: red">
24714 Language parser function
24723 Padleft and padright as substr
24725 {{padleft:|3|abcde}}
24726 {{padright:|3|abcde}}
24734 Special parser function
24736 {{#special:RandomPage}}
24737 {{#special:BaDtItLe}}
24738 {{#special:Foobar}}
24747 T36939 - Case insensitive link parsing ([HttP://])
24749 [HttP://MediaWiki.Org/]
24751 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24754 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/"></a></p>
24758 T36939 - Case insensitive link parsing ([HttP:// title])
24760 [HttP://MediaWiki.Org/ MediaWiki]
24762 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24767 T36939 - Case insensitive link parsing (HttP://)
24769 HttP://MediaWiki.Org/
24771 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24774 <p><a rel="mw:ExtLink" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24792 <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>
24793 <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>
24794 <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>
24795 <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>
24796 <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>
24802 ### Parsoid-specific tests
24803 ### Parsoid-PHP parser incompatibilities
24806 1. SOL-sensitive wikitext tokens as template-args
24808 parsoid=wt2html,wt2wt
24814 <span about="#mwt1" typeof="mw:Transclusion">
24815 </span><ul about="#mwt1"><li>a</li>
24817 <span about="#mwt2" typeof="mw:Transclusion">
24818 </span><ol about="#mwt2"><li>a</li>
24820 <span about="#mwt3" typeof="mw:Transclusion">
24821 </span><dl about="#mwt3"><dd>a</dd>
24825 #### -----------------------------------------------------------------
24826 #### Parsoid-specific functionality tests
24827 #### -----------------------------------------------------------------
24829 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24830 # We know wt2wt will fail, but we expect selser to pass.
24831 # Due to the nature of our testing, wt2wt and selser tests will enter the
24832 # blacklist and we'll catch selser regressions based on changes to the
24833 # blacklist entries for selser tests.
24835 1. Bad treebuilder fixup of formatting elt is cleaned up
24837 parsoid=wt2html,wt2wt
24842 [[Image:Foobar.jpg|right|Test]]
24849 <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>
24856 2. Bad treebuilder fixup of formatting elt is cleaned up
24858 parsoid=wt2html,wt2wt
24860 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24862 <small>[[Image:Foobar.jpg|right|300px]]</small>
24866 <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>
24868 <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>
24872 3. Bad treebuilder fixup of formatting elt is cleaned up
24874 parsoid=wt2html,wt2wt
24876 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24878 <p><small><b>foo</b></small></p>
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><small><b>caption</b></small></figcaption></figure>
24880 <p><small><b>bar</b></small></p>
24884 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24886 parsoid=wt2html,wt2wt
24888 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24890 <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>
24893 #### ----------------------------------------------------------------
24894 #### Parsoid-only testing of Parsoid's impl of LST
24895 #### Not implemented yet, see
24896 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24897 #### ----------------------------------------------------------------
24899 ## We still need to support serializing the older format while content is stored.
24901 LST Sections: Backwards compatibility
24904 "suppressErrors": true,
24905 "modes": ["html2wt"]
24908 <section begin="2011-05-16" />
24909 <section end="2014-04-10 (MW 1.23wmf22)" />
24911 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24912 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24916 LST Sections: Newfangled approach
24918 <section begin="2011-05-16" />
24919 <section end="2014-04-10 (MW 1.23wmf22)" />
24921 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24923 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24927 #--------- Test stripping of empty nodes in template content ----------
24930 Empty LI and TR nodes should be stripped from template content
24935 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24939 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24952 Empty LI and TR nodes should not be stripped from top-level content
24965 <li class='mw-empty-elt'></li>
24970 <tr class='mw-empty-elt'></tr>
24979 Empty TR nodes should not be stripped if they have any attributes set
24981 {{EmptyTRWithHTMLAttrTest}}
24983 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24984 <tr align='center'></tr>
24985 <tr><td>foo</td></tr>
24986 <tr align='center'></tr>
24987 <tr><td>bar</td></tr>
24991 #### ----------------------------------------------------------------
24992 #### The following section of tests are primarily to test
24993 #### wikitext escaping capabilities of Parsoid. Given that
24994 #### escaping can be done any number of ways, the wikitext (input)
24995 #### is always adjusted to reflect how Parsoid adds nowiki
24998 #### We are marking several tests as parsoid-only since the
24999 #### HTML in the result section is different from what the
25000 #### PHP parser generates for it.
25001 #### ----------------------------------------------------------------
25004 #### --------------- Headings ---------------
25006 #### 1. Nested inside html <h1>=foo=</h1>
25007 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
25008 #### 3. Nested inside html with wikitext split by html tags
25009 #### 4. No escape needed
25010 #### 5. Empty headings <h1></h1>
25011 #### 6. Heading chars in SOL context
25012 #### ----------------------------------------
25014 Headings: 0. Unnested
25024 <p>=foo<i>a</i>=</p>
25026 <nowiki>=foo=</nowiki>
25028 <nowiki> </nowiki>=foo=
25030 <nowiki>=foo=</nowiki>
25032 =foo''a''<nowiki>=</nowiki>
25035 # New headings and existing headings are handled differently
25037 Headings: 1. Nested inside html
25045 <h1 data-parsoid=''>=foo=</h1>
25046 <h2 data-parsoid=''>=foo=</h2>
25047 <h3 data-parsoid=''>=foo=</h3>
25048 <h4 data-parsoid=''>=foo=</h4>
25049 <h5 data-parsoid=''>=foo=</h5>
25050 <h6 data-parsoid=''>=foo=</h6>
25058 =<nowiki>=foo=</nowiki>=
25059 ==<nowiki>=foo=</nowiki>==
25060 ===<nowiki>=foo=</nowiki>===
25061 ====<nowiki>=foo=</nowiki>====
25062 =====<nowiki>=foo=</nowiki>=====
25063 ======<nowiki>=foo=</nowiki>======
25068 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
25077 <nowiki>*</nowiki>bar
25083 <nowiki>=bar=</nowiki>
25087 Headings: 3. Nested inside html with wikitext split by html tags
25091 <h1>=<b>bold</b>foo=</h1>
25093 = ='''bold'''foo= =
25097 Headings: 4a. No escaping needed (testing just h1 and h2)
25108 <h1><i>=</i>foo=</h1>
25128 Headings: 4b. No escaping needed (inside p-tags)
25145 Headings: 4c. Short headings (1)
25152 <nowiki>===</nowiki>
25158 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
25160 Headings: 4d. Short headings (2)
25162 parsoid=wt2html,html2html
25173 <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>
25174 <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>
25175 <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>
25180 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
25181 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
25182 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
25186 Headings: 5. Empty headings
25190 <h1 data-parsoid='{}'></h1>
25192 <h2 data-parsoid='{}'></h2>
25194 <h3 data-parsoid='{}'></h3>
25196 <h4 data-parsoid='{}'></h4>
25198 <h5 data-parsoid='{}'></h5>
25200 <h6 data-parsoid='{}'></h6>
25210 =====<nowiki/>=====
25212 ======<nowiki/>======
25216 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25226 <nowiki>=a=</nowiki>
25228 <nowiki>=a=</nowiki>
25230 <nowiki>=a=</nowiki>
25234 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25247 <nowiki>=a=</nowiki>
25250 <nowiki>=a=</nowiki>
25253 <nowiki>=a=</nowiki>
25258 Headings: 6c. Heading chars in SOL context (leading newline break)
25266 <nowiki>=b=</nowiki>
25270 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25274 <!--c0--><p>=a=</p>
25276 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25278 <!--c0--><nowiki>=a=</nowiki>
25280 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25284 Headings: 6d. Heading chars in SOL context (No escaping needed)
25294 Headings: 7. Insert a newline between new content and headings
25300 <h2 data-parsoid='{}'>A</h2>
25301 <p data-parsoid='{}'>a</p>
25311 #### --------------- Lists ---------------
25312 #### 0. Outside nests (*foo, etc.)
25313 #### 1. Nested inside html <ul><li>*foo</li></ul>
25314 #### 2. Inside definition lists
25315 #### 3. Only bullets at start should be escaped
25316 #### 4. No escapes needed
25317 #### 5. No unnecessary escapes
25318 #### 6. Escape bullets in SOL position
25319 #### 7. Escape bullets in a multi-line context
25320 #### ----------------------------------------
25323 Lists: 0. Outside nests
25333 <nowiki>*</nowiki>foo
25335 <nowiki>#</nowiki>foo
25337 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25340 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25341 ## to test wikitext escaping, and insignificant whitespace diffs
25342 ## cause PHP parser tests to barf
25344 Lists: 1. Nested inside html (No unnecessary escapes)
25353 <li data-parsoid='{}'>*foo</li>
25354 <li data-parsoid='{}'>#foo</li>
25355 <li data-parsoid='{}'>:foo</li>
25356 <li data-parsoid='{}'>;foo</li>
25364 <li data-parsoid='{}'>*foo</li>
25365 <li data-parsoid='{}'>#foo</li>
25366 <li data-parsoid='{}'>:foo</li>
25367 <li data-parsoid='{}'>;foo</li>
25374 *<nowiki>*foo</nowiki>
25375 *<nowiki>#foo</nowiki>
25376 *<nowiki>:foo</nowiki>
25377 *<nowiki>;foo</nowiki>
25383 #<nowiki>*foo</nowiki>
25384 #<nowiki>#foo</nowiki>
25385 #<nowiki>:foo</nowiki>
25386 #<nowiki>;foo</nowiki>
25390 Lists: 2. Inside definition lists
25394 <dl><dt>;foo</dt></dl>
25395 <dl><dt>:foo</dt></dl>
25398 <dl><dd>:foo</dd></dl>
25402 ; <nowiki>:foo</nowiki>
25404 ; <nowiki>:foo</nowiki>
25411 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25417 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25421 *<nowiki>*foo</nowiki>''it''*bar
25425 Lists: 4. No escapes needed
25438 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25442 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25456 Lists: 5. No unnecessary escapes
25460 <ul><li> bar <span>[[foo]]</span></li></ul>
25461 <ul><li> =bar <span>[[foo]]</span></li></ul>
25462 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25463 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25464 <ul><li> =bar <span>foo]]</span>=</li></ul>
25465 <ul><li> <s></s>: a</li></ul>
25466 <ul><li> <i>* foo</i></li></ul>
25469 * bar <span><nowiki>[[foo]]</nowiki></span>
25471 * =bar <span><nowiki>[[foo]]</nowiki></span>
25473 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25475 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25477 * =bar <span>foo]]</span>=
25485 Lists: 6. Escape bullets in SOL position
25489 <p><!--cmt-->*foo</p>
25491 <!--cmt--><nowiki>*</nowiki>foo
25495 Lists: 7. Escape bullets in a multi-line context
25504 <nowiki>*</nowiki>b
25508 Lists: 8. Escape colons only if not present in tags
25512 <dl><dt>a:b<i>c:d</i></dt></dl>
25514 ; <nowiki>a:b</nowiki>''c:d''
25517 #### --------------- HRs ---------------
25518 #### 1. Single line
25519 #### -----------------------------------
25522 HRs: 1. Single line
25530 ----<nowiki>----</nowiki>
25535 #### --------------- Tables ---------------
25536 #### 1a. Simple example
25537 #### 1b. No escaping needed (!foo)
25538 #### 1c. No escaping needed (|foo)
25539 #### 1d. No escaping needed (|}foo)
25541 #### 2a. Nested in td (<td>foo|bar</td>)
25542 #### 2b. Nested in td (<td>foo||bar</td>)
25543 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25545 #### 3a. Nested in th (<th>foo!bar</th>)
25546 #### 3b. Nested in th (<th>foo!!bar</th>)
25547 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25551 #### 4c. No escaping needed
25552 #### --------------------------------------
25555 Tables: 1a. Simple example
25563 <nowiki>{|</nowiki>
25568 Tables: 1b. No escaping needed
25579 Tables: 1c. No escaping needed
25590 Tables: 1d. No escaping needed
25601 Tables: 2a. Nested in td
25606 <td>foo|bar</td></tr>
25607 <tr><td>x<div>a|b</div></td>
25611 |<nowiki>foo|bar</nowiki>
25613 |x<div><nowiki>a|b</nowiki></div>
25629 Tables: 2b. Nested in td
25635 <td>a<i>b||c</i></td>
25636 <td>a<i><div>b||c</div></i></td>
25637 </tr></tbody></table>
25640 |<nowiki>foo||bar</nowiki>
25641 |a''<nowiki>b||c</nowiki>''
25642 |a''<div><nowiki>b||c</nowiki></div>''
25651 <td>a<i><div>b||c</div></i>
25657 Tables: 2c. Nested in td -- no escaping needed
25673 Tables: 3a. Nested in th
25689 Tables: 3b. Nested in th
25694 <tr><th>foo!!bar</th>
25695 <th><i>foo|bar</i></th>
25696 <th><i>foo!!bar</i></th>
25697 <th><i><span>foo!!bar</span></i></th>
25698 </tr></tbody></table>
25701 !<nowiki>foo!!bar</nowiki>
25702 !''<nowiki>foo|bar</nowiki>''
25703 !''<nowiki>foo!!bar</nowiki>''
25704 !''<span><nowiki>foo!!bar</nowiki></span>''
25713 <th><i>foo!!bar</i>
25715 <th><i><span>foo!!bar</span></i>
25721 Tables: 3c. Nested in th
25726 <tr><th>foo||bar</th>
25727 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25728 </tr></tbody></table>
25731 !<nowiki>foo||bar</nowiki>
25732 !<nowiki>foo||bar</nowiki>
25745 Tables: 4a. Escape -
25761 |<nowiki>-bar</nowiki>
25766 Tables: 4b. Escape +
25782 |<nowiki>+bar</nowiki>
25787 Tables: 4c. No escaping needed
25792 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25793 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25799 <div>a|b</div></td>
25844 Tables: 4d. No escaping needed
25849 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25850 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25851 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25862 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25872 T97430: Don't emit empty nowiki pairs around marker meta tags
25876 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25877 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25879 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25880 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25884 Unclosed xmlish element in table line shouldn't eat end delimiters
25889 <tbody><tr><td> <foo</td>
25890 <td> bar></td></tr>
25907 #### --------------- Links ----------------
25908 #### 1. Quote marks in link text
25909 #### 2. Wikilinks: Escapes needed
25910 #### 3. Wikilinks: No escapes needed
25911 #### 4. Extlinks: Escapes needed
25912 #### 5. Extlinks: No escapes needed
25913 #### --------------------------------------
25915 Links 1. WikiLinks: No escapes needed
25919 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25920 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25921 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25925 [[Foo|x [Foobar] x]]
25927 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25928 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25929 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25934 Links 2. WikiLinks: Escapes needed
25938 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25939 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25940 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25941 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25942 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25943 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25944 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25945 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25946 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25947 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25949 [[Foo|<nowiki>Foobar]</nowiki>]]
25950 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25951 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25952 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25953 [[Foo|<nowiki>|Bar</nowiki>]]
25954 [[Foo|<nowiki>]]bar</nowiki>]]
25955 [[Foo|<nowiki>[[bar</nowiki>]]
25956 [[Foo|<nowiki>x [[ y</nowiki>]]
25957 [[Foo|<nowiki>x ]] y</nowiki>]]
25958 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25960 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25961 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25962 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25963 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25964 <a href="/wiki/Foo" title="Foo">|Bar</a>
25965 <a href="/wiki/Foo" title="Foo">]]bar</a>
25966 <a href="/wiki/Foo" title="Foo">[[bar</a>
25967 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25968 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25969 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25974 Links 3. WikiLinks: No escapes needed
25978 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25979 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25984 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25985 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25990 Links 4. ExtLinks: Escapes needed
25994 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25995 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25996 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25997 <p>[http://google.com]</p>
25998 <p>[http://google.com google]</p>
25999 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
26000 <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>
26002 [http://google.com <nowiki>[google]</nowiki>]
26003 [http://google.com <nowiki>google]</nowiki>]
26004 [http://google.com <nowiki>goog] le</nowiki>]
26006 <nowiki>[http://google.com]</nowiki>
26008 <nowiki>[http://google.com google]</nowiki>
26010 [http://google.com<nowiki>]</nowiki>
26012 [{{echo|http://google.com}}<nowiki>]</nowiki>
26014 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
26015 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
26016 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
26017 </p><p>[http://google.com]
26018 </p><p>[http://google.com google]
26019 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26020 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
26025 Links 5. ExtLinks: No escapes needed
26029 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
26030 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
26032 [http://google.com [google]
26034 [[http://google.com]]
26036 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
26037 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
26042 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
26046 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
26047 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
26048 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
26049 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
26050 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
26051 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
26052 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26053 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
26054 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
26055 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
26056 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
26057 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
26058 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
26061 x<nowiki/>http://example.com<nowiki/>y
26062 http://example.com<nowiki/>?x
26063 http://example.com<nowiki/>&x
26064 http://example.com<nowiki/>'x
26065 http://example.com<nowiki/>,x
26066 http://example.com<nowiki/>.x
26067 http://example.com<nowiki/>;x
26068 http://example.com<nowiki/>:x
26069 http://example.com<nowiki/>;x
26070 http://example.com<nowiki/>!x
26071 http://example.com<nowiki/>=x
26072 http://example.com<nowiki/>(x)
26073 http://example.com(x<nowiki/>)
26077 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26082 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
26084 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
26085 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
26086 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
26087 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
26088 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
26094 "http://example.com"
26095 (http://example.com)
26096 (http://example.com) foo
26097 http://example.com,
26098 http://example.com, foo
26101 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
26103 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
26104 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
26105 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
26106 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
26107 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
26112 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
26116 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
26117 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
26119 http://example.com.,;:!?\
26120 -http://example.com:
26122 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
26123 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
26128 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
26132 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
26133 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
26134 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
26138 X<nowiki/>RFC 123<nowiki/>y
26142 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
26146 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
26147 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
26148 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
26155 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
26156 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
26157 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
26162 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
26166 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
26167 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26168 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
26172 X<nowiki/>PMID 123<nowiki/>y
26176 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
26180 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
26181 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
26182 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26189 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26190 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26191 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26196 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26200 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26201 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26202 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26205 ISBN 1234567890<nowiki/>1
26206 ISBN 1234567890<nowiki/>x
26207 a<nowiki/>ISBN 1234567890<nowiki/>b
26211 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26215 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26219 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26224 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26228 <p>this is not a link: http://example.com
26231 this is not a link: <nowiki>http://example.com</nowiki>
26235 Links 15. Link trails can't become link prefixes.
26240 <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>
26242 [[Söfnuður]]-[[00]]
26244 <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>
26248 #### --------------- Quotes ---------------
26249 #### 1. Quotes inside <b> and <i>
26250 #### 2. Link fragments separated by <i> and <b> tags
26251 #### 3. Link fragments inside <i> and <b>
26252 #### 4. No escaping needed
26253 #### --------------------------------------
26255 1a. Quotes inside <b> and <i>
26266 <b>foo'<i>bar'</i>baz</b>
26275 <i>fools'<span> errand</span></i>
26276 <i><span>fool</span>'s errand</i>
26277 '<i>foo</i> bar '<i>baz</i>
26278 a|!*#-:;+-~[]{}b'<i>x</i>
26282 ''<nowiki>''foo''</nowiki>''
26283 ''<nowiki>'''foo'''</nowiki>''
26285 '''<nowiki/>'foo''''
26286 '''<nowiki>''foo''</nowiki>'''
26287 '''<nowiki>'''foo'''</nowiki>'''
26288 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26289 '''foo'''<nowiki/>'s
26295 '''foo'''<nowiki/>'
26296 ''''foo'''<nowiki/>'
26297 ''fools'<span> errand</span>''
26298 ''<span>fool</span>'s errand''
26299 '<nowiki/>''foo'' bar '''baz''
26300 a|!*#-:;+-~[]{}b'''x''
26304 1b. Quotes inside <b> and <i> with other tags on same line
26308 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26309 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26310 <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>
26311 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26312 '<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>
26313 '<i>foo</i> <div title="name">test</div>
26314 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26315 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26316 <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>
26319 '''a'' foo ''[[bar]]''
26320 ''a''' foo ''[[bar]]''
26321 ''a''' foo '''{{echo|[[bar]]}}'''
26322 [[foo]] x'''[[bar]]''
26323 '''foo'' <ref>test</ref>
26324 '''foo'' <div title="name">test</div>
26325 '''foo'' and <br> bar
26330 2. Link fragments separated by <i> and <b> tags
26334 <p>[[<i>foo</i>hello]]</p>
26335 <p>[[<b>foo</b>hello]]</p>
26337 [[''foo''<nowiki>hello]]</nowiki>
26339 [['''foo'''<nowiki>hello]]</nowiki>
26342 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26343 # this is one of the shortcomings of this format
26345 3. Link fragments inside <i> and <b>
26349 <p><i>[[foo</i>]]</p>
26350 <p><b>[[foo</b>]]</p>
26352 ''[[foo''<nowiki>]]</nowiki>
26354 '''[[foo'''<nowiki>]]</nowiki>
26358 4. No escaping needed
26362 <p>'<span><i>bar</i></span>'
26363 '<span><b>bar</b></span>'
26367 '<span>''bar''</span>'
26368 '<span>'''bar'''</span>'
26372 #### ----------- Paragraphs ---------------
26373 #### 1. No unnecessary escapes
26374 #### --------------------------------------
26377 1. No unnecessary escapes
26381 <p>bar <span>[[foo]]</span>
26382 </p><p>=bar <span>[[foo]]</span>
26383 </p><p>[[bar <span>[[foo]]</span>
26384 </p><p>]]bar <span>[[foo]]</span>
26385 </p><p>=bar <span>foo]]</span>=
26388 bar <span><nowiki>[[foo]]</nowiki></span>
26390 =bar <span><nowiki>[[foo]]</nowiki></span>
26392 [[bar <span><nowiki>[[foo]]</nowiki></span>
26394 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26396 =bar <span>foo]]</span><nowiki>=</nowiki>
26399 #### ----------------------- PRE --------------------------
26400 #### 1. Leading whitespace in SOL context should be escaped
26401 #### ------------------------------------------------------
26403 1. Leading whitespace in SOL context should be escaped
26426 <nowiki> </nowiki>a
26428 <nowiki> </nowiki> a
26432 <nowiki> </nowiki> a
26434 <nowiki> </nowiki>a
26437 <nowiki> </nowiki>b
26460 2. Leading whitespace in non-indent-pre contexts should not be escaped
26464 <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>
26465 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26466 <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>
26476 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26495 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26499 <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>
26501 [[File:Foobar.jpg|thumb|caption]]
26505 5. Nowiki escaping should account for indent-pres
26515 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26528 #### --------------- Behavior Switches --------------------
26531 1. Valid behavior switches should be escaped
26538 <nowiki>__TOC__</nowiki>
26539 ''<nowiki>__TOC__</nowiki>''
26543 2. Invalid behavior switches should not be escaped
26554 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26556 Behavior switches should be SOL-transparent
26560 <meta property="mw:PageProp/toc" />
26562 <!-- this one's bogus -->
26565 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26567 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26571 <!-- this one's bogus -->
26580 #### --------------- HTML tags ---------------
26583 #### 3. multi-line html tag
26584 #### 4. extension tags
26585 #### -----------------------------------------
26591 <a href="http://google.com">google</a>
26593 <a href="http://google.com">google</a>
26601 <ul><li> <div>foo</div></li>
26602 <li> <div style="color:red">foo</div></li>
26603 <li> <td></li></ul>
26606 * <nowiki><div>foo</div></nowiki>
26607 * <nowiki><div style="color:red">foo</div></nowiki>
26608 * <nowiki><td></nowiki>
26612 3. multi-line html tag
26631 <p><ref>foo</ref>
26632 </p><p><ref>bar
26633 </p><p>baz</ref>
26636 <nowiki><ref>foo</ref></nowiki>
26638 <nowiki><ref>bar</nowiki>
26640 baz<nowiki></ref></nowiki>
26643 #### --------------- Others ---------------
26649 <p><nowiki>foo</nowiki>
26652 <nowiki>foo</nowiki>
26655 ## The quote-char in the input is necessary for triggering the bug
26657 (T54035) Nowiki-escaping should not get tripped by " :" in text
26666 #----------- End of wikitext escaping tests --------------
26670 Tag-like HTML structures are passed through as text
26692 </p><p>1<d e>f
26697 HTML tag with necessary entities in attributes
26699 <span title="&amp;">foo</span>
26701 <p><span title="&amp;">foo</span>
26706 HTML tag with 'unnecessary' entity encoding in attributes
26708 <span title="&">foo</span>
26710 <p><span title="&">foo</span>
26715 HTML tag with broken attribute value quoting
26717 parsoid=wt2html,html2html
26719 <span title="Hello world>Foo</span>
26721 <p><span title="Hello world">Foo</span>
26724 <p><span title="Hello world">Foo</span></p>
26728 Self-closed tag with broken attribute value quoting
26730 parsoid=wt2html,html2html
26732 <div title="Hello world />Foo
26734 <div title="Hello world"></div>
26737 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26741 Table with broken attribute value quoting
26743 parsoid=wt2html,html2html
26746 | title="Hello world|Foo
26751 <td title="Hello world">Foo
26757 <td title="Hello world">Foo
26763 Table with broken attribute value quoting on consecutive lines
26765 parsoid=wt2html,html2html
26768 | title="Hello world|Foo
26769 | style="color:red|Bar
26774 <td title="Hello world">Foo
26776 <td style="color:red">Bar
26782 <td title="Hello world">Foo
26783 </td><td style="color: red">Bar
26784 </td></tr></tbody></table>
26789 Accept empty td cell attribute
26792 | align="center" | foo || |
26797 <td align="center"> foo </td>
26804 Non-empty attributes in th-cells
26807 ! Foo !! style="color: red" | Bar
26813 <th style="color: red"> Bar
26819 Accept empty attributes in th-cells
26834 Empty table rows go away
26855 ### Parsoid-centric tests for testing RTing of inter-element separators
26856 ### Edge cases not tested by existing parser tests and specific to
26857 ### Parsoid-specific serialization strategies.
26861 RT-ed inter-element separators should be valid separators
26873 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26877 # Parsoid-only since PHP parser relies on Tidy for correct output
26879 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26893 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26894 <p>bar</p></small></td></tr>
26898 <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>
26902 # Note that the "style" attribute is really a template parameter here.
26903 # The = would have to be {{=}} if you wanted the literal.
26905 Empty TD followed by TD with tpl-generated attribute
26910 |{{echo|style='color:red'}}|foo
26924 Indented table with an empty td
26942 ## We have some newline diffs RT-ing this edge case
26943 ## and it is not important enough -- we seem to be emitting
26944 ## at most 2 newlines after a </tr> and this is unrelated to
26945 ## the issue from T85627 that this is testing.
26947 Indented table with blank lines in between (T85627)
26966 Indented block & table
26980 <div data-parsoid='{"stx":"html"}'>foo</div>
26982 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26987 Indent and comment before table row
27002 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
27003 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
27007 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
27009 Empty TR followed by a template-generated TR
27015 {{echo|<tr><td>foo</td></tr>}}
27020 <tr class='mw-empty-elt'></tr>
27021 <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}}]}'>
27026 ## PHP and parsoid output differ for this, and since this is primarily
27027 ## for testing Parsoid's serializer, marking this Parsoid only
27029 Empty TR followed by mixed-ws-comment line should RT correctly
27042 <tr class='mw-empty-elt'></tr>
27045 <!--c--> </tr><!--d-->
27051 Multi-line image caption generated by templates with/without trailing newlines
27053 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
27054 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
27056 <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>
27057 <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>
27061 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
27065 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
27067 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
27069 <includeonly>foo</includeonly>
27077 ## PHP emits broken html for this, and since this is primarily
27078 ## a Parsoid serializer test, marking this Parsoid only
27080 Improperly nested inline or quotes tags with whitespace in between
27082 <span> <s>x</span> </s>
27085 <p><span> <s>x</s></span><s> </s>
27086 <b> <i>x</i></b><i> </i>
27091 Encapsulate protected attributes from wt
27093 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
27095 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
27099 <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>
27101 <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">
27102 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
27106 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
27107 ## Having nested or stray pre tags results in the attempt to add duplicates,
27108 ## causing an assertion fail. This test tries to prevent that situation.
27110 Ensure ParagraphWrapper can deal with stray closing pre tags
27120 1. Ensure fostered text content is wrapped in element nodes
27124 <table>hi</table><table>ho</table>
27133 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
27135 parsoid=wt2html,wt2wt
27144 <tbody><tr><td> a</td></tr>
27149 Encapsulation properly handles null DSR information from foster box
27151 parsoid=wt2html,wt2wt
27153 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
27155 <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>
27159 1. Encapsulate foster-parented transclusion content
27161 parsoid=wt2wt,wt2html
27163 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
27165 <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>
27175 2. Encapsulate foster-parented transclusion content
27177 parsoid=wt2wt,wt2html
27179 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
27181 <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>
27192 3. Encapsulate foster-parented transclusion content
27194 parsoid=wt2wt,wt2html
27196 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27198 <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>"]}">
27211 4. Encapsulate foster-parented transclusion content
27213 parsoid=wt2wt,wt2html
27215 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27217 <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>"]}">
27230 5. Encapsulate foster-parented transclusion content
27232 parsoid=wt2wt,wt2html
27234 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27236 <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>
27251 6. Encapsulate foster-parented transclusion content
27253 parsoid=wt2wt,wt2html
27255 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27257 <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>
27273 7. Encapsulate foster-parented transclusion content
27275 parsoid=wt2wt,wt2html
27277 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27279 <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>
27289 # Note that the wt is broken on purpose: the = should be {{=}} if you
27290 # don't want it to be a template parameter key.
27292 8. Encapsulate foster-parented transclusion content
27294 parsoid=wt2wt,wt2html
27297 }}{|{{echo|style='color:red'}}
27302 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
27304 <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>
27315 9. Encapsulate foster-parented transclusion content
27317 parsoid=wt2wt,wt2html
27319 <table>{{echo|hi</table>hello}}
27321 <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>
27325 Table in fosterable position
27336 <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">
27338 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27344 # Parsoid only for T66747
27346 Properly encapsulate empty-content transclusions in fosterable positions
27354 <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"}]]}'>
27360 Always encapsulate foster box when template range is expanded to table
27373 T115289: Unclosed table
27375 {{echo|<table>}}<!--c-->[[Category:Two]]
27377 <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>
27381 T115289: Don't migrate newlines out of tables with fostered content
27383 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27385 <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>
27389 T73074: More fostering fun
27391 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27393 <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>
27397 Support <object> element with .data attribute
27401 <object data="test.swf"></object>
27403 <object data="test.swf"></object>
27407 Don't block XML namespace declaration
27409 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27411 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27414 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27417 # -----------------------------------------------------------------
27418 # The following section of tests are primarily to spec requirements
27419 # around Parsoid's serialization (old, new, edited content)
27421 # All these tests are marked Parsoid html2wt and html2html only
27422 # ----------------------------------------------------------------
27425 Ignore rel attribute in a-tags during serialization to url-links
27429 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27430 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27431 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27433 http://en.wikipedia.org/wiki/Foobar
27434 http://en.wikipedia.org/wiki/Foobar
27435 http://en.wikipedia.org/wiki/Foobar
27438 # 'mi' is a localinterwiki prefix as well as a language
27440 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27444 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27450 Parsoid should accept interwiki shortcuts
27454 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27455 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27456 <a href='./fr:Foo'>Foo</a></p>
27457 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27458 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27459 <a href='fr%3AFoo'>Foo</a></p>
27460 <p><a href='FR%3AFoo'>Foo</a>
27461 <a href='./FR:Foo'>Foo</a></p>
27476 Parsoid should not accept invalid interwiki shortcuts
27480 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27481 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27482 <a href='news:Foo'>Foo</a></p>
27491 New wikilinks should be serialized properly
27495 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27496 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27497 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27498 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27499 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27503 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27504 http://en.wikipedia.org/wiki/Foo
27505 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27509 New wiki links (href variations)
27513 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27514 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27515 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27516 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27521 [[Toxine bactérienne]]
27525 New wiki links (content string variations)
27529 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27530 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27531 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27535 [[Foo_bar|./Foo_bar]]
27539 New category links (href variations)
27543 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27544 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27545 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27547 [[Category:Toxine bactérienne]]
27548 [[Category:Toxine bactérienne]]
27549 [[Category:Toxine bactérienne]]
27553 New sol transparent links don't need indent-pre nowiki protection
27558 <link rel="mw:PageProp/redirect" href="./Main_Page">
27559 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27560 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27562 #WEITERLEITUNG [[Main Page]]
27563 <!-- this is good --> [[Category:Good]]
27564 <!-- this is great --> [[Kategorie:Great]]
27568 New interlanguage links (href variations)
27572 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27573 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27574 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27576 [[es:Toxine bactérienne]]
27577 [[es:Toxine_bactérienne]]
27578 [[es:Toxine_bactérienne]]
27582 Image: Modifying size of an image (1)
27585 "modes": ["wt2wt"],
27587 ["img[height]", "attr", "height", "22"],
27588 ["img[width]", "attr", "width", "200"]
27592 [[Image:Foobar.jpg|230x230px]]
27594 [[Image:Foobar.jpg|200x200px]]
27598 Image: Modifying size of an image (2)
27601 "modes": ["wt2wt"],
27603 ["img[height]", "attr", "height", "100"],
27604 ["img[width]", "attr", "width", "500"]
27608 [[Image:Foobar.jpg|230x230px]]
27610 [[Image:Foobar.jpg|500x500px]]
27613 # Change in size is ignored so long as class='mw-default-size'
27615 Image: Modifying size of an image (3)
27618 "modes": ["wt2wt"],
27620 ["figure[class]", "removeClass", "mw-default-size"],
27621 ["figure img", "attr", "height", "19"],
27622 ["figure img", "attr", "width", "170"]
27626 [[Image:Foobar.jpg|thumb]]
27628 [[Image:Foobar.jpg|thumb|170x170px]]
27632 Image: Modifying alignment of an image (T50665)
27635 "modes": ["wt2wt"],
27637 ["figure[class]", "removeClass", "mw-halign-right"],
27638 ["figure[class]", "addClass", "mw-halign-left"]
27642 [[Image:Foobar.jpg|thumb|caption|right]]
27644 [[Image:Foobar.jpg|thumb|caption|left]]
27648 Image: Modifying mw-default-size of an frameless image (T64805)
27651 "modes": ["wt2wt"],
27653 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27657 [[Image:Foobar.jpg|frameless|right]]
27659 [[Image:Foobar.jpg|frameless|right|220x220px]]
27663 Image: Modifying valign of an image (T51221)
27666 "modes": ["wt2wt"],
27668 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27669 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27673 [[File:Foobar.jpg|20px|middle]]
27675 [[File:Foobar.jpg|20px|text-top]]
27679 Image: Modifying alt attribute of an image (T58400)
27682 "modes": ["wt2wt"],
27684 ["img[alt]", "attr", "alt", "some alternate edited text"]
27688 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27690 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27694 Image: Modifying caption of an image
27697 "modes": ["wt2wt"],
27699 ["figcaption", "text", "new caption"]
27703 [[Image:Foobar.jpg|thumb|original caption]]
27705 [[Image:Foobar.jpg|thumb|new caption]]
27709 Image: empty alt attribute (T50924)
27713 [[File:Foobar.jpg|thumb|alt=|bar]]
27715 <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>
27719 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27725 <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>
27727 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27731 Image: Block level image should have \n before and after
27734 [[File:Foobar.jpg|right|thumb|150x150px]]
27738 <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>
27743 Image: New block level image should have \n before and after (existing content)
27746 [[File:Foobar.jpg|right|thumb|150x150px]]
27750 <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>
27755 Image: upright option (parsoid)
27757 [[File:Foobar.jpg|thumb|upright|caption]]
27758 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27759 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27761 <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>
27762 <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>
27763 <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>
27767 Image: upright option is ignored on inline and frame images (parsoid)
27769 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27771 <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>
27775 Image: in template parameter with empty parameter
27777 {{echo|[[File:Foobar.jpg|link=]]}}
27779 <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>
27783 Image: from basic HTML (1)
27787 <span typeof="mw:Image">
27788 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27791 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27795 Image: from basic HTML (2)
27799 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27801 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27805 Image: from basic HTML (3)
27809 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27811 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27815 Image: from basic HTML (4)
27819 <img src="./File:Foobar.jpg">
27821 [[File:Foobar.jpg|link=]]
27825 Image: Invalid title as link
27827 [[File:Foobar.jpg|link=<]]
27829 <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>
27832 <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>
27836 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27841 <li><p>foo</p></li>
27848 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27852 <ul> <li>foo</li></ul>
27858 Don't strip leading whitespace when handling indent-pre suppressing tags
27863 <tr><td> indented row</td></tr>
27866 <b>This is very bold of you!</b>
27869 indented cell (no pre-wrapping!)
27879 '''This is very bold of you!'''
27883 indented cell (no pre-wrapping!)
27891 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27913 <nowiki> </nowiki></span>bar2
27916 <nowiki> </nowiki><span>bar</span>
27919 <nowiki> </nowiki><span>foo</span>
27924 Lists: Dont insert newlines in a serialized list item.
27928 <ul><li>a<br>b</li><li>c</li></ul>
27935 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27938 "modes": ["html2wt"],
27939 "scrubWikitext": false
27942 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27943 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27945 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27946 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27948 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27950 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27952 == hello there [[Category:A1]] ==
27954 == [[Category:A2]] hi pal ==
27956 == <!--foo--> [[Category:A3]] how goes it ==
27958 == it goes well [[Category:A4]] <!--bar--> ==
27960 ==howdy [[Category:A5]]==
27966 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27969 "modes": ["html2wt"],
27970 "scrubWikitext": true
27973 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27974 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27976 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27977 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27979 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27987 <!--foo--> [[Category:A3]]
27992 [[Category:A4]] <!--bar-->
28000 Headings: Don't hoist metas that come from templates
28003 "modes": ["html2wt"],
28004 "scrubWikitext": true
28007 <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>
28009 == {{echo|foo [[Category:Foo]]}} ==
28013 Headings: Category in ref isn't hoisted
28016 "modes": ["html2wt"],
28017 "scrubWikitext": true
28020 <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>
28022 <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>
28025 [[Category:Baz]] </ref> ==
28031 Parsoid: Serialize positional parameters with = in them as named parameter
28035 <p about="#mwt1" typeof="mw:Transclusion"
28036 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
28038 <p about="#mwt1" typeof="mw:Transclusion"
28039 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
28041 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28042 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28043 <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>
28047 {{echo|1=f=oo|2=bar}}
28049 <!--Orig params with data-parsoid has heuristics for handling = chars-->
28050 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
28051 {{echo|<nowiki>f=oo</nowiki>|bar}}
28055 Parsoid: Serialize positional parameters with = in extlink as named parameter
28059 <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>
28061 {{echo|1=http://stuff?is=ok}}
28065 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
28069 <div>a<p>b</p></div>
28090 Substrings resembling wikitext in hrefs should not get nowiki escapes
28094 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
28100 Enforce single-line context in the serializer
28107 <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">
28108 </span><span about="#mwt1">you</span> </h2>
28110 <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>
28112 <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
28113 there</span></li></ol>
28125 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
28132 </tbody></table></dd></dl>
28136 == hi {{bogus|there
28147 * foo '''bar''' baz
28159 Serialize new placeholder space without spans
28163 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
28165 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
28167 <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>
28173 <ref>foo : bar</ref>ok
28177 #-----------------------
28178 # Tag minimization tests
28179 #-----------------------
28182 1. I/B quote minimization: wikitext-only tags should be combined
28186 <p><i>A</i><i>B</i></p>
28187 <p><b>A</b><b>B</b></p>
28188 <p><i>A</i><b><i>B</i></b></p>
28189 <p><b>A</b><i><b>B</b></i></p>
28190 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28191 <p><i><b>A</b></i><i><b>B</b></i></p>
28192 <p><i><b>A</b></i><b><i>B</i></b></p>
28193 <p><b><i>A</i></b><i><b>B</b></i></p>
28213 2. I/B quote minimization: wikitext and html tags should not be combined
28217 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28218 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28222 ''A''<nowiki/>'''<i>B</i>'''
28226 3. I/B quote minimization: templated content stops minimization
28230 <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>
28231 <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>
28233 ''A''{{echo|''B''}}
28235 ''A''{{echo|'''''B'''''}}
28239 4. I/B quote minimization: new content should be mimimized with adjacent old content
28243 <p><i>A</i><i>B</i></p>
28244 <p><b>A</b><b>B</b></p>
28245 <p><i>A</i><b><i>B</i></b></p>
28255 5a. Merge adjacent quote nodes if they've been edited
28258 "modes": ["wt2wt", "selser"],
28260 ["p", "contents", "remove", ":contains('b')"]
28270 5b. Merge adjacent quote nodes if they've been edited
28273 "modes": ["wt2wt", "selser"],
28279 ''a''<span id="x">b</span>''c''
28285 1. Merge adjacent link nodes as long as at least one element is new
28288 "modes": ["html2wt"],
28289 "scrubWikitext": true
28292 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28293 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28294 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28298 [[Football|Foot]][[Football|ball]]
28302 2. Merge adjacent link nodes and enable additional normalizations
28305 "modes": ["html2wt"],
28306 "scrubWikitext": true
28309 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28311 [[Football|''Football'']]
28315 3. Don't merge adjacent link nodes if scrubWikitext is false
28318 "modes": ["html2wt"],
28319 "scrubWikitext": false
28322 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28324 [[Football|Foot]][[Football|ball]]
28327 #------------------------------
28328 # End of tag minimization tests
28329 #------------------------------
28332 T56262: New entities
28336 <span typeof="mw:Entity"> </span>
28341 ## Note that there is no wikitext output for 'unknownproperty' ##
28342 ## Unknown magic words are silently dropped ##
28349 <meta property='mw:PageProp/toc' />
28350 <meta property='mw:PageProp/notoc' />
28351 <meta property='mw:PageProp/forcetoc' />
28352 <meta property='mw:PageProp/index' />
28353 <meta property='mw:PageProp/noindex' />
28354 <meta property='mw:PageProp/nogallery' />
28355 <meta property='mw:PageProp/noeditsection' />
28356 <meta property='mw:PageProp/notitleconvert' />
28357 <meta property='mw:PageProp/nocontentconvert' />
28358 <meta property='mw:PageProp/unknownproperty' />
28368 __NOCONTENTCONVERT__
28372 Consecutive <pre>s should not get merged
28374 parsoid=html2wt,html2html
28376 <pre>a</pre><pre>b</pre>
28404 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28408 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28410 [[Special:BookSources/1234567890|ISBN 1234567895]]
28414 Edited RFC links not serializable as RFC links should serialize as extlinks
28418 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28420 [https://tools.ietf.org/html/rfc123 New RFC]
28424 Edited PMID links not serializable as PMID links should serialize as extlinks
28428 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28430 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28434 WTS of autolinks with trailing/surrounding context
28438 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28439 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28440 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28441 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28442 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28443 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28445 http://cscott.net'''foo'''
28447 http://cscott.net<b>foo</b>
28449 '''http://cscott.net'''
28451 '''http://cscott.net '''
28453 '''http://cscott.net<nowiki/>x'''
28455 http://cscott.net<nowiki/>x
28459 WTS of autolinks with nowikis (round-trip)
28461 x<nowiki/>http://cscott.net<nowiki/>x
28463 <p>x<a rel="mw:ExtLink" href="http://cscott.net">http://cscott.net</a>x</p>
28466 # this is the "easy" test because it leaves in place all the
28467 # data-parsoid information indicating this is an autolink
28469 WTS of autolinks with escapes (editing)
28472 "modes": ["wt2wt"],
28474 [ "span", "remove" ]
28478 x<nowiki/>http://cscott.net<nowiki/>x
28480 x<nowiki/>http://cscott.net<nowiki/>x
28484 WTS of edited autolink-like text (T103364)
28487 "modes": ["wt2wt"],
28489 [ "span[typeof]", "removeAttr", "typeof" ]
28493 Not a link: <nowiki>http://example.com</nowiki>.
28495 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28499 WTS of newly-authored autolink-like text (T103364)
28503 <p>http://example.com is not a link.</p>
28505 <nowiki>http://example.com</nowiki> is not a link.
28509 WTS of autolink-like text after an autolink (T108563)
28513 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28515 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28519 Magic links inside links (not autolinked)
28521 [[Foo|http://example.com]]
28524 [[Foo|ISBN 123456789x]]
28526 [http://foo.com http://example.com]
28527 [http://foo.com RFC 1234]
28528 [http://foo.com PMID 1234]
28529 [http://foo.com ISBN 123456789x]
28531 <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>
28532 <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>
28534 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28535 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28536 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28537 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28539 <p><a rel="mw:ExtLink" href="http://foo.com">http://example.com</a>
28540 <a rel="mw:ExtLink" href="http://foo.com">RFC 1234</a>
28541 <a rel="mw:ExtLink" href="http://foo.com">PMID 1234</a>
28542 <a rel="mw:ExtLink" href="http://foo.com">ISBN 123456789x</a></p>
28546 Magic links inside image captions (autolinked)
28548 [[File:Foobar.jpg|thumb|http://example.com]]
28549 [[File:Foobar.jpg|thumb|RFC 1234]]
28550 [[File:Foobar.jpg|thumb|PMID 1234]]
28551 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28553 <div class="thumb tright">
28554 <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>
28555 <div class="thumbcaption">
28556 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28557 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div>
28560 <div class="thumb tright">
28561 <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>
28562 <div class="thumbcaption">
28563 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28564 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div>
28567 <div class="thumb tright">
28568 <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>
28569 <div class="thumbcaption">
28570 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28571 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div>
28574 <div class="thumb tright">
28575 <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>
28576 <div class="thumbcaption">
28577 <div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>
28578 <a href="/wiki/Special:BookSources/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div>
28582 <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>
28583 <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>
28584 <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>
28585 <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>
28589 WTS of magic word text (T109371)
28594 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28595 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28597 <nowiki>RFC 1234</nowiki>
28599 [http://foo.com RFC 1234]
28605 Edited Redirect link should emit a non-piped wikitext link
28609 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28615 T75121: Infer extension name from typeOf if data-mw is not present
28617 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28619 <div typeOf="mw:Extension/foo"></div>
28624 # Note that the <p> wrapping isn't present in PHP parser output
28625 # The important thing for this test is that P-wrapping doesn't
28626 # interfere with the <nowiki> protection for leading - in <td>
28627 # (which isn't necessary for <th>).
28629 T88318: p-wrapped dash in table.
28631 parsoid=html2wt,wt2wt
28634 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28635 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28636 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28643 |<nowiki>-</nowiki>
28644 |<nowiki>- </nowiki>
28663 <td><small>-</small></td>
28675 T149209: WTS: Handle newlines in table cells properly
28683 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28685 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28691 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28693 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28715 T149209: Selser: Handle newlines in table cells properly
28718 "modes": ["selser"],
28720 [ "#h1", "html", "a\nb\n" ],
28721 [ "#h2", "html", "a\nb\n" ],
28722 [ "#c1", "html", "a\nb\n" ],
28723 [ "#c2", "html", "<p>a</p>" ],
28724 [ "#c3", "html", "<p>a</p>" ],
28725 [ "#c4", "html", "edit-me<p>a</p>" ]
28730 ! id="h1" |edit-me!!1
28732 ! id="h2" |edit-me||2
28734 | id="c1" |edit-me||3
28736 | id="c2" |edit-me||4
28738 | id="c3" |edit-me||p||q||r
28740 | id="c4" |edit-me||p||q||r
28769 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28774 <td id='mwAc'>foo</td>
28775 <td id='serialize-this'>bar</td>
28780 | id="serialize-this" |bar
28785 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28789 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28791 <div id="hello">ok</div>
28798 "modes": ["wt2wt"],
28800 [ "#xyz", "before", "<b>before</b> stuff " ],
28801 [ "#xyz", "after", " stuff <i>after</i>" ],
28802 [ "#xyz", "html", "x <b>y</b> z" ]
28806 <span id="xyz">hello</span>
28808 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28812 Never serialize a-tag as html, regardless of what data-parsoid has to say
28814 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28816 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28821 ## SSS FIXME: This is broken output nevertheless.
28822 ## What might be a reasonable non-broken output for this?
28823 ## This is an edge case unlikely to be seen in production
28824 ## that I am not wasting more time on this right now.
28826 Never serialize a-tag as html, no matter what attributes it has
28828 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28830 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28832 [http://boo.org http://boohoo.org]
28835 # Misnested is an indication that selser can reuse the source but these have
28836 # shown to sneak through on occasion. See T101768.
28837 # The original wikitext here is: [http://test.com [[one]] two three]
28839 Strip span tags added to mark misnested links
28843 <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>
28845 [http://test.com][[one]] two three
28849 Catch regression when unpacking misnested links
28853 {{echo|hi}}[http://example.com [[ho]]]
28855 <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>
28859 Catch regression when unpacking with trailing content
28861 {{echo|Foo <references/> bar}}
28863 <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>
28867 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28871 <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|}"]}'>
28883 ## This test verifies the presence and computation of this attribute indirectly
28884 ## by making an edit and ensuring that the serialization is correct (which it would be
28885 ## only if firstWikitextNode is properly set).
28887 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28890 "modes": ["wt2wt"],
28892 [ "div#x", "remove" ],
28893 [ "div", "before", "<div>new</div>" ]
28897 <div id="x">foo</div>
28899 {{echo|<div>boo</div>
28907 {{echo|<div>boo</div>
28913 # --------------------------------------------
28914 # Tests spec'ing wikitext serialization norms |
28915 # --------------------------------------------
28918 Serialize multi-line indent-pre starting with wikitext syntax
28932 1. Categories should always be serialized on their own line
28936 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28944 2. Categories that are part of templates should not introduce a line break
28946 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28948 <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>
28951 # Careful while editing these next 2 tests. There are \u200f characters
28952 # before and after the <link> tags in the HTML and following some
28953 # of the categories in wikitext
28954 # Do not remove these characters in edits.
28956 # As part of the serialization, these bidi characters will get stripped.
28958 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28961 "modes": ["html2wt"],
28962 "scrubWikitext": true
28965 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28966 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28969 [[קטגוריה: שיטות משפט]]
28973 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28976 "modes": ["html2wt"],
28977 "scrubWikitext": true
28980 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28987 Lists: Add space after bullets
28994 <li><span> baz</span></li>
28999 * <span> baz</span>
29003 1. Headings: Add space before/after == (T53744)
29010 <h2><span> baz</span></h2>
29018 == <span> baz</span> ==
29022 2. Headings: Add space before/after == even after hoisted content
29025 "modes": ["html2wt"],
29026 "scrubWikitext": true
29029 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
29037 1. Headings: suppress newly created empty headings
29040 "modes": ["html2wt"],
29041 "scrubWikitext": true
29049 2. Headings: don't suppress empty headings if scrubWikitext is false
29059 3. Headings: suppress empty headings on edits
29062 "modes": ["selser"],
29063 "scrubWikitext": true,
29069 ==<span id="x">foo</span>==
29074 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
29077 "modes": ["html2wt"],
29078 "scrubWikitext": true
29081 <h2>foo<br/>bar</h2>
29082 <h2>foo <span><br/>bar</span> baz</h2>
29086 == foo <span> bar</span> baz ==
29090 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
29093 "modes": ["html2wt"],
29094 "scrubWikitext": false
29097 <h2>foo<br/>bar</h2>
29103 1. WT Quote Tags: suppress newly created empty style tags
29106 "modes": ["html2wt"],
29107 "scrubWikitext": true
29115 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
29121 ''<nowiki/>'''''<nowiki/>'''
29125 3. WT Quote Tags: suppress empty style tags on edits
29128 "modes": ["selser"],
29129 "scrubWikitext": true,
29135 '''<span id="x">foo</span>'''
29140 1. Anchors: suppress newly created empty anchors
29143 "modes": ["html2wt"],
29144 "scrubWikitext": true
29147 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29152 2. Anchors: don't suppress empty anchors if scrubWikitext is false
29155 "modes": ["html2wt"],
29156 "scrubWikitext": false
29159 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
29165 3. Anchors: suppress empty anchors on edits
29168 "modes": ["selser"],
29169 "scrubWikitext": true,
29175 [[Test|<span id="x">foo</span>]]
29180 3a. Anchors: do not suppress numbered extlinks
29183 "modes": ["wt2wt"],
29184 "scrubWikitext": true
29189 <a rel="mw:ExtLink" href="http://foo.com"></a>
29193 3b. Anchors: do not suppress numbered extlinks
29196 "modes": ["wt2wt"],
29197 "scrubWikitext": true,
29203 [http://foo.com <span id="x">foo</span>]
29209 Normalizations should be restricted to edited content
29212 "modes": ["selser"],
29213 "scrubWikitext": true,
29215 [ "h1", "before", "<i></i>"]
29229 1. Multiple normalizations (html2wt)
29232 "modes": ["html2wt"],
29233 "scrubWikitext": true
29237 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29238 </a><b><i></i></b>x</p>
29247 2. Multiple normalizations (selser)
29250 "modes": ["selser"],
29251 "scrubWikitext": true,
29253 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29257 <span id="x">foo</span>
29259 <span id="x">foo</span>
29265 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29268 "modes": ["html2wt"],
29269 "scrubWikitext": true
29281 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29288 <nowiki> </nowiki>hi
29290 <nowiki> </nowiki> hello
29294 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29297 "modes": ["html2wt"],
29298 "scrubWikitext": true
29307 baz bang</td></tr></table>
29313 bar<span>boo</span></p>
29329 bar<span>boo</span>
29333 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29336 "modes": ["selser"],
29337 "scrubWikitext": true,
29339 [ "p", "html", " a\n b" ]
29350 1. New links that end in spaces
29353 "modes": ["html2wt"],
29354 "scrubWikitext": false
29357 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29358 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29359 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29361 [[Berlin ]]<nowiki/>is the capital of Germany.
29365 [[Boston ]] is a city.
29369 2. New links that end in spaces
29372 "modes": ["html2wt"],
29373 "scrubWikitext": true
29376 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29377 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29378 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29380 [[Berlin]] is the capital of Germany.
29384 [[Boston]] is a city.
29388 1. Table cells with escapable prefixes
29391 "modes": ["html2wt"],
29392 "scrubWikitext": false
29396 <tr><td>a</td></tr>
29397 <tr><td>-</td></tr>
29398 <tr><td>+</td></tr>
29404 |<nowiki>-</nowiki>
29406 |<nowiki>+</nowiki>
29411 2. Table cells with escapable prefixes
29414 "modes": ["html2wt"],
29415 "scrubWikitext": true
29419 <tr><td>a</td></tr>
29420 <tr><td>-</td></tr>
29421 <tr><td>+</td></tr>
29434 3a. Table cells with escapable prefixes after edits
29437 "modes": ["selser"],
29438 "scrubWikitext": true,
29440 [ "table tbody tr:first-child td:first-child", "remove"]
29454 3b. Table cells with escapable prefixes after edits
29457 "modes": ["selser"],
29458 "scrubWikitext": true,
29460 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29467 |<span id="x">foo</span>+
29476 # FIXME: This test will fail because
29477 # normalization doesn't realize that the id attribute
29478 # will eliminate the escapable scenario
29480 4a. Table cells without escapable prefixes after edits
29483 "modes": ["selser"],
29484 "scrubWikitext": true,
29486 [ "#x", "html", "-" ]
29499 ## This tests normalizer's ability to discriminate between
29500 ## cells having identical content.
29502 4b. Table cells without escapable prefixes after edits
29505 "modes": ["selser"],
29506 "scrubWikitext": true,
29508 [ "td", "html", "-" ]
29521 ## This tests normalizer's ability to not be tripped by
29522 ## comments (and whitespace)
29524 4c. Table cells without escapable prefixes after edits
29527 "modes": ["selser"],
29528 "scrubWikitext": true,
29530 [ "table tbody tr td:first-child", "remove" ]
29545 ## This tests normalizer's ability to handle HTML cells
29547 4d. Table cells without escapable prefixes after edits
29550 "modes": ["selser"],
29551 "scrubWikitext": true,
29553 [ "td", "html", "-" ]
29558 <tr><td>a</td></tr>
29562 <tr><td>-</td></tr>
29566 ## T111151 Remove font elements without attributes
29568 5a. font tags without attributes should be dropped in scrubWikitext mode
29571 "modes": ["html2wt"],
29572 "scrubWikitext": true
29576 <font><font>bar</font></font>
29577 <font class="x">boo</font>
29581 <font class="x">boo</font>
29585 5b. font tags should not be dropped without scrubWikitext being enabled
29588 "modes": ["html2wt"],
29589 "scrubWikitext": false
29598 Escape nowiki DOM elements
29602 <nowiki><i>foo</i></nowiki>
29604 <nowiki>''foo''</nowiki>
29607 # This is meant to be an interim fix while we go about figuring out
29608 # how to not introduce these trailing <nowiki/>s in the first place.
29610 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29614 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29616 <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>
29617 <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>
29630 # ---------------------------------------------------
29631 # End of tests spec'ing wikitext serialization norms |
29632 # ---------------------------------------------------
29636 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29644 <td><b>c</b><p>d</p></td>
29663 Anchor without href scenarios
29665 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29668 <a class="no">dice</a>
29673 <span name="foo"></span>
29677 New transclusion added after a list should be serialized after the list
29681 <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>
29687 # -----------------------------------------------------------------
29688 # End of section for Parsoid-only html2wt tests for serialization
29690 # -----------------------------------------------------------------
29692 # -----------------------------------------------------------------
29693 # The following section of tests are primarily to spec behavior of
29694 # the selective serializer. All these tests have manual selser
29695 # changes. The automated selser changes for all tests handle the
29696 # wide variation of changes, but these tests here capture specs
29697 # deterministically.
29698 # ----------------------------------------------------------------
29702 Selser: New comments should not be lost
29705 "modes": ["selser"],
29707 [ "#a", "after", "<!--c1-->" ],
29708 [ "#b", "before", "<!--c2-->" ]
29712 <span id="a">a</span>
29714 <span id="b">b</span>
29716 <span id="a">a</span><!--c1-->
29718 <!--c2--><span id="b">b</span>
29723 Selser: Check for validity of DSR before using it
29726 "modes": ["selser"],
29728 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29732 <span id="a">a</span>
29734 {{DISPLAYTITLE:foo}}
29735 <span id="a">a</span>
29739 1. DOMDiff: Changes to <ref> content should be looked up using id
29742 "modes": ["selser"],
29744 ["#X", "after", "bar"],
29745 ["#Y", "after", "baz"]
29749 X <ref><span id="X">foo</span></ref>
29752 <ref name="a"><span id="Y">foo</span></ref>
29755 X <ref><span id="X">foo</span>bar</ref>
29758 <ref name="a"><span id="Y">foo</span>baz</ref>
29763 2. DOMDiff: Changes to <ref> content should be looked up using id
29766 "modes": ["selser"],
29768 ["#Z", "after", "bar"]
29772 A <ref>foo bar for a</ref>
29773 B <ref group="X" name="b" />
29777 <references group="X">
29778 <ref name="b"><span id="Z">foo</span></ref>
29781 A <ref>foo bar for a</ref>
29782 B <ref group="X" name="b" />
29786 <references group="X">
29787 <ref name="b"><span id="Z">foo</span>bar</ref>
29792 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29795 "modes": ["selser"],
29797 [ "div:first-child", "text", "bar" ]
29801 <div style="{{1x|color:red;}}%">foo</div>
29803 <div style="{{1x|color:red;}}%">bar</div>
29816 <li class="mw-empty-elt"></li>
29817 <li class="mw-empty-elt"></li>
29825 [[File:Thumb.png|thumb]]
29827 <div class="thumb tright">
29828 <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>
29829 <div class="thumbcaption">
29830 <div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div>
29837 unclosed internal link XSS (T137264)
29839 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29841 <p>[[#<script>alert(1)</script>|
29844 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29847 # Use $wgRawHtml to inject a <style> tag, since you normally can't in wikitext
29848 # (Parsoid doesn't support $wgRawHtml==true)
29850 Validating that <style> isn't eaten by tidy (T167349)
29855 <html><style>.foo::before { content: "<foo>"; }</style></html>
29856 <html><style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style></html>
29860 <style>.foo::before { content: "<foo>"; }</style>
29861 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29866 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29868 wgFragmentMode=[ 'html5', 'legacy' ]
29870 == A&B&C&amp;D&amp;amp;E ==
29871 [[#A&B&C&amp;D&amp;amp;E]]
29873 <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>
29874 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
29877 <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>
29878 <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>
29882 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
29884 wgFragmentMode=[ 'legacy' ]
29886 == A&B&C&amp;D&amp;amp;E ==
29887 [[#A&B&C&amp;D&amp;amp;E]]
29889 <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>
29890 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29895 Decoding of HTML entities in embedded HTML tags
29897 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29899 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29902 <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>
29906 Decoding of HTML entities in indicator names for IDs (T104196)
29908 parsoid=wt2html,html2html
29911 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29913 1&2&3&4&amp;5=Indicator
29916 <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>
29919 # this version of the test strips out the ambiguity so Parsoid rts cleanly
29921 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
29925 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29927 1&2&3&4&amp;5=Indicator
29930 <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>
29933 # This fragment mode is what Parsoid supports.
29935 HTML5 ids: fallback to legacy
29937 wgFragmentMode=[ 'html5', 'legacy' ]
29949 == Hey < # " > % : ' ==
29950 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29952 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29954 <!-- These two links should produce identical HTML -->
29955 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29958 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29960 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29961 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29962 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29963 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29964 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29965 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29969 <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>
29970 <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>
29971 <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>
29972 <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>
29973 <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>
29974 <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>
29975 <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>
29976 </p><p>💩 <span id="💩"></span>
29977 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29980 <h2 id="Foo_bar"> Foo bar </h2>
29982 <h2 id="foo_Bar_2"> foo Bar </h2>
29984 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span> Тест </h2>
29986 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span> Тест </h2>
29988 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span> тест </h2>
29990 <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>
29991 <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>
29993 <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>
29995 <!-- These two links should produce identical HTML -->
29996 <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>
29999 # Parsoid doesn't support this mode
30001 HTML5 ids: legacy with a fallback to modern
30003 wgFragmentMode=[ 'legacy', 'html5' ]
30015 == Hey < # " > % : ' ==
30016 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30018 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30020 <!-- These two links should produce identical HTML -->
30021 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30024 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30026 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30027 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30028 <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>
30029 <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>
30030 <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>
30031 <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>
30035 <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>
30036 <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>
30037 <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>
30038 <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>
30039 <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>
30040 <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>
30041 <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>
30042 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
30043 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
30047 # Parsoid doesn't support this mode.
30049 HTML5 ids: no legacy
30051 wgFragmentMode=[ 'html5' ]
30063 == Hey < # " > % : ' ==
30064 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
30066 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
30068 <!-- These two links should produce identical HTML -->
30069 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
30072 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
30074 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
30075 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
30076 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
30077 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
30078 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
30079 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
30083 <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>
30084 <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>
30085 <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>
30086 <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>
30087 <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>
30088 <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>
30089 <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>
30090 </p><p>💩 <span id="💩"></span>
30091 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
30096 T90902: Normalize weird characters in section IDs
30098 wgFragmentMode=[ 'html5', 'legacy' ]
30104 <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>
30105 <p><a href="#Foo_bar">#Foo bar</a>
30110 T51672: Test for brackets in attributes of elements in external link texts
30112 [http://example.com/ link <span title="title with [brackets]">span</span>]
30113 [http://example.com/ link <span title="title with [brackets]">span</span>]
30116 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30117 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30120 <p><a rel="mw:ExtLink" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
30121 <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>
30125 T72875: Test for brackets in attributes of elements in internal link texts
30127 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30128 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30131 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30132 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30135 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30136 <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>
30140 T179544: {{anchorencode:}} output should be always usable in links
30142 wgFragmentMode=[ 'html5' ]
30144 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30146 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30149 <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>
30152 ## ------------------------------
30153 ## Parsoid section-wrapping tests
30154 ## ------------------------------
30156 Section wrapping for well-nested sections (no leading content)
30159 "wrapSections": true
30180 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30183 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
30186 <section data-mw-section-id="3"><h2 id="2.1"> 2.1 </h2>
30189 </section><section data-mw-section-id="4"><h2 id="2.2"> 2.2 </h2>
30192 <section data-mw-section-id="5"><h3 id="2.2.1"> 2.2.1 </h3>
30195 </section></section></section><section data-mw-section-id="6"><h1 id="3"> 3 </h1>
30202 Section wrapping for well-nested sections (with leading content)
30205 "wrapSections": true
30210 Para 2 with a <div>nested in it</div>
30223 <section data-mw-section-id="0"><p>Para 1.</p>
30225 <p>Para 2 with a </p><div>nested in it</div>
30229 </section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30232 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>
30235 <section data-mw-section-id="3"><h2 id="2.1"> 2.1 </h2>
30238 </section></section>
30242 Section wrapping with template-generated sections (good nesting 1)
30245 "wrapSections": true
30262 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30265 <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">
30266 </span><p about="#mwt1">b</p>
30267 </section><section data-mw-section-id="3"><h2 id="1.2"> 1.2 </h2>
30270 </section></section><section data-mw-section-id="4"><h1 id="2"> 2 </h1>
30274 # In this example, the template scope is mildly expanded to incorporate the
30275 # trailing newline after the transclusion since that is part of section 1.1.1
30277 Section wrapping with template-generated sections (good nesting 2)
30280 "wrapSections": true,
30281 "modes": ["wt2html", "wt2wt"]
30296 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30299 <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">
30300 </span><p about="#mwt1">b</p><span about="#mwt1">
30301 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1"> 1.1.1 </h3><span about="#mwt1">
30302 </span><p about="#mwt1">d</p><span about="#mwt1">
30303 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2"> 2 </h1>
30307 # In this example, the template scope is mildly expanded to incorporate the
30308 # trailing newline after the transclusion since that is part of section 1.2.1
30310 Section wrapping with template-generated sections (good nesting 3)
30313 "wrapSections": true,
30314 "modes": ["wt2html", "wt2wt"]
30332 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30335 <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">
30336 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1"> 1.1 </h2><span about="#mwt1">
30337 </span><p about="#mwt1">b</p><span about="#mwt1">
30338 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30339 </span><p about="#mwt1">c</p><span about="#mwt1">
30340 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30341 </span><p about="#mwt1">d</p><span about="#mwt1">
30342 </span></section></section></section><section data-mw-section-id="5"><h1 id="2"> 2 </h1>
30346 # Because of section-wrapping and template-wrapping interactions,
30347 # the scope of the template is expanded so that the template markup
30348 # is valid in the presence of <section> tags.
30349 # This exercises the s1 is null scenario in the wrapSections code
30351 Section wrapping with template-generated sections (bad nesting 1)
30354 "wrapSections": true
30368 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30371 <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"]}'>
30372 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1"> 1 </h1><span about="#mwt1">
30373 </span><p about="#mwt1">b
30374 </p><span about="#mwt1">
30376 </span><p about="#mwt1">c</p><span about="#mwt1">
30377 </span></section></div></section>
30380 # Because of section-wrapping and template-wrapping interactions,
30381 # the scope of the template is expanded so that the template markup
30382 # is valid in the presence of <section> tags.
30383 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30385 Section wrapping with template-generated sections (bad nesting 2)
30388 "wrapSections": true
30406 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30409 </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">
30410 </span><p about="#mwt1">b</p><span about="#mwt1">
30411 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1"> 2.1 </h2><span about="#mwt1">
30412 </span><p about="#mwt1">c</p><span about="#mwt1">
30414 </span><p about="#mwt1">d</p><span about="#mwt1">
30416 </span></section></section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30420 # Because of section-wrapping and template-wrapping interactions,
30421 # additional template wrappers are added to <section> tags
30422 # so that template wrapping semantics are valid whether section
30423 # tags are retained or stripped. But, the template scope can expand
30424 # greatly when accounting for section tags.
30425 # This exercises the s1 and s2 are in different subtrees scenario
30427 Section wrapping with template-generated sections (bad nesting 3)
30430 "wrapSections": true,
30431 "modes": ["wt2html", "wt2wt"]
30449 <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>
30452 <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">
30453 </span><p about="#mwt1">b</p><span about="#mwt1">
30454 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2"> 2 </h1><span about="#mwt1">
30455 </span><p about="#mwt1">c</p>
30458 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3"> 3 </h1>
30463 Section wrapping with uneditable lead section + div wrapping multiple sections
30466 "wrapSections": true
30471 <div style="border:1px solid red;">
30488 <section data-mw-section-id="-1"><p>foo</p>
30490 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30491 <section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30494 <section data-mw-section-id="2"><h2 id="1.1"> 1.1 </h2>
30497 </section></section><section data-mw-section-id="-1"><h1 id="2"> 2 </h1>
30501 </section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30504 <section data-mw-section-id="5"><h2 id="3.1"> 3.1 </h2>
30506 </section></section>
30510 Section wrapping with editable lead section + div overlapping multiple sections
30513 "wrapSections": true
30520 <div style="border:1px solid red;">
30537 <section data-mw-section-id="0"><p>foo</p>
30539 </section><section data-mw-section-id="-1"><h1 id="1"> 1 </h1>
30541 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30544 <section data-mw-section-id="2"><h2 id="1.1"> 1.1 </h2>
30547 </section><section data-mw-section-id="-1"><h1 id="2"> 2 </h1>
30552 </section><section data-mw-section-id="4"><h1 id="3"> 3 </h1>
30555 <section data-mw-section-id="5"><h2 id="3.1"> 3.1 </h2>
30557 </section></section>
30561 HTML header tags should not be wrapped in section tags
30564 "wrapSections": true
30577 <section data-mw-section-id="0"><p>foo</p>
30579 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30581 </section><section data-mw-section-id="1"><h1 id="b"> b </h1>
30583 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30585 </section><section data-mw-section-id="2"><h1 id="d"> d </h1></section>
30589 Lead section containing only whitespace and comments.
30592 "wrapSections": true
30596 <!-- this is a comment, presumably significant to editors -->
30603 <section data-mw-section-id="0" data-parsoid="{}">
30604 <!-- this is a comment, presumably significant to editors -->
30605 </section><section data-mw-section-id="1"><h1 id="1"> 1 </h1>
30608 </section><section data-mw-section-id="2"><h1 id="2"> 2 </h1>