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>
301 This is a simple paragraph.
303 <p>This is a simple paragraph.
308 Paragraphs with extra newline spacing
331 Paragraphs with newline spacing with comment lines in between
339 <!--foo--><!--More than 1 comment, still stripped-->
343 <!--foo--> <!----> <!-- bar -->
404 Paragraphs with newline spacing with non-empty white-space lines in between
431 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
439 <!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
478 Extra newlines: More paragraphs with indented comment
493 Extra newlines followed by heading
508 <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>
509 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
512 <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>
517 Extra newlines between heading and content are swallowed
525 <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>
526 <p><a href="/index.php?title=A&action=edit&redlink=1" class="new" title="A (page does not exist)">a</a>
531 Heading with line break in nowiki
535 wgFragmentMode=[ 'html5', 'legacy' ]
540 <h2><span id="A_B.0AC"></span><span class="mw-headline" id="A_B
542 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>
546 C"><span id="A_B.0AC" typeof="mw:FallbackId"></span>A <span typeof="mw:Nowiki">B
553 http://fr.wikipedia.org/wiki/🍺
554 <!-- EasterEgg we love beer, better be able be able to link to it -->
556 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
575 *plain''italic''plain
576 *plain''italic''plain''italic''plain
577 *plain'''bold'''plain
578 *plain'''bold'''plain'''bold'''plain
579 *plain''italic''plain'''bold'''plain
580 *plain'''bold'''plain''italic''plain
581 *plain''italic'''bold-italic'''italic''plain
582 *plain'''bold''bold-italic''bold'''plain
583 *plain'''''bold-italic'''italic''plain
584 *plain'''''bold-italic''bold'''plain
585 *plain''italic'''bold-italic'''''plain
586 *plain'''bold''bold-italic'''''plain
587 *plain l'''italic''plain
588 *plain l''''bold''' plain
591 <li>plain<i>italic</i>plain</li>
592 <li>plain<i>italic</i>plain<i>italic</i>plain</li>
593 <li>plain<b>bold</b>plain</li>
594 <li>plain<b>bold</b>plain<b>bold</b>plain</li>
595 <li>plain<i>italic</i>plain<b>bold</b>plain</li>
596 <li>plain<b>bold</b>plain<i>italic</i>plain</li>
597 <li>plain<i>italic<b>bold-italic</b>italic</i>plain</li>
598 <li>plain<b>bold<i>bold-italic</i>bold</b>plain</li>
599 <li>plain<i><b>bold-italic</b>italic</i>plain</li>
600 <li>plain<b><i>bold-italic</i>bold</b>plain</li>
601 <li>plain<i>italic<b>bold-italic</b></i>plain</li>
602 <li>plain<b>bold<i>bold-italic</i></b>plain</li>
603 <li>plain l'<i>italic</i>plain</li>
604 <li>plain l'<b>bold</b> plain</li></ul>
608 # this example taken from the [[simple:Moon]] article (T49326)
610 Italics and possessives (1)
612 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
614 <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
618 # this example taken from [[en:Flaming Pie]] (T51926)
620 Italics and possessives (2)
622 '''''Flaming Pie''''' is ... released in 1997. In ''Flaming Pie'''s liner notes
624 <p><i><b>Flaming Pie</b></i> is ... released in 1997. In <i>Flaming Pie'</i>s liner notes
628 # this example taken from [[en:Dictionary]] (T51926)
630 Italics and possessives (3)
632 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''.
634 <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>.
640 ### 2-quote opening sequence tests
643 Italics and bold: 2-quote opening sequence: (2,2)
652 Italics and bold: 2-quote opening sequence: (2,3)
661 Italics and bold: 2-quote opening sequence: (2,4)
671 # same html as previous, but wikitext adjusted to match parsoid html2wt
673 Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
675 ''foo<nowiki>''</nowiki>''
681 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
683 Italics and bold: 2-quote opening sequence: (2,5)
696 # same html as previous, but wikitext adjusted to match parsoid html2wt
698 Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
700 ''foo'''''<nowiki/>'''
711 ### 3-quote opening sequence tests
715 Italics and bold: 3-quote opening sequence: (3,2)
724 Italics and bold: 3-quote opening sequence: (3,3)
733 Italics and bold: 3-quote opening sequence: (3,4)
741 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
743 Italics and bold: 3-quote opening sequence: (3,5)
756 # same html as previous, but wikitext adjusted to match parsoid html2wt
758 Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
760 '''foo'''''<nowiki/>''
771 ### 4-quote opening sequence tests
775 Italics and bold: 4-quote opening sequence: (4,2)
785 # same html as previous, but wikitext adjusted to match parsoid html2wt
787 Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
789 <nowiki>''</nowiki>''foo''
796 Italics and bold: 4-quote opening sequence: (4,3)
805 Italics and bold: 4-quote opening sequence: (4,4)
815 # same html as previous, but wikitext adjusted to match parsoid html2wt
817 Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
825 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
827 Italics and bold: 4-quote opening sequence: (4,5)
836 <p>'<b>foo</b><i></i>
840 # same html as previous, but wikitext adjusted to match parsoid html2wt
842 Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
844 '<nowiki/>'''foo'''''<nowiki/>''
849 <p>'<b>foo</b><i></i>
855 ### 5-quote opening sequence tests
859 Italics and bold: 5-quote opening sequence: (5,2)
869 # same html as previous, but wikitext adjusted to match parsoid html2wt
871 Italics and bold: 5-quote opening sequence: (5,2+3)
880 Italics and bold: 5-quote opening sequence: (5,3)
890 # same html as previous, but wikitext adjusted to match parsoid html2wt
892 Italics and bold: 5-quote opening sequence: (5,3+2)
901 Italics and bold: 5-quote opening sequence: (5,4)
907 <p><i><b>foo'</b></i>
912 Italics and bold: 5-quote opening sequence: (5,5)
921 Italics and bold: 5-quote opening sequence: (5,6)
925 <p><i><b>foo'</b></i>
930 ### multiple quote sequences in a line
934 Italics and bold: multiple quote sequences: (2,4,2)
940 <p><i>foo'<b>bar</b></i>
944 # same html as previous, but wikitext adjusted to match parsoid html2wt
946 Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
948 ''foo'<nowiki/>'''bar'''''
950 <p><i>foo'<b>bar</b></i>
955 Italics and bold: multiple quote sequences: (2,4,3)
961 <p><i>foo'<b>bar</b></i>
965 # same html as previous, but wikitext adjusted to match parsoid html2wt
967 Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
969 ''foo'<nowiki/>'''bar'''''
971 <p><i>foo'<b>bar</b></i>
976 Italics and bold: multiple quote sequences: (2,4,4)
982 <p><i>foo'<b>bar'</b></i>
986 # same html as previous, but wikitext adjusted to match parsoid html2wt
988 Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
990 ''foo'<nowiki/>'''bar'<nowiki/>'''''
992 <p><i>foo'<b>bar'</b></i>
996 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
998 Italics and bold: multiple quote sequences: (3,4,2)
1007 <p><b>foo'</b>bar<i></i>
1011 # same html as previous, but wikitext adjusted to match parsoid html2wt
1013 Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
1015 '''foo''''bar''<nowiki/>''
1020 <p><b>foo'</b>bar<i></i>
1024 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
1026 Italics and bold: multiple quote sequences: (3,4,3)
1035 <p><b>foo'</b>bar<b></b>
1039 # same html as previous, but wikitext adjusted to match parsoid html2wt
1041 Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
1043 '''foo''''bar'''<nowiki/>'''
1048 <p><b>foo'</b>bar<b></b>
1053 ### other quote tests
1056 Italics and bold: other quote tests: (2,3,5)
1058 ''this is about '''foo's family'''''
1060 <p><i>this is about <b>foo's family</b></i>
1066 Italics and bold: other quote tests: (2,(3,3),2)
1068 ''this is about '''foo's''' family''
1070 <p><i>this is about <b>foo's</b> family</i>
1076 Italics and bold: other quote tests: (3,2,3,2)
1080 '''this is about ''foo'''s family''
1082 <p><b>this is about <i>foo</i></b><i>s family</i>
1087 # same html as previous, but wikitext adjusted to match parsoid html2wt
1089 Italics and bold: other quote tests: (3,2,3+2+2,2)
1091 '''this is about ''foo'''''<nowiki/>''s family''
1093 <p><b>this is about <i>foo</i></b><i>s family</i>
1099 Italics and bold: other quote tests: (3,2,3,3)
1101 '''this is about ''foo'''s family'''
1103 <p>'<i>this is about </i>foo<b>s family</b>
1109 Italics and bold: other quote tests: (3,(2,2),3)
1111 '''this is about ''foo's'' family'''
1113 <p><b>this is about <i>foo's</i> family</b>
1119 Italicized possessive
1121 The ''[[Main Page]]'''s talk page.
1123 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
1126 <p>The <i><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>'</i>s talk page.</p>
1130 Quote balancing context should be restricted to td/th cells on the same wikitext line
1132 parsoid=wt2html,wt2wt
1146 </td></tr></tbody></table>
1154 Non-html5 tags should be accepted
1156 <center>''foo''</center>
1158 <font>''foo''</font>
1159 <strike>''foo''</strike>
1162 <center><i>foo</i></center>
1163 <p><big><i>foo</i></big>
1164 <font><i>foo</i></font>
1165 <strike><i>foo</i></strike>
1171 <wbr> is valid wikitext (T54468)
1179 # <strike> is HTML4, <s> is HTML4/5.
1181 <s> or <strike> for strikethrough
1183 <strike>strike</strike>
1187 <p><strike>strike</strike>
1195 Text-level semantic html elements in wikitext
1198 <strong>text</strong>
1214 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1221 <strong>text</strong>
1237 <ruby><rb>明日</rb><rp>(</rp><rt>Ashita</rt><rp> </rp><rtc>あした</rtc><rp>)</rp></ruby>
1245 # test cases taken from
1246 # https://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element
1248 Ruby markup (W3C-style)
1250 ;Mono-ruby for individual base characters
1251 :<ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby>
1253 :<ruby>今日<rt>きょう</rt></ruby>
1255 :<ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby>
1257 :<ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby>
1259 :<ruby><rb>旧</rb><rb>金</rb><rb>山</rb><rt>jiù</rt><rt>jīn</rt><rt>shān</rt><rtc>San Francisco</rtc></ruby>
1261 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1262 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1263 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1266 <dl><dt>Mono-ruby for individual base characters</dt>
1267 <dd><ruby>日<rt>に</rt>本<rt>ほん</rt>語<rt>ご</rt></ruby></dd>
1269 <dd><ruby>今日<rt>きょう</rt></ruby></dd>
1270 <dt>Jukugo ruby</dt>
1271 <dd><ruby>法<rb>華</rb><rb>経</rb><rt>ほ</rt><rt>け</rt><rt>きょう</rt></ruby></dd>
1272 <dt>Inline ruby</dt>
1273 <dd><ruby>東<rb>京</rb><rp>(</rp><rt>とう</rt><rt>きょう</rt><rp>)</rp></ruby></dd>
1274 <dt>Double-sided ruby</dt>
1275 <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>
1277 <rb>♥</rb><rtc><rt>Heart</rt></rtc><rtc lang="fr"><rt>Cœur</rt></rtc>
1278 <rb>☘</rb><rtc><rt>Shamrock</rt></rtc><rtc lang="fr"><rt>Trèfle</rt></rtc>
1279 <rb>✶</rb><rtc><rt>Star</rt></rtc><rtc lang="fr"><rt>Étoile</rt></rtc>
1284 # The next two test different paths in the sanitizer.
1286 Non-word characters don't terminate tag names (T19663, T42670, T54022)
1288 <blockquote|>a</blockquote>
1290 <b→> doesn't terminate </b→>
1292 <bä> doesn't terminate </bä>
1294 <boo> doesn't terminate </boo>
1296 <s.foo> doesn't terminate </s.foo>
1300 <p><blockquote|>a</blockquote>
1301 </p><p><b→> doesn't terminate </b→>
1302 </p><p><bä> doesn't terminate </bä>
1303 </p><p><boo> doesn't terminate </boo>
1304 </p><p><s.foo> doesn't terminate </s.foo>
1305 </p><p><sub-ID#1>
1310 Non-word characters don't terminate tag names
1312 <blockquote|>a</blockquote>
1314 <b→> doesn't terminate </b→>
1316 <bä> doesn't terminate </bä>
1318 <boo> doesn't terminate </boo>
1320 <s.foo> doesn't terminate </s.foo>
1324 <p><blockquote|>a
1325 </p><p><b→> doesn't terminate </b→>
1326 </p><p><bä> doesn't terminate </bä>
1327 </p><p><boo> doesn't terminate </boo>
1328 </p><p><s.foo> doesn't terminate </s.foo>
1329 </p><p><sub-ID#1>
1334 ### See tests/parser/parserTestsParserHook.php for the <tåg> extension)
1335 ### This checks that HTML5 tags (with non-word characters in the tag
1336 ### name) make it safely through the parser -- the Sanitizer will
1337 ### munge them later, as it should.
1340 Non-word characters are valid in extension tags (T19663)
1351 <pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
1355 Isolated close tags should be treated as literal text (T54760)
1363 <p class="mw-empty-elt">
1364 </p><p><s.foo>s
1367 <p><s.foo>s</p>
1371 ### Special characters
1375 Bare pipe character (T54363)
1384 Bare pipe character from a template (T54363)
1393 ### <nowiki> test cases
1397 <nowiki> unordered list
1399 <nowiki>* This is not an unordered list item.</nowiki>
1401 <p>* This is not an unordered list item.
1404 <p><span typeof="mw:Nowiki">* This is not an unordered list item.</span></p>
1410 <nowiki>Lorem ipsum dolor
1418 <p>Lorem ipsum dolor
1427 <p><span typeof="mw:Nowiki">Lorem ipsum dolor
1437 Don't parse <nowiki><span class="error"></nowiki> (T149622)
1439 <nowiki><span class="error"></nowiki>
1441 <p><span class="error">
1444 <p><span typeof="mw:Nowiki"><span class="error"></span></p>
1450 :There is not nowiki.
1451 :There is <nowiki>nowiki</nowiki>.
1453 #There is not nowiki.
1454 #There is <nowiki>nowiki</nowiki>.
1456 *There is not nowiki.
1457 *There is <nowiki>nowiki</nowiki>.
1459 <dl><dd>There is not nowiki.</dd>
1460 <dd>There is nowiki.</dd></dl>
1461 <ol><li>There is not nowiki.</li>
1462 <li>There is nowiki.</li></ol>
1463 <ul><li>There is not nowiki.</li>
1464 <li>There is nowiki.</li></ul>
1467 <dl><dd data-parsoid='{}'>There is not nowiki.</dd>
1468 <dd data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</dd></dl>
1470 <ol><li data-parsoid='{}'>There is not nowiki.</li>
1471 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ol>
1473 <ul><li data-parsoid='{}'>There is not nowiki.</li>
1474 <li data-parsoid='{}'>There is <span typeof="mw:Nowiki">nowiki</span>.</li></ul>
1478 Entities inside <nowiki>
1480 <nowiki><</nowiki>
1485 <p><span typeof="mw:Nowiki"><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span></span></p>
1489 Entities inside template parameters
1496 <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>
1500 Properly escape nowiki when combined with other wiki markup
1504 <p>* </nowiki> tag</p>
1506 <nowiki>*</nowiki> <nowiki></nowiki></nowiki> tag
1510 T93824: Put escaped HTML tags inside nowiki
1514 <p><h2>foo</h2></p>
1516 <nowiki><h2>foo</h2></nowiki>
1520 T71950: 1. Put nowiki as close to cause as possible, even with non-quote escapable chars
1524 <p>This text: L'<a rel="mw:WikiLink" href="./Foo">Foo</a>
1525 This text: L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1526 This text: L'''<a rel="mw:WikiLink" href="./Foo">Foo</a>''</p>
1528 This text: L'[[Foo]]
1529 This text: L<nowiki>''</nowiki>[[Foo]]
1530 This text: L<nowiki>'''</nowiki>[[Foo]]<nowiki>''</nowiki>
1533 # This test fails because wikitext whitespace is not normalized before comparing.
1535 T71950: 2. Put nowiki as close to cause as possible, after ' :'
1539 <p>This text : L''<a rel="mw:WikiLink" href="./Foo">Foo</a>
1542 This text : L<nowiki>''</nowiki>[[Foo]]
1545 # This test and the next one are html2wt only as they test that incorrect wikitext
1546 # passed in template arguments gets escaped or wrapped in nowikis where required.
1548 T71482: Use {{!}} instead of nowiki for single pipe in template argument
1552 <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>
1553 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo|bar |[["}},"i":0}}]}" about="#mwt2"></p>
1555 {{echo|foo{{!}}bar}}
1556 {{echo|<nowiki>foo|bar |[[</nowiki>}}
1560 T53961: Output correct nowikis in template arguments
1564 <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>
1565 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }} b"}},"i":0}}]}" about="#mwt2"></span>
1566 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a [[ b"}},"i":0}}]}" about="#mwt3"></span>
1567 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a | {{ ]]"}},"i":0}}]}" about="#mwt4"></span>
1568 <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a }"}},"i":0}}]}" about="#mwt5"></span></p>
1571 {{echo|<nowiki>a }} b</nowiki>}}
1572 {{echo|<nowiki>a [[ b</nowiki>}}
1573 {{echo|<nowiki>a | {{ ]]</nowiki>}}
1574 {{echo|a <nowiki>}</nowiki>}}
1578 Cases where "!!" needs nowiki protection
1583 <tr><th>this needs protection !! here</th></tr>
1587 <tr><th>this does not need
1588 protection !! here</th></tr>
1592 !<nowiki>this needs protection !! here</nowiki>
1605 Comments and Indent-Pre
1607 <!-- comment 1 --> asdf
1609 <!-- comment 1 --> asdf
1612 <!-- comment 1 --> asdf
1613 <!-- comment 2 -->xyz
1615 <!-- comment 1 --> asdf
1616 <!-- comment 2 --> xyz
1672 asdf<!-- comment 1 -->jkl
1682 <!-- foo --> b <!-- bar -->
1696 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
1702 Comment semantics and delimiters
1704 <!-- --><!----><!-----><!------>
1708 <!-- --><!----><!-----><!------>
1712 Comment semantics and delimiters, redux
1714 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1715 -- foo -- funky huh? ... -->
1719 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
1720 -- foo -- funky huh? ... -->
1724 Comment semantics and delimiters: directors cut
1726 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1727 everything starting with < followed by !-- until the first -- and > we see,
1728 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1734 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
1735 everything starting with < followed by !-- until the first -- and > we see,
1736 that wouldn't be valid XML however, since in XML -- has to terminate a comment
1741 Comment semantics: nesting
1743 <!--<!-- no, we're not going to do anything fancy here -->-->
1748 <!--<!-- no, we're not going to do anything fancy here --><p>--></p>
1751 # Parsoid closes the unclosed comment, even if it means a slight
1754 Comment semantics: unclosed comment at end
1756 parsoid=wt2html,html2html
1758 <!--This comment will run out to the end of the document
1762 <!--This comment will run out to the end of the document-->
1766 Comment semantics: normalize comments to play nice with XML and browsers
1768 <!-- Browsers --!> think this is closed -->
1769 <!--> This would normally be text -->
1770 <!---> As would this -->
1771 <!-- XML doesn't like trailing dashes -------->
1772 <!-- Nor doubled hyphens -- anywhere in the data -->
1773 But this is not a comment.
1775 <p>But this is not a comment.
1778 <!-- Browsers --!> think this is closed -->
1779 <!--> This would normally be text -->
1780 <!---> As would this -->
1781 <!-- XML doesn't like trailing dashes -------->
1782 <!-- Nor doubled hyphens -- anywhere in the data -->
1783 <p>But this is not a comment.</p>
1787 Comment semantics: round-trip even text which contains encoded -->
1789 <!-- hello & goodbye - > --> --&gt; --&xx -->
1791 <!-- hello & goodbye - > --> --&gt; --&xx -->
1795 Comment in template title
1804 Comment on its own line post-expand
1816 Comment on its own line post-expand with non-significant whitespace
1828 Multiple comments should still parse as SOL-transparent
1830 parsoid=wt2html,wt2wt
1833 <!--c2--><!--c3--><!--c4-->*b
1842 <!--c2--><!--c3--><!--c4-->
1848 ## Make sure ">" gets escaped in comments to avoid XSS
1850 IE conditional comments
1853 <script>alert('hi');</script>
1856 <!--[if lt IE 9]>
1857 <script>alert('hi');</script>
1862 ### paragraph wrapping tests
1878 Block tag on one line (<div>)
1888 <p>a </p><div>foo</div>
1893 # Remex wraps empty tag runs with p-tags.
1894 # Parsoid strips them out during p-wrapping.
1896 No p-wrappable content
1898 <span><div>x</div></span>
1899 <span><s><div>x</div></s></span>
1900 <small><em></em></small><span><s><div>x</div></s></span>
1902 <span><div>x</div></span>
1903 <span><s><div>x</div></s></span>
1904 <p><small><em></em></small></p><span><s><div>x</div></s></span>
1906 <span><div>x</div></span>
1907 <span><s><div>x</div></s></span>
1908 <small><em></em></small><span><s><div>x</div></s></span>
1911 # T177612: Parsoid-only test
1913 Transclusion meta tags shouldn't trip Parsoid's useless p-wrapper stripping code
1915 {{echo|<span><div>x</div></span>}}
1918 <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>
1923 Block tag on one line (<blockquote>)
1925 a <blockquote>foo</blockquote>
1929 a <blockquote>foo</blockquote>
1933 <p>a </p><blockquote><p>foo</p></blockquote>
1939 Block tag on both lines (<div>)
1949 <p>a </p><div>foo</div><p>
1950 b </p><div>foo</div>
1954 Block tag on both lines (<blockquote>)
1956 a <blockquote>foo</blockquote>
1958 b <blockquote>foo</blockquote>
1960 a <blockquote>foo</blockquote>
1961 b <blockquote>foo</blockquote>
1964 <p>a </p><blockquote><p>foo</p></blockquote><p>
1965 b </p><blockquote><p>foo</p></blockquote>
1969 Multiple lines without block tags
1990 x </p><div>foo</div><p> z
1994 # The difference between Parsoid & Remex here
1995 # is because of Parsoid's Tidy-emulation code
1996 # for p-wrapping. We'll start work to remove this
1997 # emulation code in Parsoid sooner than later.
1998 # Remex wraps empty tag runs with p-tags.
1999 # Parsoid strips them out in a separate pass.
2001 Empty lines between lines with block tags
2036 </p><div>b</div><p>d
2041 <div data-parsoid='{"stx":"html"}'></div>
2044 <div data-parsoid='{"stx":"html"}'></div><p>a</p>
2047 <div data-parsoid='{"stx":"html"}'>a</div><p>b</p>
2049 <div data-parsoid='{"stx":"html"}'>b</div><p>d</p>
2052 <div data-parsoid='{"stx":"html"}'>e</div>
2056 Unclosed HTML p-tags should be handled properly
2063 <div><p>foo</p></div>
2068 <div data-parsoid='{"stx":"html"}'><p data-parsoid='{"stx":"html", "autoInsertedEnd":true}'>foo</p></div>
2073 ## SSS FIXME: I can come up with other scenarios where this doesn't work because
2074 ## of eager output of buffered tokens in the p-wrapper. But, I'm going to ignore
2077 1. P-wrapping should leave sol-transparent tags outside p-tags where possible
2081 a [[Category:A1]] [[Category:A2]]
2086 <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"/>
2090 2. P-wrapping should leave sol-transparent tags outside p-tags where possible
2096 <link rel="mw:PageProp/Category" href="./Category:A1"/><p>a</p>
2100 No paragraph necessary for SOL transparent template
2102 <span><div>foo</div></span>
2105 <span><div>foo</div></span>
2106 {{echo|[[Category:Foo]]}}
2108 <span><div>foo</div></span>
2109 <span><div>foo</div></span>
2112 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2113 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
2115 <span data-parsoid='{"stx":"html"}'><div data-parsoid='{"stx":"html"}'>foo</div></span>
2116 <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]]"}},"i":0}}]}'/>
2120 Avoid expanding multiline sol transparent template ranges unnecessarily
2138 <br about="#mwt1" typeof="mw:Transclusion" data-parsoid='{}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<br/>\n"}},"i":0}}]}'/><span about="#mwt1">
2141 <link rel="mw:PageProp/Category" href="./Category:Ho" />
2145 ### Preformatted text
2155 And a [[Main Page|link]]
2161 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
2166 Tabs don't trigger preformatted text
2170 This is preformatted text.
2176 <pre>This is preformatted text.
2181 preformatted text.</p>
2182 <pre>This is preformatted text.
2187 Space before tab needs nowiki pre protection
2193 <nowiki> </nowiki> a
2197 Ident preformatting with inline content
2208 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
2225 Regression with preformatted in <center>
2239 T54763: Preformatted in <blockquote>
2245 indented cell (no pre-wrapping!)
2255 <p> indented cell (no pre-wrapping!)
2263 T53086: Double newlines in blockquotes should be turned into paragraphs
2280 T17491: <ins>/<del> in blockquote
2283 Foo <del>bar</del> <ins>baz</ins> quux
2287 <p>Foo <del>bar</del> <ins>baz</ins> quux
2294 T17491: <ins>/<del> in blockquote (2)
2296 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2299 <blockquote>Foo <del>bar</del> <ins>baz</ins> quux
2303 <blockquote><p>Foo </p><del>bar</del> <ins>baz</ins><p> quux
2308 <pre> with attributes (T5202)
2310 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2312 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
2317 <pre> with width attribute (T5202)
2319 <pre width="8">Narrow screen goodies</pre>
2321 <pre width="8">Narrow screen goodies</pre>
2326 <pre> with forbidden attribute (T5202)
2328 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
2330 <pre width="8">Narrow screen goodies</pre>
2335 Entities inside <pre>
2344 <pre> with forbidden attribute values (T5202)
2346 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
2348 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
2353 <nowiki> inside <pre> (T15238)
2361 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
2369 <pre><nowiki>Foo</nowiki></pre>
2374 <nowiki> inside of #tag:pre
2376 {{#tag:pre|Foo <nowiki>→bar</nowiki>}}
2378 <pre>Foo →bar</pre>
2381 <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>
2384 ## Don't expect this to rt, Parsoid drops the unmatched closing pre tags that
2385 ## aren't enclosed in nowikis.
2387 <nowiki> and <pre> preference (first one wins)
2418 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n<nowiki>\n"}}'><nowiki>
2423 <p><span typeof="mw:Nowiki">
2431 </pre> inside nowiki
2433 <nowiki></pre></nowiki>
2440 Empty pre; pre inside other HTML tags (T56946)
2457 <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
2459 <pre typeof="mw:Extension/pre" about="#mwt4" data-parsoid='{"stx":"html"}' data-mw='{"name":"pre","attrs":{},"body":{"extsrc":""}}'></pre>
2463 HTML pre followed by indent-pre
2476 <p><pre>foo</pre></p>
2478 <p class="mw-empty-elt"></p><pre>foo</pre><p class="mw-empty-elt"></p>
2480 <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>
2484 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
2492 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
2502 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
2514 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
2535 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
2539 {{echo| foo}}{{echo| bar}}
2544 {{echo|<!--cmt--> foo}}
2546 <!--cmt-->{{echo| foo}}
2548 {{echo|{{echo| }}bar}}
2566 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
2602 ## Hmm, should Parsoid rt this?
2604 Pres with newline attributes
2606 parsoid=wt2html,html2html
2611 <pre class="one two">hi</pre>
2614 <pre typeof="mw:Extension/pre" about="#mwt2" class="one two" data-mw='{"name":"pre","attrs":{"class":"one two"},"body":{"extsrc":"hi"}}'>hi</pre>
2618 Things that look like <pre> tags aren't treated as such
2620 Barack Obama <President> of the United States
2621 <President></President>
2623 <p>Barack Obama <President> of the United States
2624 <President></President>
2629 Handle broken pre-like tags (T66025)
2633 {{echo|<pre <pre>x</pre>}}
2635 <table><pre </table>
2638 <table><pre </table>
2642 <pre <table></table>
2644 <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>
2653 Parsoid: handle pre with space after attribute
2657 <pre style="width:50%;" >{{echo|foo}}</pre>
2659 <pre style="width:50%;">{{echo|foo}}</pre>
2662 <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>
2665 # TODO / maybe: fix wt2wt for this
2667 Parsoid: Don't paragraph-wrap fosterable content
2700 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":null}'></pre>
2704 Parsoid: Don't paragraph-wrap fosterable content even if table syntax is unbalanced
2732 #--------------------------------------------------------------------
2733 # Transclusion parameter whitespace stripping tests
2734 # Behavior is different for positional and named parameters
2735 #--------------------------------------------------------------------
2737 Templates: Strip leading and trailing whitespace from named-param values
2741 {{echo|1= {{echo|b}} }}
2759 Templates: Don't strip whitespace from positional-param values
2763 {{echo|{{echo|b}} }}
2803 Templates: Don't recognize targets split by newlines
2819 Templates: Recognize targets when newlines and comments don't split the target
2824 <!--X--> ech<!--X-->o<!--X-->
2832 <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>
2836 Templates: Handle empty comment-and-ws-only lines correctly
2839 <!--should be ignored-->
2840 <!--should be ignored as well-->
2847 <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>
2851 Templates: Handle comments in the target
2854 <!-- should be ignored -->
2858 <!-- should be ignored and spaces on next line should not trip us up (T147742) -->
2861 {{echo<!-- should be ignored -->
2864 {{echo<!-- should be ignored -->|foo}}
2866 {{<!-- should be ignored -->echo|foo}}
2875 <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>
2877 <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>
2879 <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>
2881 <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>
2883 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</p>
2887 Templates: Handle comments in parameter names (T69657)
2890 <!-- should be ignored -->
2894 <!-- should be ignored -->
2897 {{echo|1<!-- should be ignored -->=foo}}
2899 {{echo|<!-- should be ignored -->1=foo}}
2907 <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>
2909 <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>
2911 <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>
2913 <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>
2917 Templates: Other wikitext in parameter names (T69657)
2924 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"''1''":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
2928 Templates: With colons
2932 <p>Template with colon
2935 <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>
2938 #--------------------------------------------------------------------
2939 # Transclusion parameter escaping tests
2940 #--------------------------------------------------------------------
2943 Templates: Parsoid parameter escaping test 1
2945 {{echo|[foo]|{{echo|[bar]}}}}
2950 <p about="#mwt1" typeof="mw:Transclusion"
2951 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[foo]"},"2":{"wt":"{{echo|[bar]}}"}},"i":0}}]}'>[foo]</p>
2955 Parsoid: Pipes in external links in template parameter
2957 {{echo|[{{echo|http://example.com}} link]}}
2959 <p><a rel="nofollow" class="external text" href="http://example.com">link</a>
2962 <p><a rel="mw:ExtLink" class="external text" 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>
2966 Parsoid: pipe in transclusion parameter
2968 {{echo|http://foo.com/a|b}}
2970 <p><a rel="nofollow" class="external free" href="http://foo.com/a%7Cb">http://foo.com/a%7Cb</a>
2973 <p><a rel="mw:ExtLink" class="external free" href="http://foo.com/a%7Cb" about="#mwt1" typeof="mw:Transclusion" 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>
2977 Parsoid: Pipe in external link target and content in template parameter
2979 parsoid=html2wt,wt2wt
2981 {{echo|[http://foo.com/a|b a|b]}}
2983 <p><a rel="nofollow" class="external text" href="http://foo.com/a%7Cb">a|b</a>
2986 <p><a rel="mw:ExtLink" href="http://foo.com/a|b" about="#mwt1"
2987 typeof="mw:Transclusion"
2988 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},
2989 "params":{"1":{"wt":"[http://foo.com/a|b a|b]"}},"i":0}}]}'>a|b</a></p>
2993 Parsoid: Pipe in template with nested template in external link target in template parameter (seriously)
2997 {{echo|[{{fullurl:{{FULLPAGENAME}}|action=edit}} bar]}}
2999 <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>
3003 Templates: Don't escape already nowiki-escaped text in template parameters
3005 parsoid=html2wt,wt2wt
3007 {{echo|foo<nowiki>|</nowiki>bar}}
3008 {{echo|<nowiki><div></nowiki>}}
3009 {{echo|<nowiki></nowiki>}}
3016 <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>
3017 <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>
3018 <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>
3024 Templates: '=' char in nested transclusions should not trigger nowiki escapes or conversion to named param
3026 parsoid=html2wt,wt2wt
3028 {{echo|{{echo|1=bar}}}}
3033 <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>
3038 Templates parameters with special tokenizing behavior dont get modified because of arg escaping
3045 <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>
3050 Templates: Preserve blank parameter names
3057 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"":{"wt":"foo"}},"i":0}}]}'>{{{1}}}</p>
3061 Templates: Preserve blank parameter names in other positions
3063 {{blank_param|bar|=foo}}
3069 <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
3074 ### Parsoid-centric tests for testing RT edge cases for pre
3078 1a. Indent-Pre and Comments
3091 1b. Indent-Pre and Comments
3104 1c. Indent-Pre and Comments
3117 1d. Indent-Pre and Comments
3118 (Pre-handler currently cannot distinguish between comment/ws order and normalizes them to [comment,ws] order)
3131 2a. Indent-Pre and tables
3152 2b. Indent-Pre and tables
3168 2c. Indent-Pre and tables (T44252)
3185 2d. Indent-Pre and tables
3202 <tbody><tr><td> b</td></tr>
3207 2e. Indent-Pre and table-line syntax
3220 2f. Indent-pre started by table-line syntax
3239 2g. Indented table markup mixed with indented pre content (proposed in T8200)
3244 Text that should be rendered preformatted
3252 <pre>Text that should be rendered preformatted
3261 3a. Indent-Pre and block tags (single-line html)
3265 c <blockquote> foo </blockquote>
3270 c <blockquote> foo </blockquote>
3271 <pre><span> foo </span>
3274 <p>a </p><p data-parsoid='{"stx":"html"}'> foo </p>
3275 <p>b </p><div data-parsoid='{"stx":"html"}'> foo </div>
3276 <p>c </p><blockquote data-parsoid='{"stx":"html"}'> foo </blockquote>
3277 <pre><span> foo </span>
3280 <p> a </p><p> foo </p><p>
3281 b </p><div> foo </div><p>
3282 c </p><blockquote><p> foo </p></blockquote>
3283 <pre><span> foo </span>
3288 3b. Indent-Pre and block tags (multi-line html)
3293 <pre>a <span>foo</span>
3298 <pre>a <span data-parsoid='{"stx":"html"}'>foo</span></pre>
3299 b <div data-parsoid='{"stx":"html"}'> foo </div>
3301 <pre>a <span>foo</span>
3303 b </p><div> foo </div>
3307 3c. Indent-Pre and block tags (pre-content on separate line)
3371 4. Indent-Pre and extension tags
3382 a <pre typeof="mw:Extension/tag" about="#mwt2" data-parsoid='{}' data-mw='{"name":"tag","attrs":{},"body":null}'></pre>
3386 5. Indent-Pre and html pre
3388 <pre class="123">hi</pre>
3390 <pre class="123">hi</pre>
3393 <pre typeof="mw:Extension/pre" about="#mwt2" class="123" data-mw='{"name":"pre","attrs":{"class":"123"},"body":{"extsrc":"hi"}}'>hi</pre>
3397 Render paragraphs when indent-pre is suppressed in blocklevels
3414 4. Multiple spaces at start-of-line
3432 ## NOTE: the leading white-space chars on empty line are significant
3434 5a. White-space in indent-pre
3446 ## NOTE: the leading white-space chars on empty line are significant
3448 5b. White-space in indent-pre
3467 5c. White-space in indent-pre
3480 6. Pre-blocks should extend across lines with leading WS even when there is no wrappable content
3503 7a. Indent-pre and category links
3505 parsoid=wt2html,wt2wt
3507 [[Category:foo]] <!-- No pre-wrapping -->
3508 {{echo| [[Category:foo]]}} <!-- No pre-wrapping -->
3511 <link rel="mw:PageProp/Category" href="./Category:Foo"> <!-- No pre-wrapping -->
3512 <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 -->
3515 ## We used to, but no longer wt2wt this test since the default serializer
3516 ## will normalize all categories to serialize on their own line.
3517 ## This wikitext usage is going to be fairly uncommon in production and
3518 ## selser will take care of preserving formatting in those scenarios.
3520 7b. Indent-pre and category links
3525 [[Category:foo]] {{echo|b}}
3527 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
3528 <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>
3532 Indent-Pre: Newlines in comments shouldn't affect sol state
3547 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
3551 HTML-pre: 1. embedded newlines
3583 <pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre>
3585 <pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\nfoo\n"}}'>foo
3588 <pre typeof="mw:Extension/pre" about="#mwt6" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\nfoo\n"}}'>
3593 <pre typeof="mw:Extension/pre" about="#mwt8" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"\n\n\nfoo\n"}}'>
3601 HTML-pre: big spaces
3637 <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"}}'>
3656 HTML-pre: 2: indented text
3669 HTML-pre: 3: other wikitext
3688 <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
3697 ### Definition lists
3704 <dl><dt>name </dt>
3705 <dd>Definition</dd></dl>
3710 Definition list for indentation only
3714 <dl><dd>Indented text</dd></dl>
3719 Definition list with no space
3724 <dd>Definition</dd></dl>
3729 Definition list with URL link
3731 ;http://example.com/ :definition
3733 <dl><dt><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt>
3734 <dd>definition</dd></dl>
3739 Definition list with bracketed URL link
3741 ;[http://www.example.com/ Example]:Something about it
3743 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt>
3744 <dd>Something about it</dd></dl>
3749 Definition list with wikilink containing colon
3751 ; [[Help:FAQ]]:The least-read page on Wikipedia
3753 <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>
3754 <dd>The least-read page on Wikipedia</dd></dl>
3758 # At Brion's and JeLuF's insistence... :)
3760 Definition list with news link containing colon
3762 ;news:alt.wikipedia.rox: This isn't even a real newsgroup!
3764 <dl><dt><a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt>
3765 <dd>This isn't even a real newsgroup!</dd></dl>
3768 <dl><dt> <a rel="mw:ExtLink" class="external free" 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>
3772 Malformed definition list with colon
3774 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
3776 <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>
3781 Definition lists: colon in external link text
3783 ;[http://www.wikipedia2.org/ Wikipedia :The Next Generation] :OK, I made that up
3785 <dl><dt><a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia :The Next Generation</a> </dt>
3786 <dd>OK, I made that up</dd></dl>
3791 Definition lists: colon in HTML attribute
3793 ;<b style="display: inline">bold</b>
3795 <dl><dt><b style="display: inline">bold</b></dt></dl>
3800 Definition lists: self-closed tag
3802 ;one<br/>two :two-line fun
3804 <dl><dt>one<br />two </dt>
3805 <dd>two-line fun</dd></dl>
3810 Definition lists: ignore colons inside tags
3812 ;one <b>two : tag <i>fun:</i>:</b>:def
3814 <dl><dt>one <b>two : tag <i>fun:</i>:</b></dt>
3820 Definition lists: excess closed tags
3822 ;one</b>two :bad tag fun
3824 <dl><dt>onetwo </dt>
3825 <dd>bad tag fun</dd></dl>
3829 <dd>bad tag fun</dd>
3834 T13748: Literal closing tags
3838 <dd>test test test test test</dd>
3840 <dd>test test test test test</dd>
3845 <dd>test test test test test</dd>
3847 <dd>test test test test test</dd>
3853 Definition and unordered list using wiki syntax nested in unordered list using html tags.
3861 <dl><dt>term </dt>
3862 <dd>description</dd></dl>
3863 <ul><li>unordered</li></ul>
3869 Definition list with empty definition and following paragraph
3881 Nested definition lists using html syntax
3894 Definition Lists: No nesting: Multiple dd's
3907 Definition Lists: Indentation: Regular
3915 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3920 Definition Lists: Indentation: Missing 1st level
3926 <dl><dd>i3</dd></dl></dd></dl></dd></dl>
3931 Definition Lists: Indentation: Multi-level indent
3935 <dl><dd><dl><dd><dl><dd>i3</dd></dl></dd></dl></dd></dl>
3940 Definition Lists: Hacky use to indent tables
3947 should be left alone
3949 <dl><dd><dl><dd><table>
3954 </td></tr></table></dd></dl></dd></dl>
3956 should be left alone
3961 Definition Lists: Hacky use to indent tables, with comments (T65979)
3969 should be left alone
3972 <dl><dd><dl><dd><table><tr>
3975 </tr></table><!-- bar --></dd></dl></dd></dl>
3977 should be left alone</p>
3981 Definition Lists: Hacky use to indent tables, with comment before table
3987 <dl><dd><dl><dd><!-- foo --><table><tr>
3989 </tr></table></dd></dl></dd></dl>
3992 # The trailing whitespace in this test is to catch a regression in
3993 # Parsoid after T54473.
3995 Definition Lists: Hacky use to indent tables (WS-insensitive)
4004 </td></tr></table></dd></dl>
4008 <tbody><tr><td>a</td></tr>
4009 </tbody></table> </dd></dl>
4012 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
4013 ## as an empty dt item. It also ignores all but the last ";" when followed
4014 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
4015 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
4018 ## Ex: ";;t2 ::d2" is transformed into:
4030 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
4031 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
4042 ## All Parsoid only definition list tests have this difference.
4044 ## See also: https://phabricator.wikimedia.org/T8569
4045 ## and https://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
4048 Table / list interaction: indented table with lists in table contents
4068 </td></tr></table></dd></dl>
4073 Table / list interaction: lists nested in tables nested in indented lists
4096 </td></tr></table></dd></dl>
4103 Definition Lists: Nesting: Multi-level (Parsoid only)
4131 Definition Lists: Nesting: Test 2
4138 <dl><dd>d2</dd></dl></dd></dl>
4143 Definition Lists: Nesting: Test 3
4148 <dl><dd><dl><dt>t1</dt>
4150 <dl><dd><dl><dd>d2</dd></dl></dd></dl></dd></dl></dd></dl>
4155 Definition Lists: Nesting: Test 4
4160 <dl><dd><dl><dd><dl><dt>t3</dt>
4161 <dd>d3</dd></dl></dd></dl></dd></dl>
4166 ## The Parsoid team believes the following three test exposes a
4167 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
4168 ## wrong to close the <dl> after the <dt> containing the <ul>.)
4169 ## It also exposes a "misfeature" in tidy, which doesn't like
4170 ## <dl> tags with a single <dt> child; it converts the <dt> into
4171 ## a <dd> in that case. (Parsoid leaves the <dt> alone!)
4173 Definition Lists: Mixed Lists: Test 1
4179 <dl><dd><dl><dt><ul><li>foo</li>
4180 <li>bar</li></ul></dt></dl>
4181 <dl><dt>baz</dt></dl></dd></dl>
4184 <dl><dd><dl><dt><ul><li>foo</li>
4185 <li>bar</li></ul></dt></dl>
4186 <dl><dt>baz</dt></dl></dd></dl>
4204 Definition Lists: Mixed Lists: Test 2
4209 <ul><li><dl><dd>d1</dd>
4210 <dd>d2</dd></dl></li></ul>
4216 Definition Lists: Mixed Lists: Test 3
4221 <ul><li><dl><dd><dl><dd><dl><dd>d1</dd>
4222 <dd>d2</dd></dl></dd></dl></dd></dl></li></ul>
4228 Definition Lists: Mixed Lists: Test 4
4233 <ul><li><dl><dt>d1 </dt>
4236 <dd>d4</dd></dl></li></ul>
4242 Definition Lists: Mixed Lists: Test 5
4248 <dl><dd>d2</dd></dl></dd></dl></li></ul>
4254 Definition Lists: Mixed Lists: Test 6
4259 <ol><li><ul><li><dl><dd>d1
4260 <dl><dd><dl><dd>d3</dd></dl></dd></dl></dd></dl></li></ul></li></ol>
4266 Definition Lists: Mixed Lists: Test 7
4271 <dl><dd><ul><li>d1</li>
4272 <li>d2</li></ul></dd></dl>
4278 Definition Lists: Mixed Lists: Test 8
4283 <dl><dd><ul><li>d1</li></ul>
4284 <dl><dd><ul><li>d2</li></ul></dd></dl></dd></dl>
4290 Definition Lists: Mixed Lists: Test 9
4294 <ul><li><dl><dt>foo </dt>
4295 <dd>bar</dd></dl></li></ul>
4301 Definition Lists: Mixed Lists: Test 10
4305 <ul><li><ol><li><dl><dt>foo </dt>
4306 <dd>bar</dd></dl></li></ol></li></ul>
4310 # The Parsoid team disagrees with the PHP parser's seemingly-random
4311 # rules regarding dd/dt on the next few tests. Parsoid is more
4312 # consistent, and recognizes the shared nesting and keeps the
4313 # still-open tags around until the nesting is complete.
4315 # This is a regression test for T175099
4317 Definition Lists: Mixed Lists: Test 11
4324 <ul><li>b</li></ul></dd></dl>
4328 <dd><ul><li>b</li></ul></dd></dl>
4331 # FIXME: Maybe get rid of this test?
4333 Definition Lists: Mixed Lists: Test 12
4338 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4339 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dd></dl></li></ul></dd></dl>
4340 <dl><dt>boo </dt>
4341 <dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
4344 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt>
4345 <dd><ul><li><dl><dt><dl><dt>bar</dt></dl></dt></dl></li></ul></dd></dl></li></ol></li></ul>
4346 <dl><dt>boo </dt>
4347 <dd>baz</dd></dl></li></ol></li></ul>
4364 <dt>foo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4365 <dd data-parsoid='{"stx":"row"}'>bar</dd>
4369 <dt>boo<span typeof="mw:Placeholder" data-parsoid='{"src":" "}'> </span></dt>
4370 <dd data-parsoid='{"stx":"row"}'>baz</dd>
4378 # FIXME: Maybe get rid of this test?
4380 # * The test is wrong, there are two colons where there should be :;
4381 # * The PHP parser is wrong to close the <dl> after the <dt> containing the <ul>.
4383 Definition Lists: Weird Ones: Test 1
4385 *#;*::;;foo :bar (who uses this?)
4387 <ul><li><ol><li><dl><dt>foo </dt>
4388 <dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt>bar (who uses this?)</dt></dl></dt></dl></dd></dl></dd></dl></li></ul></dd></dl></li></ol></li></ul>
4405 <dt>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span></dt>
4406 <dd data-parsoid='{"stx":"row"}'>bar (who uses this?)</dd>
4418 Definition Lists: colons occurring in tags
4435 <dt><span>a:b</span></dt>
4436 <dt><div>a:b</div></dt>
4437 <dt><div>a</div></dt>
4441 <dt><i>a:b</i></dt></dl>
4442 <dl><dt><dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4444 <dl><dt>a</dt><dd data-parsoid='{"stx":"row"}'>b</dd>
4446 <dt><i data-parsoid='{"stx":"html"}'>a:b</i></dt>
4447 <dt><span data-parsoid='{"stx":"html"}'>a:b</span></dt>
4448 <dt><div data-parsoid='{"stx":"html"}'>a:b</div></dt>
4449 <dt><div data-parsoid='{"stx":"html","autoInsertedEnd":true}'>a</div></dt>
4451 <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>
4452 <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>
4453 <dl><dt><dl><dt><i>a:b</i></dt></dl></dt></dl></dt></dl>
4456 # Parsoid's output differs here again because it shares
4457 # nesting between the two lists unlike the PHP parser.
4458 # Unsure which is more desirable.
4460 Definition Lists: colons and tables 1
4472 </td></tr></table></dd></dl>
4476 </td></tr></table></dd></dl>
4482 </td></tr></table></dd>
4486 </td></tr></table></dd></dl>
4489 # FIXME: Does this need a html/php section?
4491 Definition Lists: template interaction
4493 ::{{definition_list}}
4496 ::{{definition_list}}
4501 <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">
4502 </span><dd about="#mwt1">two</dd></dl></dd></dl>
4504 <dl><dd data-parsoid='{}'>one
4505 <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">
4506 </span><dd about="#mwt2">two
4508 <dd>three</dd></dl></dd>
4509 <dd data-parsoid='{}'>four</dd></dl></dd></dl>
4517 External links: non-bracketed
4519 Non-bracketed: http://example.com
4521 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4525 # parsoid doesn't explicitly mark autonumbered links, see T55505
4527 External links: numbered
4529 Numbered: [http://example.com]
4530 Numbered: [http://example.net]
4531 Numbered: [http://example.com]
4533 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
4534 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
4535 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
4538 <p>Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>
4539 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.net"></a>
4540 Numbered: <a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a></p>
4544 External links: specified text
4546 Specified text: [http://example.com link]
4548 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
4553 External links: trail
4555 Linktrails should not work for external links: [http://example.com link]s
4557 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
4562 External links: dollar sign in URL
4564 http://example.com/1$2345
4566 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
4570 # parsoid doesn't explicitly mark autonumbered links, see T55505
4572 External links: dollar sign in URL (autonumber)
4574 [http://example.com/1$2345]
4576 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
4579 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/1$2345"></a></p>
4583 External links: open square bracket forbidden in URL (T6377)
4585 parsoid=wt2html,wt2wt,html2html
4587 http://example.com/1[2345
4589 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
4592 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/1">http://example.com/1</a>[2345</p>
4596 External links: open square bracket forbidden in URL (named) (T6377)
4598 parsoid=wt2html,html2html
4600 [http://example.com/1[2345]
4602 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4605 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/1">[2345</a></p>
4608 # parsoid adds a space before the link name
4610 External links: open square bracket forbidden in URL (named) (T6377)
4613 [http://example.com/1 [2345]
4615 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
4620 External links: nowiki in URL link text (T8230)
4622 [http://example.com/ <nowiki>''example site''</nowiki>]
4624 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
4629 External links: newline forbidden in text (T8230 regression check)
4631 [http://example.com/ first
4634 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
4640 External links: Pipe char between url and text
4642 [http://example.com | link]
4644 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
4649 External links: protocol-relative URL in brackets
4651 [//example.com/ Test]
4653 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
4657 # parsoid doesn't explicitly mark autonumbered links, see T55505
4659 External links: protocol-relative URL in brackets without text
4663 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
4666 <p><a rel="mw:ExtLink" class="external autonumber" href="//example.com"></a></p>
4670 External links: protocol-relative URL in free text is left alone
4674 <p>//example.com/Foo
4679 External links: protocol-relative URL in the middle of a word is left alone (T32269)
4681 foo//example.com/Foo
4683 <p>foo//example.com/Foo
4687 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
4689 External links: with no contents
4691 parsoid=wt2html,wt2wt
4693 [http://en.wikipedia.org/wiki/Foo]
4695 [[wikipedia:Foo|Bar]]
4697 [[wikipedia:Foo|<span>Bar</span>]]
4699 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo">[1]</a>
4700 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
4701 </p><p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo"><span>Bar</span></a>
4704 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/wiki/Foo"></a></p>
4705 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo">Bar</a></p>
4706 <p><a rel="mw:WikiLink/Interwiki" href="http://en.wikipedia.org/wiki/Foo" title="wikipedia:Foo"><span>Bar</span></a></p>
4710 External links: Free with trailing punctuation
4720 http://example.com/url_with_(brackets)
4721 (http://example.com/url_without_brackets)
4722 http://example.com/url_with_entity&
4723 http://example.com/url_with_entity&
4724 http://example.com/url_with_entity&
4725 http://example.com/url_with_entity
4726 http://example.com/url_with_entity 
4727 http://example.com/url_with_entity 
4728 http://example.com/url_with_entity<
4729 http://example.com/url_with_entity<
4730 http://example.com/url_with_entity<
4732 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
4733 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>;
4734 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>\
4735 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.
4736 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
4737 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>!
4738 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>?
4739 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
4740 <a rel="nofollow" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4741 (<a rel="nofollow" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4742 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4743 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4744 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4745 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4746 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4747 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a> 
4748 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4749 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4750 <a rel="nofollow" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><
4753 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>,
4754 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>;
4755 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>\
4756 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>.
4757 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>:
4758 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>!
4759 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>?
4760 <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)
4761 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_(brackets)">http://example.com/url_with_(brackets)</a>
4762 (<a rel="mw:ExtLink" class="external free" href="http://example.com/url_without_brackets">http://example.com/url_without_brackets</a>)
4763 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4764 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4765 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&">http://example.com/url_with_entity&</a>
4766 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>
4767 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#xA0;","srcContent":" "}'> </span>
4768 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#160;","srcContent":" "}'> </span>
4769 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>
4770 <a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity">http://example.com/url_with_entity</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x3C;","srcContent":"<"}'><</span>
4771 <a rel="mw:ExtLink" class="external free" 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>
4775 External links: tricky Parsoid html2html case
4777 parsoid=wt2html,wt2wt,html2html
4779 http://example.com/url_with_entity&amp;
4781 <p><a rel="nofollow" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;
4784 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/url_with_entity&amp">http://example.com/url_with_entity&amp</a>;</p>
4788 External links: Free with trailing quotes (T113666)
4790 '''News:''' Stuff here
4794 <p><b>News:</b> Stuff here
4795 </p><p><a rel="nofollow" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e
4798 <p><b>News:</b> Stuff here</p>
4799 <p><a rel="mw:ExtLink" class="external free" href="news:'a'b">news:'a'b</a><i>c</i>d e</p>
4803 External links: with entity
4805 [http:// www.librarieswithoutborders.org Libraries without borders]
4807 <p><a rel="nofollow" class="external text" href="http://+www.librarieswithoutborders.org">Libraries without borders</a>
4810 <p><a rel="mw:ExtLink" class="external text" 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>
4814 External links: Lone protocols are never linked (T105697)
4833 External links: No preceding word characters allowed (T67278)
4835 NOPEhttp://example.com
4836 N0http://example.com
4837 ok:http://example.com
4838 ok-http://example.com
4840 <p>NOPEhttp://example.com
4841 N0http://example.com
4842 ok:<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4843 ok-<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
4848 External links: nofollow domain exception
4850 A [https://no-nofollow.org/foobar link], and another [https://example.org link].
4852 <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>.
4859 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4861 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4866 External image from https
4868 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4870 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png"/>
4875 External image (when not allowed)
4877 wgAllowExternalImages=0
4879 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
4881 <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>
4886 Link to non-http image, no img tag
4888 Link to non-http image, no img tag: ftp://example.com/test.jpg
4890 <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>
4895 External links: terminating separator
4897 Terminating separator: http://example.com/thing,
4899 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
4904 External links: intervening separator
4906 Intervening separator: http://example.com/1,2,3
4908 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
4913 External links: old bug with URL in query
4915 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
4917 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
4922 External links: old URL-in-URL bug, mixed protocols
4924 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
4926 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
4930 # Since Parsoid is starting to emit canonical wikitext for links,
4931 # [http://example.com http://example.com] will not RT back to that
4934 External links: URL in text
4938 URL in text: [http://example.com http://example.com]
4940 <p>URL in text: <a rel="nofollow" class="external text" href="http://example.com">http://example.com</a>
4943 <p>URL in text: <a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
4947 External links: Clickable images
4949 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
4951 <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>
4954 <p>ja-style clickable images: <a rel="mw:ExtLink" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" data-parsoid='{"type":"extlink"}'/></a></p>
4958 External links: raw ampersand
4960 Old & use: http://x&y
4962 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4967 External links: encoded ampersand
4969 Old & use: http://x&y
4971 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
4974 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external free" href="http://x&y">http://x&y</a></p>
4978 External links: encoded equals (T8102)
4980 http://example.com/?foo=bar
4982 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
4985 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a></p>
4989 ## Note that parsoid doesn't explicit mark autonumbered links, nor
4990 ## does it number them. As discussed in T55505, we can identify
4991 ## autonumbered links via CSS.
4995 External links: [raw ampersand]
4997 Old & use: [http://x&y]
4999 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5002 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5005 # note that parsoid html is identical to [raw ampersand] case; so html2wt
5006 # mode will return the [raw ampersand] wikitext
5008 External links: [encoded ampersand]
5010 parsoid=wt2html,wt2wt,html2html
5012 Old & use: [http://x&y]
5014 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
5017 <p>Old <span typeof="mw:Entity">&</span> use: <a rel="mw:ExtLink" class="external autonumber" href="http://x&y"></a></p>
5021 External links: [raw equals]
5023 [http://example.com/?foo=bar]
5025 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5028 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5031 # note that parsoid html is identical to [raw equals] case; so html2wt
5032 # mode will return the [raw equals] wikitext
5034 External links: [encoded equals] (T8102)
5036 parsoid=wt2html,wt2wt,html2html
5038 [http://example.com/?foo=bar]
5040 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
5043 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/?foo=bar"></a></p>
5046 # xxx parsoid strips the IDN character, so the round-trip tests will
5047 # obviously fail and are disabled. --cscott
5049 External links: [IDN ignored character reference in hostname; strip it right off]
5051 parsoid=wt2html,wt2wt,html2html
5053 [http://e‌xample.com/]
5055 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
5058 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com/"></a></p>
5061 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
5062 # Where an external link could easily circumvent the sanitization of the text of
5063 # a link like this (where an IDN-ignore character is in the URL somewhere), this
5064 # test demands a higher standard. That's a bit strange.
5068 # http://example.com -> [http://example.com|http://example.com]
5069 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
5071 # The first example is sanitized, but the second is not. Any security benefits
5072 # from this production are trivial to circumvent. Either remove this test and
5073 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
5074 # the test accordingly.
5078 # xxx parsoid strips the IDN character, so the round-trip tests will
5079 # obviously fail and are disabled. --cscott
5081 External links: IDN ignored character reference in hostname; strip it right off
5083 parsoid=wt2html,html2html
5085 http://e‌xample.com/
5087 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
5090 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/">http://example.com/</a></p>
5094 External links: www.jpeg.org (T2554)
5098 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
5102 # parsoid doesn't explicitly mark autonumbered links, see T55505
5104 External links: URL within URL (T2002)
5106 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
5108 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
5111 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp"></a></p>
5115 T2361: URL inside bracketed URL
5117 [http://www.example.com/foo http://www.example.com/bar]
5119 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
5124 T2361: URL within URL, not bracketed
5126 http://www.example.com/foo?=http://www.example.com/bar
5128 <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>
5133 T2289: ">"-token in URL-tail
5135 http://www.example.com/<hello>
5137 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
5142 T2289: literal ">"-token in URL-tail
5144 http://www.example.com/<b>html</b>
5146 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
5149 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/" data-parsoid='{"stx":"url"}'>http://www.example.com/</a><b data-parsoid='{"stx":"html"}'>html</b></p>
5153 T2289: ">"-token in bracketed URL
5155 [http://www.example.com/<hello> stuff]
5157 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
5162 T2289: literal ">"-token in bracketed URL
5164 [http://www.example.com/<b>html</b> stuff]
5166 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
5171 T2289: literal double quote at end of URL
5173 http://www.example.com/"hello"
5175 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
5180 T2289: literal double quote in bracketed URL
5182 [http://www.example.com/"hello" stuff]
5184 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
5189 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (T7081)
5191 [http://www.example.com test]
5193 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
5198 External links: link text with spaces
5200 [http://www.example.com a b c]
5201 [http://www.example.com ''a'' ''b'']
5203 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
5204 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
5208 # Note edge case difference between PHP and Parsoid here.
5210 External links: wiki links within external link (T5695)
5212 parsoid=wt2html,html2html
5214 [http://example.com [[wikilink]] embedded in ext link]
5216 [http://example.com test [[wikilink]] embedded in ext link]
5218 <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>
5219 </p><p><a rel="nofollow" class="external text" href="http://example.com">test </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>
5222 <p><a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5223 <p><a rel="mw:ExtLink" class="external text" href="http://example.com">test </a><a rel="mw:WikiLink" href="./Wikilink" title="Wikilink">wikilink</a><span> embedded in ext link</span></p>
5227 T2787: Links with one slash after the url protocol are invalid
5231 [http:/example.com title]
5233 <p>http:/example.com
5234 </p><p>[http:/example.com title]
5239 Bracketed external links with template-generated invalid target
5241 [{{echo|http:/example.com}} title]
5243 <p>[http:/example.com title]
5247 # wt2html only because Parsoid would want to add <nowiki>s coming from html
5249 Broken wikilinks (but not external links) prevent templates from closing
5253 [http://example.com x
5255 {{echo|[http://example.com x}}
5261 <p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5262 </p><p>[<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> x
5264 </p><p>{{echo|[[Foo}}
5267 <p>[<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a> x</p>
5268 <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" class="external free" href="http://example.com">http://example.com</a> x</p>
5270 <p>{{echo|[[Foo}}</p>
5274 Wikilinks with embedded newlines are not broken
5285 <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>
5297 <p>{{echo|<a href="/wiki/Foo" title="Foo">}}</a>
5301 <p>{{echo|<a rel="mw:WikiLink" href="./Foo" title="Foo">}}</a></p>
5302 <p>[[Foo|<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"]]"}},"i":0}}]}'>]]</span></p>
5306 T4702: Mismatched <i>, <b> and <a> tags are invalid
5308 ''[http://example.com text'']
5309 [http://example.com '''text]'''
5310 ''Something [http://example.com in italic'']
5311 ''Something [http://example.com mixed''''', even bold]'''
5312 '''''Now [http://example.com both''''']
5314 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
5315 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
5316 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
5317 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
5318 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
5326 http://www.example.com/?title=AT%26T
5328 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
5331 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a></p>
5334 # According to https://www.w3.org/TR/2011/WD-html5-20110525/Overview.html#parsing-urls a plain
5335 # % is actually legal in HTML5. Any change in output would need testing though.
5337 T6781, T7267: %25 in URL
5339 http://www.example.com/?title=100%25_Bran
5341 <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>
5344 <p><a rel="mw:ExtLink" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a></p>
5348 T6781, T7267: %28, %29 in URL
5350 http://www.example.com/?title=Ben-Hur_%281959_film%29
5352 <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>
5355 <p><a rel="mw:ExtLink" 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></p>
5360 T6781: %26 in autonumber URL
5362 [http://www.example.com/?title=AT%26T]
5364 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
5367 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=AT%26T"></a></p>
5371 T6781, T7267: %26 in autonumber URL
5373 [http://www.example.com/?title=100%25_Bran]
5375 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
5378 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=100%25_Bran"></a></p>
5382 T6781, T7267: %28, %29 in autonumber URL
5384 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
5386 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
5389 <p><a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29"></a></p>
5394 T6781: %26 in bracketed URL
5396 [http://www.example.com/?title=AT%26T link]
5398 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
5401 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=AT%26T">link</a></p>
5405 T6781, T7267: %25 in bracketed URL
5407 [http://www.example.com/?title=100%25_Bran link]
5409 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
5414 T6781, T7267: %28, %29 in bracketed URL
5416 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
5418 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
5421 <p><a rel="mw:ExtLink" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a></p>
5425 External link containing a period in the anchor. (T65947)
5427 [//foo.org/bar#baz. bang]
5429 [//foo.org/bar. bang]
5431 <p><a rel="nofollow" class="external text" href="//foo.org/bar#baz.">bang</a>
5432 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar.">bang</a>
5435 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar#baz.">bang</a></p>
5436 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar.">bang</a></p>
5440 External link containing a single quote. (T65947)
5444 [//foo.org/bar'baz bang]
5446 <p><a rel="nofollow" class="external autonumber" href="//foo.org/bar'baz">[1]</a>
5447 </p><p><a rel="nofollow" class="external text" href="//foo.org/bar'baz">bang</a>
5450 <p><a rel="mw:ExtLink" class="external autonumber" href="//foo.org/bar'baz"></a></p>
5451 <p><a rel="mw:ExtLink" class="external text" href="//foo.org/bar'baz">bang</a></p>
5455 External link containing double-single-quotes in text '' (T6598 sanity check)
5457 Some [http://example.com/ pretty ''italics'' and stuff]!
5459 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
5464 External link containing double-single-quotes in text embedded in italics (T6598 sanity check)
5466 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
5468 <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>
5472 # Don't add the html/php section since the output is broken and there isn't any reason to spec it
5474 External link containing double-single-quotes with no space separating the url from text in italics
5476 [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]].]
5478 <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>.
5481 <p><a rel="mw:ExtLink" 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 rel="mw:WikiLink" href="./Museo_Picasso_(París)" title="Museo Picasso (París)">Museo Picasso</a><span>.</span></p>
5485 External link with comments in link text
5487 [http://www.google.com Google <!-- comment -->]
5489 <p><a rel="nofollow" class="external text" href="http://www.google.com">Google </a>
5492 <p><a rel="mw:ExtLink" class="external text" href="http://www.google.com">Google <!-- comment --></a></p>
5496 External link to bare IPv4 address
5498 [http://192.168.0.1 Link]
5500 <p><a rel="nofollow" class="external text" href="http://192.168.0.1">Link</a>
5503 <p><a rel="mw:ExtLink" class="external text" href="http://192.168.0.1">Link</a></p>
5507 URL-encoding in URL functions (single parameter)
5509 {{localurl:Some page|amp=&}}
5511 <p>/index.php?title=Some_page&amp=&
5516 URL-encoding in URL functions (multiple parameters)
5518 {{localurl:Some page|q=?&=&}}
5520 <p>/index.php?title=Some_page&q=?&amp=&
5527 http://example.com/index.php?foozoid%5B%5D=bar
5529 http://example.com/index.php?foozoid[]=bar
5531 <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>
5532 </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>
5535 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a></p>
5537 <p><a rel="mw:ExtLink" class="external free" 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>
5541 IPv6 urls, autolink format (T23261)
5543 http://[2404:130:0:1000::187:2]/index.php
5545 Examples from RFC 2373, section 2.2:
5546 *http://[1080::8:800:200C:417A]/unicast
5547 *http://[FF01::101]/multicast
5548 *http://[::1]/loopback
5549 *http://[::]/unspecified
5550 *http://[::13.1.68.3]/ipv4compat
5551 *http://[::FFFF:129.144.52.38]/ipv4compat
5553 Examples from RFC 2732, section 2:
5554 *http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html
5555 *http://[1080:0:0:0:8:800:200C:417A]/index.html
5556 *http://[3ffe:2a00:100:7031::1]
5557 *http://[1080::8:800:200C:417A]/foo
5558 *http://[::192.9.5.5]/ipng
5559 *http://[::FFFF:129.144.52.38]:80/index.html
5560 *http://[2010:836B:4179::836B:4179]
5563 <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>
5564 </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:
5566 <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>
5567 <li><a rel="nofollow" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5568 <li><a rel="nofollow" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5569 <li><a rel="nofollow" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5570 <li><a rel="nofollow" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5571 <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>
5572 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5574 <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>
5575 <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>
5576 <li><a rel="nofollow" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5577 <li><a rel="nofollow" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5578 <li><a rel="nofollow" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5579 <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>
5580 <li><a rel="nofollow" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5583 <p><a rel="mw:ExtLink" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a></p>
5585 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5586 <ul><li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/unicast">http://[1080::8:800:200C:417A]/unicast</a></li>
5587 <li><a rel="mw:ExtLink" class="external free" href="http://[FF01::101]/multicast">http://[FF01::101]/multicast</a></li>
5588 <li><a rel="mw:ExtLink" class="external free" href="http://[::1]/loopback">http://[::1]/loopback</a></li>
5589 <li><a rel="mw:ExtLink" class="external free" href="http://[::]/unspecified">http://[::]/unspecified</a></li>
5590 <li><a rel="mw:ExtLink" class="external free" href="http://[::13.1.68.3]/ipv4compat">http://[::13.1.68.3]/ipv4compat</a></li>
5591 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]/ipv4compat">http://[::FFFF:129.144.52.38]/ipv4compat</a></li></ul>
5593 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5594 <ul><li><a rel="mw:ExtLink" 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>
5595 <li><a rel="mw:ExtLink" 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>
5596 <li><a rel="mw:ExtLink" class="external free" href="http://[3ffe:2a00:100:7031::1]">http://[3ffe:2a00:100:7031::1]</a></li>
5597 <li><a rel="mw:ExtLink" class="external free" href="http://[1080::8:800:200C:417A]/foo">http://[1080::8:800:200C:417A]/foo</a></li>
5598 <li><a rel="mw:ExtLink" class="external free" href="http://[::192.9.5.5]/ipng">http://[::192.9.5.5]/ipng</a></li>
5599 <li><a rel="mw:ExtLink" class="external free" href="http://[::FFFF:129.144.52.38]:80/index.html">http://[::FFFF:129.144.52.38]:80/index.html</a></li>
5600 <li><a rel="mw:ExtLink" class="external free" href="http://[2010:836B:4179::836B:4179]">http://[2010:836B:4179::836B:4179]</a></li></ul>
5604 IPv6 urls, bracketed format (T23261)
5606 [http://[2404:130:0:1000::187:2]/index.php test]
5608 Examples from RFC 2373, section 2.2:
5609 *[http://[1080::8:800:200C:417A] unicast]
5610 *[http://[FF01::101] multicast]
5611 *[http://[::1]/ loopback]
5612 *[http://[::] unspecified]
5613 *[http://[::13.1.68.3] ipv4compat]
5614 *[http://[::FFFF:129.144.52.38] ipv4compat]
5616 Examples from RFC 2732, section 2:
5617 *[http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html 1]
5618 *[http://[1080:0:0:0:8:800:200C:417A]/index.html 2]
5619 *[http://[3ffe:2a00:100:7031::1] 3]
5620 *[http://[1080::8:800:200C:417A]/foo 4]
5621 *[http://[::192.9.5.5]/ipng 5]
5622 *[http://[::FFFF:129.144.52.38]:80/index.html 6]
5623 *[http://[2010:836B:4179::836B:4179] 7]
5626 <p><a rel="nofollow" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a>
5627 </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:
5629 <ul><li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5630 <li><a rel="nofollow" class="external text" href="http://[FF01::101]">multicast</a></li>
5631 <li><a rel="nofollow" class="external text" href="http://[::1]/">loopback</a></li>
5632 <li><a rel="nofollow" class="external text" href="http://[::]">unspecified</a></li>
5633 <li><a rel="nofollow" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5634 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5635 <p>Examples from <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc2732">RFC 2732</a>, section 2:
5637 <ul><li><a rel="nofollow" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5638 <li><a rel="nofollow" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5639 <li><a rel="nofollow" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5640 <li><a rel="nofollow" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5641 <li><a rel="nofollow" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5642 <li><a rel="nofollow" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5643 <li><a rel="nofollow" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5646 <p><a rel="mw:ExtLink" class="external text" href="http://[2404:130:0:1000::187:2]/index.php">test</a></p>
5648 <p>Examples from <a href="https://tools.ietf.org/html/rfc2373" rel="mw:ExtLink" class="external text">RFC 2373</a>, section 2.2:</p>
5649 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]">unicast</a></li>
5650 <li><a rel="mw:ExtLink" class="external text" href="http://[FF01::101]">multicast</a></li>
5651 <li><a rel="mw:ExtLink" class="external text" href="http://[::1]/">loopback</a></li>
5652 <li><a rel="mw:ExtLink" class="external text" href="http://[::]">unspecified</a></li>
5653 <li><a rel="mw:ExtLink" class="external text" href="http://[::13.1.68.3]">ipv4compat</a></li>
5654 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]">ipv4compat</a></li></ul>
5656 <p>Examples from <a href="https://tools.ietf.org/html/rfc2732" rel="mw:ExtLink" class="external text">RFC 2732</a>, section 2:</p>
5657 <ul><li><a rel="mw:ExtLink" class="external text" href="http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html">1</a></li>
5658 <li><a rel="mw:ExtLink" class="external text" href="http://[1080:0:0:0:8:800:200C:417A]/index.html">2</a></li>
5659 <li><a rel="mw:ExtLink" class="external text" href="http://[3ffe:2a00:100:7031::1]">3</a></li>
5660 <li><a rel="mw:ExtLink" class="external text" href="http://[1080::8:800:200C:417A]/foo">4</a></li>
5661 <li><a rel="mw:ExtLink" class="external text" href="http://[::192.9.5.5]/ipng">5</a></li>
5662 <li><a rel="mw:ExtLink" class="external text" href="http://[::FFFF:129.144.52.38]:80/index.html">6</a></li>
5663 <li><a rel="mw:ExtLink" class="external text" href="http://[2010:836B:4179::836B:4179]">7</a></li></ul>
5667 Non-extlinks in brackets
5676 [{{echo|foo}} ''bar'']
5677 [{{echo|foo}}l's] errand
5678 [{{echo|foo}}l's errand]
5680 [url=http://example.com]
5681 [http:// bare protocols don't count]
5694 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
5695 [http:// bare protocols don't count]
5703 [<span about="#mwt19" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5704 [<span about="#mwt20" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> bar]
5705 [<span about="#mwt21" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span> <i>bar</i>]
5706 [<span about="#mwt22" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's] errand
5707 [<span about="#mwt23" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>l's errand]
5708 [url=<span about="#mwt24" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo"}},"i":0}}]}'>foo</span>]
5709 [url=<a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>]
5710 [http:// bare protocols don't count]</p>
5714 Percent encoding in external links
5716 [https://github.com/search?l=&q=ResourceLoader+%40wikimedia Search]
5718 <p><a rel="nofollow" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a>
5721 <p><a rel="mw:ExtLink" class="external text" href="https://github.com/search?l=&q=ResourceLoader+%40wikimedia">Search</a></p>
5725 Use url link syntax for links where the content is equal the link target
5729 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
5732 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a></p>
5736 Parenthesis in external links, especially URL links
5740 http://example.com/test)
5742 http://example.com/(test)
5744 http://example.com/((test)
5746 (http://example.com/(test))
5748 (http://example.com/(test)))))
5750 http://example.com/a)b
5752 [http://example.com) foo]
5754 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5755 </p><p><a rel="nofollow" class="external free" href="http://example.com/test">http://example.com/test</a>)
5756 </p><p><a rel="nofollow" class="external free" href="http://example.com/(test)">http://example.com/(test)</a>
5757 </p><p><a rel="nofollow" class="external free" href="http://example.com/((test)">http://example.com/((test)</a>
5758 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test))">http://example.com/(test))</a>
5759 </p><p>(<a rel="nofollow" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a>
5760 </p><p><a rel="nofollow" class="external free" href="http://example.com/a)b">http://example.com/a)b</a>
5761 </p><p><a rel="nofollow" class="external text" href="http://example.com)">foo</a>
5764 <p><a rel="mw:ExtLink" class="external free" href="http://example.com">http://example.com</a>)</p>
5765 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/test">http://example.com/test</a>)</p>
5766 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/(test)">http://example.com/(test)</a></p>
5767 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/((test)">http://example.com/((test)</a></p>
5768 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test))">http://example.com/(test))</a></p>
5769 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com/(test)))))">http://example.com/(test)))))</a></p>
5770 <p><a rel="mw:ExtLink" class="external free" href="http://example.com/a)b">http://example.com/a)b</a></p>
5771 <p><a rel="mw:ExtLink" class="external text" href="http://example.com)">foo</a></p>
5775 Parenthesis in external links, w/ transclusion or comment
5777 (http://example.com/{{echo|hi}})
5779 (http://example.com<!-- hi -->)
5781 <p>(<a rel="nofollow" class="external free" href="http://example.com/hi">http://example.com/hi</a>)
5782 </p><p>(<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
5785 <p>(<a typeof="mw:ExpandedAttrs" about="#mwt2" rel="mw:ExtLink" class="external free" 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>
5787 <p>(<a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url","a":{"href":"http://example.com"},"sa":{"href":"http://example.com<!-- hi -->"}}'>http://example.com</a>)</p>
5791 Serialize <a> tags with invalid link targets as plain text
5793 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
5795 <a rel="mw:WikiLink" href="[[foo]]">text</a>
5796 <a rel="mw:WikiLink" href="[[foo]]">*text</a>
5797 <a rel="mw:WikiLink" href="[[foo]]">[[foo]]</a>
5798 <a rel="mw:WikiLink" href="[[foo]]">*a [[foo]]</a>
5801 <nowiki>*</nowiki>text
5802 <nowiki>[[foo]]</nowiki>
5803 <nowiki>*</nowiki>a <nowiki>[[foo]]</nowiki>
5807 mw:ExtLink -vs- mw:WikiLink (T94723)
5811 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"piped","a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>Bar</a>
5812 <a rel="mw:WikiLink" href="./Foo" title="Foo">Bar</a>
5813 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5814 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/Foo" title="Foo">Bar</a>
5816 <a rel="mw:ExtLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5817 <a rel="mw:WikiLink" href="http://en.wikipedia.org/wiki/European_Robin">European Robin</a>
5825 [[:en:European_Robin|European Robin]]
5826 [[:en:European_Robin|European Robin]]
5830 mw:ExtLink linking to a interwiki URL can be round-tripped losslessly (T94723)
5834 [http://en.wikipedia.org/wiki/European_Robin European Robin]
5836 THIS SECTION IS NOT USED (but Parsoid won't run the test without it)
5847 Normal text. '''Bold text.''' Normal text. ''Italic text.''
5849 Normal text. '''''Bold italic text.''''' Normal text.
5851 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
5852 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
5857 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
5858 # parser strips. The wikitext contains just the first half of the bold
5861 Unclosed and unmatched quotes
5863 '''''Bold italic text '''with bold deactivated''' in between.'''''
5865 '''''Bold italic text ''with italic deactivated'' in between.'''''
5869 ..spanning two paragraphs (should not work).'''
5871 '''Bold tag left open
5873 ''Italic tag left open
5877 <!-- Unmatching number of opening, closing tags: -->
5878 '''This year''''s election ''should'' beat '''last year''''s.
5880 ''Tom'''s car is bigger than ''Susan'''s.
5882 Plain ''italic'''s plain
5884 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5885 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5886 </p><p><b>Bold text..</b>
5887 </p><p>..spanning two paragraphs (should not work).
5888 </p><p><b>Bold tag left open</b>
5889 </p><p><i>Italic tag left open</i>
5891 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5892 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5893 </p><p>Plain <i>italic'</i>s plain
5896 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
5897 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
5898 </p><p><b>Bold text..</b>
5899 </p><p>..spanning two paragraphs (should not work).<b></b>
5900 </p><p><b>Bold tag left open</b>
5901 </p><p><i>Italic tag left open</i>
5904 <!-- Unmatching number of opening, closing tags: -->
5905 <p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
5906 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
5907 </p><p>Plain <i>italic'</i>s plain
5914 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
5917 # This should not produce <table></table> as <table><tr><td></td></tr></table>
5918 # is the bare minimum required by the spec, see:
5919 # https://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
5920 # Parsoid team replies: empty table tags are legal in HTML5
5922 A table with no data.
5935 A table with stray table end tags on start tag line (wt2html)
5939 {|style="color: red;"|}
5941 {|style="color: red;" |}
5945 {|style="color: red;"|} id="foo"
5949 {|style="color: red;" |} id="foo"
5953 <table style="color: red;"></table>
5955 <table style="color: red;">
5961 <table style="color: red;" id="foo">
5967 <table style="color: red;" id="foo">
5976 A table with no data (take 2)
5984 # A table with nothing but a caption is invalid XHTML, we might want to render
5985 # this as <p>caption</p>
5986 # Parsoid team replies: table with only a caption is legal in HTML5
5988 A table with nothing but a caption
5996 </caption><tr><td></td></tr></table>
5999 <table><caption>caption</caption></table>
6003 A table with caption with default-spaced attributes and a table row
6006 |+ style="color: red;" | caption1
6012 <caption style="color: red;">caption1
6021 A table with captions with non-default spaced attributes and a table row
6024 |+style="color: red;"|caption2
6025 |+ style="color: red;"|caption3
6031 <caption style="color: red;">caption2
6033 <caption style="color: red;">caption3
6042 Table td-cell syntax variations
6047 |style='color:red;'|baz
6048 |style='color:red;'||baz
6055 <td>foo bar foo</td>
6058 <td style="color:red;">baz
6060 <td>style='color:red;'</td>
6088 Simple table but with multiple dashes for row wikitext
6107 Multiplication table
6109 {| border="1" cellpadding="2"
6110 |+Multiplication table
6130 <table border="1" cellpadding="2">
6131 <caption>Multiplication table
6178 Accept "||" in table headings
6193 Accept "!!" in table data
6207 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> Foo!! </td><td data-parsoid='{"stx":"row","autoInsertedEnd":true}'></td></tr>
6212 Accept "||" in indented table headings
6222 </th></tr></table></dd></dl>
6227 Accept "!!" in templates
6241 <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>
6245 Accept "!!" in table headings after newline
6262 <p>b!!c</p></th></tr>
6267 Accept "!!" in table data of mixed wikitext / html syntax
6271 <tr><td>b!!c</td></tr>
6277 </th></tr><tr><td>b!!c</td></tr>
6281 <tbody><tr><th>a</th></tr>
6282 <tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>b!!c</td></tr>
6287 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
6304 Accept "| !" at start of line in tables (ignore !-attribute)
6308 |!style="color:red"|bar
6320 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 +/-
6324 |style='color:red;'|+1
6325 |style='color:blue;'|-1
6337 <td style="color:red;">+1
6339 <td style="color:blue;">-1
6363 |rowspan=2|Cell 2, row 1 (and 2)
6374 <td rowspan="2">Cell 2, row 1 (and 2)
6392 {| bgcolor=#ABCDEF border=2
6397 |the original table again
6405 <table bgcolor="#ABCDEF" border="2">
6413 <td>the original table again
6419 Invalid attributes in table cell (T3830)
6433 Table cell attributes: Pipes protected by nowikis should be treated as a plain character
6437 | title="foo<nowiki>|</nowiki>" |bar
6438 | title="foo<nowiki>|</nowiki>" bar
6445 <td title="foo|">bar
6447 <td>title="foo|" bar
6452 <tbody><tr><td title="foo">bar</td>
6453 <td title="foo|" data-parsoid='{"a":{"title":"foo|"},"sa":{"title":"foo<nowiki>|</nowiki>"},"autoInsertedEnd":true}'>bar</td>
6454 <td> title="foo<span typeof="mw:Nowiki">|</span>" bar</td></tr>
6458 # See: http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html
6459 # N.B. The "|}" to close the table is missing from the input, so parsoid's
6460 # *2wt modes will fail.
6462 Table security: embedded pipes
6464 parsoid=wt2html,html2html
6467 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
6471 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
6472 <td>]" onmouseover="alert(document.cookie)">test
6480 <td data-parsoid='{"startTagSrc":"| ","attrSepSrc":"|","autoInsertedEnd":true}'>[<a rel="mw:ExtLink" class="external free" 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>
6484 Element attributes with double ! should not be broken up by <th>
6487 !hi <div class="!!">ha</div> ho
6492 <th>hi <div class="!!">ha</div> ho
6497 <tbody><tr><th>hi <div class="!!" data-parsoid='{"stx":"html"}'>ha</div> ho</th></tr>
6502 ! and || in element attributes should not be parsed as <th>/<td>
6505 |<div style="color: red !important;" data-contrived="put this here ||">hi</div>
6510 <td><div style="color: red !important;" data-contrived="put this here ||">hi</div>
6515 <tbody><tr><td><div style="color: red !important;" data-contrived="put this here ||" data-parsoid='{"stx":"html"}'>hi</div></td></tr>
6519 # FIXME: The output seems broken. Filed as T110268.
6521 ! and || in td attributes should not be parsed as <th>/<td>
6526 |style="color: red !important;" data-contrived="put this here ||"|foo
6531 <td>style="color: red !important;" data-contrived="put this here</td>
6537 <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>
6542 Break on | in element attribute in template
6544 parsoid=wt2html,html2html
6546 {{echo|1=<div class="hi|ho">ha</div>}}
6548 <p>ho">ha</div>
6551 <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>
6555 Break on | in element attribute name in template
6557 {{echo|<div cla|ss="hiho">ha</div>}}
6559 <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>
6563 Don't break on | in extension attribute in template
6565 {{echo|<ref name="hi|ho">ha</ref>}}
6569 <p><sup 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></sup></p>
6571 <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>
6574 ## We don't support roundtripping of these attributes in Parsoid.
6575 ## Selective serialization takes care of preventing dirty diffs.
6576 ## But, on edits, we dirty-diff the invalid attribute text.
6578 Invalid text in table attributes should be discarded
6582 {| <span>boo</span> style='border:1px solid black'
6583 | <span>boo</span> style='color:blue' |1
6584 |<span>boo</span> style='color:blue'|2
6587 <table style="border:1px solid black">
6589 <td style="color:blue">1
6591 <td style="color:blue">2
6595 <table style="border:1px solid black">
6597 <td style="color:blue">1</td>
6598 <td style="color:blue">2</td>
6604 Invalid text in table attributes should be preserved by selective serializer
6607 "modes": ["selser"],
6609 ["td:first-child", "text", "abc"],
6610 ["td + td", "text", "xyz"]
6614 {| <span>boo</span> style='border:1px solid black'
6615 | <span>boo</span> style='color:blue' | 1
6616 |<span>boo</span> style='color:blue'| 2
6619 {| <span>boo</span> style='border:1px solid black'
6620 | <span>boo</span> style='color:blue' |abc
6621 |<span>boo</span> style='color:blue'|xyz
6626 1. Template-generated table cell attributes and cell content
6631 || {{table_attribs_5}}
6632 | <!--foo--> <!--bar--> <!--baz--> {{table_attribs}}
6633 |align=center {{table_attribs}}
6634 | <!--foo--> align=center <!--bar--> {{table_attribs}}
6639 <td style="color:red;">Foo
6641 <td style="color:red;">Foo
6643 <td>style="color:red;"</td>
6646 <td style="color:red;">Foo
6648 <td align="center" style="color:red;">Foo
6650 <td align="center" style="color:red;">Foo
6656 2. Template-generated table cell attributes and cell content
6659 |{{table_attribs_2}}
6664 <td style="color:red;">Foo
6672 <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>
6673 <td about="#mwt1">Bar</td><td about="#mwt1">Baz</td></tr>
6678 3. Template-generated table cell attributes and cell content
6681 !align=center {{table_header_cells}}
6683 |align=center {{table_cells}}
6688 <th align="center" style="color:red;">Foo</th>
6689 <th style="color:red;"><i>Bar</i></th>
6690 <th style="color:brown;"><i>Foo</i> and Baz
6693 <td align="center" style="color:red;">Foo</td>
6694 <td style="color:red;"><i>Bar</i></td>
6695 <td style="color:brown;"><i>Foo</i> and Baz
6700 <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>
6701 <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>
6706 4. Template-generated table cell attributes and cell content inside a templated table
6709 !align=center {{table_header_cells}}
6711 |align=center {{table_cells}}
6716 <th align="center" style="color:red;">Foo</th>
6717 <th style="color:red;"><i>Bar</i></th>
6718 <th style="color:brown;"><i>Foo</i> and Baz
6721 <td align="center" style="color:red;">Foo</td>
6722 <td style="color:red;"><i>Bar</i></td>
6723 <td style="color:brown;"><i>Foo</i> and Baz
6727 <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}}]}'>
6728 <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>
6730 <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>
6734 ## Edge case fix to prevent future regressions
6736 T107652: <ref>s in templates that also generate table cell attributes should be rendered properly
6739 |{{table_attribs_7}}
6744 <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<sup 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" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></s></td></tr>
6746 <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>
6750 Table with row followed by newlines and table heading
6752 parsoid=wt2html,html2html
6770 Table with empty line following the start tag
6772 parsoid=wt2html,html2html
6790 Table attributes with empty value
6792 parsoid=wt2html,html2html
6805 <tbody><tr><td style="">hello</td></tr>
6810 Wikitext table with a lot of comments
6833 Wikitext table comments represented in parsoid dom
6835 {|<!--c1--><!--c2-->
6844 </td></tr></tbody></table>
6846 <table><!--c1--><!--c2-->
6847 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'><!--c3-->
6848 <td data-parsoid='{"autoInsertedEnd":true}'>x</td></tr>
6853 Wikitext table with double-line table cell
6870 Table cell with a single comment
6887 Table-cell after a comment-only-empty-line
6904 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>a</td>
6906 <!--c2--><td data-parsoid='{"autoInsertedEnd":true}'>b</td></tr>
6912 Build table with {{!}}
6914 {{{!}} class="wikitable"
6917 {{!}}- style="color:red;"
6918 {{!}}data{{!}}{{!}} style="color:red;" {{!}}second data
6921 <table class="wikitable">
6927 <tr style="color:red;">
6929 <td style="color:red;">second data
6935 Build table with pipe as data
6937 {| class="wikitable"
6940 |- style="color:red;"
6941 |data|| style="color:red;" |second data
6943 | style="color:red;" |data with | || style="color:red;" | second data with |
6945 ||data with | |||second data with |
6948 <table class="wikitable">
6954 <tr style="color:red;">
6956 <td style="color:red;">second data
6959 <td style="color:red;">data with |</td>
6960 <td style="color:red;">second data with |
6963 <td>data with |</td>
6964 <td>second data with |
6970 Build table with wikilink
6972 {| class="wikitable"
6973 !header||second header
6974 |- style="color:red;"
6975 |data [[Main Page|linktext]]||second data [[Main Page|linktext]]
6977 |data||second data [[Main Page|link|text with pipe]]
6980 <table class="wikitable">
6985 <tr style="color:red;">
6986 <td>data <a href="/wiki/Main_Page" title="Main Page">linktext</a></td>
6987 <td>second data <a href="/wiki/Main_Page" title="Main Page">linktext</a>
6991 <td>second data <a href="/wiki/Main_Page" title="Main Page">link|text with pipe</a>
6996 # The expected HTML structure in this test is debatable. The PHP parser does
6997 # not parse this kind of table at all. The main focus for Parsoid is on
6998 # round-tripping, so this output is ok for now. TODO: revisit!
7000 Wikitext table with html-syntax row
7010 <td>foo</td></tr></tbody></table>
7014 Fostered content in tables: Plain text
7016 parsoid=wt2html,html2html
7034 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>a</p><table>
7035 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7037 </tr></tbody></table>
7041 Fostered content in tables: Lists
7043 parsoid=wt2html,html2html
7056 <ul><li>a</li></ul><table>
7061 <ul data-parsoid='{"fostered":true,"autoInsertedEnd":true}'><li>a</li></ul><table>
7062 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7064 </tr></tbody></table>
7068 Template generated table cell with attributes
7072 {{table_attribs_4}} ||a||b
7078 <td style="background-color:#DC241f;" width="10px"></td>
7081 </td></tr></tbody></table>
7084 <tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
7085 <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>
7089 Parsoid: Round-trip tables directly followed by content (T53219)
7091 parsoid=wt2html,wt2wt
7104 </td></tr></tbody></table><p> bar
7108 </td></tr></tbody></table><p><b>quux</b>
7113 Parsoid: Default to a newline after tables in new content (T53219)
7118 <tr><td>foo</td></tr></tbody></table> bar
7120 <tr><td>baz</td></tr></tbody></table><b>quux</b>
7125 <nowiki> </nowiki>bar
7133 Parsoid: newline inducing block nodes don't suppress <nowiki>
7145 Parsoid: Row-syntax table headings followed by comment & table cells
7147 parsoid=wt2html,wt2wt
7151 <!-- foo --> ||baz||quux
7165 <tbody><tr><th> foo </th><th> bar
7166 <!-- foo --> </th><td> baz </td><td> quux</td></tr>
7171 Parsoid: Recover better from broken table attributes
7185 </td></tr></tbody></table>
7190 <p>foo</p></td></tr>
7195 Tables: Digest broken attributes on table and tr tag
7206 <tr class='mw-empty-elt'></tr>
7207 <tr class='mw-empty-elt'></tr>
7211 # T137406: Whitespace in the HTML
7213 1. Generate correct wikitext for tables with thead/tbody/tfoot
7218 <caption>Test</caption>
7280 </td></tr></tbody></table>
7283 # T137406: No whitespace in the HTML
7285 2. Generate correct wikitext for tables with thead/tbody/tfoot
7289 <table><thead><tr><th>heading</th></tr></thead><tbody><tr><td>foo</td></tr></tbody></table>
7299 Testing serialization after deletion in references
7308 hi <ref><div id="x">ho</div></ref>
7318 Testing serialization after deletion of table cells
7321 "modes": ["wt2wt", "selser"],
7329 | id="x" |c1 {{!}}{{!}}{{!}}c2 |||c3
7339 Testing selser after addition of new row before first row (T125419)
7342 "modes": ["wt2wt", "selser"],
7344 [ "tr", "before", "<tr><td>X</td></tr>" ]
7360 Serialize new table rows in a HTML table using HTML tags
7363 "modes": ["wt2wt", "selser"],
7365 [ "tr", "before", "<tr><td>X</td></tr>" ]
7369 <table><tr><td>a</td></tr></table>
7371 <table><tr><td>X</td></tr><tr><td>a</td></tr></table>
7375 Serialize new table cells in a HTML row using HTML tags
7378 "modes": ["wt2wt", "selser"],
7380 [ "td", "before", "<td>X</td>" ]
7384 <table><tr><td>a</td></tr></table>
7386 <table><tr><td>X</td><td>a</td></tr></table>
7390 Wikitext tables can be nested inside HTML tables
7394 <table data-parsoid='{"stx":"html"}'>
7397 <tr><td>foo</td></tr>
7412 Serialize wikitext list items as HTML list items when embedded in a HTML list
7416 <ul data-parsoid='{"stx": "html"}'>
7417 <li data-parsoid='{}'>a</li>
7427 # SSS FIXME: Is this actually a good thing given the
7428 # odd nested list output that is generated by MW?
7429 # <ul><li>foo<ul>..</ul></li></ul> instead of
7430 # <ul><li>foo</li><ul>..</ul></ul>
7432 Wikitext lists can be nested inside HTML lists
7436 <ul data-parsoid='{"stx": "html"}'>
7437 <li data-parsoid='{"stx": "html"}'>a
7442 <ul data-parsoid='{"stx": "html"}'>
7465 Plain link, capitalized
7469 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
7474 Plain link, uncapitalized
7478 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
7485 [[Main Page|The Main Page]]
7487 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7492 Piped link with comment in link text
7494 [[Main Page|The Main<!--front--> Page]]
7496 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
7501 Piped link with multiple pipe characters in link text
7503 [[Main Page||The|Main|Page|]]
7505 <p><a href="/wiki/Main_Page" title="Main Page">|The|Main|Page|</a>
7508 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">|The|Main|Page|</a></p>
7512 Piped link with no link text
7514 [[Thomas Bek (bishop of St David's)|]]
7516 <p>[[Thomas Bek (bishop of St David's)|]]
7519 <p>[[Thomas Bek (bishop of St David's)|]]</p>
7523 Piped link with empty link text
7525 [[Main Page|<nowiki/>]] - empty nowiki
7526 [[Main Page| ]] - empty space
7527 [[Main Page| ]] - empty non breaking space
7529 <p><a href="/wiki/Main_Page" title="Main Page"></a> - empty nowiki
7530 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty space
7531 <a href="/wiki/Main_Page" title="Main Page"> </a> - empty non breaking space
7534 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page"><span typeof="mw:Nowiki"></span></a> - empty nowiki
7535 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page"> </a> - empty space
7536 <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>
7544 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
7549 Broken link with fragment
7551 [[Zigzagzogzagzig#zug]]
7553 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
7558 Special page link with fragment
7560 [[Special:Version#anchor]]
7562 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
7567 Nonexistent special page link with fragment
7569 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
7571 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
7578 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
7580 <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>
7587 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
7589 <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>!!!
7600 T45661: Piped links with identical prefixes
7602 [[prefixed article|prefixed articles with spaces]]
7604 [[prefixed article|prefixed articlesaoeu]]
7606 [[Main Page|Main Page test]]
7608 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
7609 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
7610 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
7616 Link with HTML entity in suffix / tail
7618 [[Main Page]]", [[Main Page]]a
7620 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
7623 <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>
7627 Link with 3 brackets
7638 Link with 4 brackets
7642 <p>[[<a href="/wiki/Main_Page" title="Main Page">Main Page</a>]]
7647 Piped link with 3 brackets
7649 [[[main page|the main page]]]
7651 <p>[[[main page|the main page]]]
7656 Piped link with extlink-like text
7659 [[Main Page|This is a [bar]]]
7662 <p><a href="/wiki/Main_Page" title="Main Page">[bar]</a>
7663 <a href="/wiki/Main_Page" title="Main Page">This is a [bar]</a>
7664 <a href="/wiki/Main_Page" title="Main Page">[bar</a>
7667 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar]</a>
7668 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>This is a [bar]</a>
7669 <a rel="mw:WikiLink" href="./Main_Page" title="Main Page" data-parsoid='{"stx":"piped"}'>[bar</a></p>
7673 Link with multiple pipes
7675 [[Main Page|The|Main|Page]]
7677 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
7682 Anchor containing a #. (T65430)
7684 wgFragmentMode=[ 'html5', 'legacy' ]
7686 [[Main Page#And#Link]]
7688 <p><a href="/wiki/Main_Page#And#Link" title="Main Page">Main Page#And#Link</a>
7691 <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>
7697 [[Talk:Parser testing]], [[Meta:Disclaimers]]
7699 <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>
7704 Link with space in namespace
7706 [[User talk:Foo bar]]
7708 <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>
7713 MemoryAlpha:AlphaTest
7715 This is an article in the MemoryAlpha namespace
7716 (which shadows the memoryalpha interwiki link).
7720 Namespace takes precedence over interwiki link (T53680)
7722 [[MemoryAlpha:AlphaTest]]
7724 <p><a href="/wiki/MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a>
7728 # The previous test doesn't work correctly in html2*, due to not recognizing the
7729 # link as an internal one. This one checks for the correct behavior.
7731 Link to namespace preferred over interwiki with correct rel attribute
7733 parsoid=html2wt,html2html
7735 <p><a rel="mw:WikiLink" href="./MemoryAlpha:AlphaTest" title="MemoryAlpha:AlphaTest">MemoryAlpha:AlphaTest</a></p>
7737 [[MemoryAlpha:AlphaTest]]
7741 Piped link to namespace
7743 [[Meta:Disclaimers|The disclaimers]]
7745 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
7752 [[Usually caused by a typo (oops}]]
7754 <p>[[Usually caused by a typo (oops}]]
7761 Just a test of an article title containing a percent.
7765 Link containing % (not as a hex sequence)
7768 [[7% Solution|7%25 Solution]]
7770 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7771 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7774 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7775 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7778 # note that the parsoid HTML is identical to the previous test output,
7779 # so the previous test ensures that the html2wt mode will generate the
7780 # "not as a hex sequence" wikitext.
7782 Link containing % as a single hex sequence interpreted to char
7784 parsoid=wt2wt,wt2html,html2html
7787 [[7%25 Solution|7%25 Solution]]
7789 <p><a href="/wiki/7%25_Solution" title="7% Solution">7% Solution</a>
7790 <a href="/wiki/7%25_Solution" title="7% Solution">7%25 Solution</a>
7793 <p><a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7% Solution</a>
7794 <a rel="mw:WikiLink" href="./7%25_Solution" title="7% Solution">7%25 Solution</a></p>
7798 Link containing % as a double hex sequence interpreted to hex sequence
7802 <p>[[7%2525 Solution]]
7806 ## Example for such a section: == < ==
7808 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
7810 wgFragmentMode=[ 'html5', 'legacy' ]
7812 [[%23%3c]][[%23%3e]]
7814 <p><a href="#<">#<</a><a href="#>">#></a>
7817 <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>
7820 ## Example for such a section: == < ==
7822 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors (legacy)
7824 wgFragmentMode=[ 'legacy' ]
7826 [[%23%3c]][[%23%3e]]
7828 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
7833 Link containing "<#" and ">#" as a hex sequences
7835 [[%3c%23]][[%3e%23]]
7837 <p>[[%3c%23]][[%3e%23]]
7842 Link containing an equals sign
7844 [[Special:BookSources/isbn=4-00-026157-6]]
7846 <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>
7849 <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>
7855 Just a test of an article title containing a tilde.
7858 # note that links containing signatures, like [[Foo~~~~]], are
7859 # massaged by the pre-save transform (PST) and so the tildes are never
7860 # seen by the parser.
7862 Link containing a tilde
7866 <p><a href="/wiki/Foo~bar" title="Foo~bar">Foo~bar</a>
7869 <p><a rel="mw:WikiLink" href="./Foo~bar" title="Foo~bar">Foo~bar</a></p>
7873 Link containing double-single-quotes '' (T6598)
7875 [[Lista d''e paise d''o munno]]
7877 <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>
7880 <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>
7884 Link containing double quotes and spaces
7888 <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>
7891 <p><a rel="mw:WikiLink" href='./Cool_"Gator"' title='Cool "Gator"'>Cool "Gator"</a></p>
7895 File containing double quotes and spaces
7897 [[File:Cool "Gator".png]]
7899 <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>
7903 Redirect containing double quotes and spaces
7905 #REDIRECT [[Cool "Gator"]]
7907 <link rel="mw:PageProp/redirect" href="./Cool_%22Gator%22" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Cool_%22Gator%22"},"sa":{"href":"Cool \"Gator\""}}'/>
7911 Link containing double-single-quotes '' in text (T6598 sanity check)
7913 Some [[Link|pretty ''italics'' and stuff]]!
7915 <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>!
7918 <p>Some <a rel="mw:WikiLink" href="./Link" title="Link">pretty <i>italics</i> and stuff</a>!</p>
7922 Link containing double-single-quotes '' in text embedded in italics (T6598 sanity check)
7924 ''Some [[Link|pretty ''italics'' and stuff]]!''
7926 <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>
7931 Link with double quotes in title part (literal) and alternate part (interpreted)
7933 [[File:Denys_Savchenko_''Pentecoste''.jpg]]
7937 [[''Pentecoste''|Pentecoste]]
7939 [[''Pentecoste''|''Pentecoste'']]
7941 <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>
7942 </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>
7943 </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>
7944 </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>
7947 <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>
7948 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">''Pentecoste''</a></p>
7949 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''">Pentecoste</a></p>
7950 <p><a rel="mw:WikiLink" href="./''Pentecoste''" title="''Pentecoste''"><i>Pentecoste</i></a></p>
7954 Broken image links with HTML captions (T41700)
7956 [[File:Nonexistent|<script></script>]]
7957 [[File:Nonexistent|100x100px|<script></script>]]
7958 [[File:Nonexistent|<]]
7959 [[File:Nonexistent|a<i>b</i>c]]
7961 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7962 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
7963 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
7964 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
7967 <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>
7968 <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>
7969 <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>
7970 <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>
7976 [[http://www.example.com]]
7978 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
7981 <p>[<a rel="mw:ExtLink" class="external autonumber" href="http://www.example.com"></a>]</p>
7985 Plain link to URL with link text
7987 [[http://www.example.com Link text]]
7989 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
7994 Plain link to protocol-relative URL
7996 [[//www.example.com]]
7998 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
8001 <p>[<a rel="mw:ExtLink" class="external autonumber" href="//www.example.com"></a>]</p>
8005 Plain link to protocol-relative URL with link text
8007 [[//www.example.com Link text]]
8009 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
8014 Plain link to page with question mark in title
8020 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
8021 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
8025 # I'm fairly sure the expected result here is wrong.
8026 # We want these to be URL links, not pseudo-pages with URLs for titles....
8027 # However the current output is also pretty screwy.
8030 # I'm changing it to match the current output--it arguably makes more
8031 # sense in the light of the test above. Old expected result was:
8032 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
8034 # But I think this test is bordering on "garbage in, garbage out" anyway.
8039 Piped link to URL: [[http://www.example.com|an example URL]]
8041 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
8044 <p>Piped link to URL: [<a rel="mw:ExtLink" class="external text" 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>
8048 Plain link in template argument
8052 {{echo|[http://www.example.com |123]}}
8054 {{echo|[[http://www.example.com |123]]}}
8056 {{echo|[[http://www.example.com |123]}}
8058 {{echo|[http://www.example.com |123]]}}
8060 <p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8061 </p><p>[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>]
8062 </p><p>{{echo|[<a rel="nofollow" class="external text" href="http://www.example.com">|123</a>}}
8063 </p><p>[<a rel="nofollow" class="external free" href="http://www.example.com">http://www.example.com</a>
8066 <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" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8068 <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" class="external text" href="http://www.example.com">|123</a>]</p>
8070 <p>{{echo|[<a rel="mw:ExtLink" class="external text" href="http://www.example.com" data-parsoid='{"targetOff":114,"contentOffsets":[114,118],"dsr":[90,119,24,1]}'>|123</a>}}</p>
8072 <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" class="external free" href="http://www.example.com">http://www.example.com</a> </p>
8076 T2002: [[page|http://url/]] should link to page, not http://url/
8078 [[Main Page|http://url/]]
8080 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
8083 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">http://url/</a></p>
8086 # Parsoid does not mark self-links, by design.
8088 T2337: Escaped self-links should be bold
8092 [[Bug462]] [[Bug462]]
8094 <p><a class="mw-selflink selflink">Bug462</a> <a class="mw-selflink selflink">Bug462</a>
8097 <p><a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a> <a rel="mw:WikiLink" href="./Bug462" title="Bug462">Bug462</a></p>
8101 Self-link to section should not be bold
8105 [[Main Page#section]]
8107 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
8118 Self-link to numeric title
8124 <p><a class="mw-selflink selflink">0</a>
8129 Link to numeric-equivalent title
8135 <p><a href="/wiki/00" title="00">00</a>
8140 <nowiki> inside a link
8142 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
8144 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
8149 Non-breaking spaces in title
8151 [[ Main Page ]]
8153 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
8157 # Add new article for the test below so that it doesn't red-link
8165 Multiple spaces in titles should normalize to a single underscore
8167 parsoid=wt2html,wt2wt
8173 <p><a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8174 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8175 <a href="/wiki/Foo_bar_baz" title="Foo bar baz">x</a>
8178 <p><a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8179 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8180 <a rel="mw:WikiLink" href="./Foo_bar_baz" title="Foo bar baz">x</a>
8185 Internal link with ca linktrail, surrounded by bold apostrophes (T29473 primary issue)
8191 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
8196 Internal link with ca linktrail, surrounded by italic apostrophes (T29473 primary issue)
8202 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
8207 Internal link with en linktrail: no apostrophes (T29473)
8213 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
8218 Internal link with ca linktrail with apostrophes (T29473)
8224 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
8229 Internal link with kaa linktrail with apostrophes (T29473)
8235 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
8240 Link with multiple ":" in a subpage-supporting namespace (T65636)
8242 [[User:Foo/Test/63636:Bar|Test]]
8244 <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>
8247 <p><a rel="mw:WikiLink" href="./User:Foo/Test/63636:Bar" title="User:Foo/Test/63636:Bar">Test</a></p>
8250 ## Mainly a sanity check for Parsoid
8252 Handle title parsing for subpages
8272 Link to a subpage from a namespace other than main
8279 <p><a href="/wiki/User:Test/123" title="User:Test/123">/123</a>
8282 <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>
8286 Ensure that transclusion titles are not url-decoded
8288 subpage title=[[Test]]
8291 {{Bar%C3%A9}} {{/Bar%C3%A9}}
8293 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}
8296 <p>{{Bar%C3%A9}} {{/Bar%C3%A9}}</p>
8300 Purely hash wikilink
8302 title=[[User:Test/123]]
8307 <p><a href="#a">b</a>
8310 <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>
8314 Serialization of purely hash wikilink
8316 title=[[User:Test/123]]
8320 <p><a href="#a">[[</a></p>
8322 [[#a|<nowiki>[[</nowiki>]]
8324 <p><a href="#a">[[</a>
8329 1. Interaction of linktrail and template encapsulation
8333 <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>
8337 2. Interaction of linktrail and template encapsulation
8341 {{echo|Some [[Fool]]}}s
8343 <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>
8347 3. Interaction of linktrail and template encapsulation
8351 {{echo|Some [[Fool]]s are '''bold and foolish'''}}
8353 <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>
8363 Internal link with is link prefix
8367 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
8369 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
8380 Internal link with is link trail and link prefix
8384 [[mótmælendatrú|xxx]]ar
8386 mótmælenda[[söfnuður]]
8387 mótmælenda[[söfnuður|söfnuðir]]
8388 mótmælenda[[söfnuður|söfnuðir]]xxx
8390 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
8391 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
8392 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
8393 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
8394 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
8399 Parsoid link trail escaping
8401 parsoid=html2wt,html2html
8403 <p><a rel="mw:WikiLink" href="./Apple" title="Apple">apple</a>s</p>
8409 Parsoid link prefix escaping
8412 parsoid=html2wt,html2html
8414 <p>Aðrir mótmælenda<a rel="mw:WikiLink" href="./Söfnuður" title="Söfnuður">söfnuður</a></p>
8416 Aðrir mótmælenda<nowiki/>[[söfnuður]]
8420 Parsoid link bracket escaping
8422 parsoid=html2wt,html2html
8424 <p><a rel="mw:WikiLink" href="./Test" title="Test">Test</a></p>
8425 <p>[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]</p>
8426 <p>[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]</p>
8427 <p>[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]</p>
8428 <p>[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]</p>
8429 <p>[[[[[<a rel="mw:WikiLink" href="./Test" title="Test">Test</a>]]]]]</p>
8437 [[[<nowiki/>[[Test]]]]]
8441 [[[[[<nowiki/>[[Test]]]]]]]
8445 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
8453 [http://wp.org ''foo'']
8455 <p><a href="/wiki/Foo" title="Foo"> bar</a>
8456 </p><p><a href="/wiki/Foo" title="Foo"> <i>bar</i></a>
8457 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
8458 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
8463 Parsoid: Scoped parsing should handle mixed transclusions and plain text
8465 [[Foo|{{echo|a}} b {{echo|c}}]]
8467 <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>
8471 Link with angle bracket after anchor
8473 wgFragmentMode=[ 'html5', 'legacy' ]
8477 <p><a href="/wiki/Foo#<bar>" title="Foo">Foo#<bar></a>
8480 <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>
8484 Link with angle bracket after anchor (legacy)
8486 wgFragmentMode=[ 'legacy' ]
8490 <p><a href="/wiki/Foo#.3Cbar.3E" title="Foo">Foo#<bar></a>
8495 ### Interwiki links (see maintenance/interwiki.sql)
8499 Inline interwiki link
8501 parsoid=wt2html,wt2wt,html2html
8503 [[MeatBall:SoftSecurity]]
8505 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
8508 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a></p>
8512 Inline interwiki link with empty title (T4372)
8514 parsoid=wt2html,wt2wt,html2html
8518 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
8521 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?" title="meatball:">MeatBall:</a></p>
8524 ## html2wt and html2html will fail because we will prefer the :en: interwiki prefix over wikipedia:
8526 Interwiki link encoding conversion (T3636)
8528 parsoid=wt2html,wt2wt
8530 *[[Wikipedia:ro:Olteniţa]]
8531 *[[Wikipedia:ro:Olteniţa]]
8533 <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>
8534 <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>
8538 <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>
8539 <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>
8543 <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>
8544 <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>
8549 Interwiki link with fragment (T4130)
8551 [[MeatBall:SoftSecurity#foo]]
8553 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
8558 Link scenarios with escaped fragments
8560 wgFragmentMode=[ 'html5', 'legacy' ]
8563 [[Foo#Is this great?]]
8564 [[meatball:Foo#Is this great?]]
8566 <p><a href="#Is_this_great?">#Is this great?</a>
8567 <a href="/wiki/Foo#Is_this_great?" title="Foo">Foo#Is this great?</a>
8568 <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>
8571 <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>
8572 <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>
8573 <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>
8577 Link scenarios with escaped fragments (legacy)
8579 wgFragmentMode=[ 'legacy' ]
8582 [[Foo#Is this great?]]
8583 [[meatball:Foo#Is this great?]]
8585 <p><a href="#Is_this_great.3F">#Is this great?</a>
8586 <a href="/wiki/Foo#Is_this_great.3F" title="Foo">Foo#Is this great?</a>
8587 <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>
8591 # Ideally the wikipedia: prefix here should be proto-relative too
8592 # [CSA]: this is kind of a bogus test, as the PHP parser test doesn't
8593 # define the 'en' prefix, and originally the test used 'wikipedia',
8594 # which isn't a localinterwiki prefix hence the links to the 'en:Foo'
8597 Different interwiki prefixes mapping to the same URL
8605 [[:wikipedia:Foo|Foo]]
8607 [[wikipedia:en:Foo]]
8609 [[:wikipedia:en:Foo]]
8613 <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>
8615 <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>
8617 <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>
8619 <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>
8621 <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>
8623 <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>
8625 <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>
8629 Interwiki links that cannot be represented in wiki syntax
8632 [[meatball:ok#foo|ok with fragment]]
8633 [[meatball:ok_as_well?|ok ending with ? mark]]
8634 [http://de.wikipedia.org/wiki/Foo?action=history has query]
8635 [http://de.wikipedia.org/wiki/#foo is just fragment]
8638 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?ok" class="extiw" title="meatball:ok">meatball:ok</a>
8639 <a href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" class="extiw" title="meatball:ok">ok with fragment</a>
8640 <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>
8641 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8642 <a rel="nofollow" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a>
8645 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok" title="meatball:ok">meatball:ok</a>
8646 <a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?ok#foo" title="meatball:ok">ok with fragment</a>
8647 <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>
8648 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/Foo?action=history">has query</a>
8649 <a rel="mw:ExtLink" class="external text" href="http://de.wikipedia.org/wiki/#foo">is just fragment</a></p>
8653 Interwiki links: trail
8655 [[wikipedia:Foo|Ba]]r
8657 <p><a href="http://en.wikipedia.org/wiki/Foo" class="extiw" title="wikipedia:Foo">Bar</a>
8660 <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>
8664 Local interwiki link
8666 parsoid=wt2html,wt2wt,html2html
8668 [[local:Template:Foo]]
8670 <p><a href="/wiki/Template:Foo" title="Template:Foo">local:Template:Foo</a>
8673 <p><a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">local:Template:Foo</a></p>
8676 # Parsoid does not mark self-links, by design.
8678 Local interwiki link: self-link to current page
8681 parsoid=wt2html,wt2wt,html2html
8685 <p><a class="mw-selflink selflink">local:Main Page</a>
8688 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:Main Page</a></p>
8692 Local interwiki link: prefix only (T66167)
8694 parsoid=wt2html,wt2wt,html2html
8698 <p><a href="/wiki/Main_Page" title="Main Page">local:</a>
8701 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">local:</a></p>
8705 Local interwiki link: with additional interwiki prefix (T63357)
8707 parsoid=wt2html,wt2wt,html2html
8709 [[local:meatball:Hello]]
8711 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Hello" class="extiw" title="meatball:Hello">local:meatball:Hello</a>
8714 <p><a rel="mw:WikiLink/Interwiki" href="http://www.usemod.com/cgi-bin/mb.pl?Hello" title="meatball:Hello">local:meatball:Hello</a></p>
8718 Multiple local interwiki link prefixes
8720 [[local:local:local:local:mi:local:Foo]]
8722 parsoid=wt2html,wt2wt,html2html
8724 <p><a href="/wiki/Foo" title="Foo">local:local:local:local:mi:local:Foo</a>
8727 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">local:local:local:local:mi:local:Foo</a></p>
8731 ### Interlanguage links
8732 ### Language links (so that searching for '### language' matches..)
8744 <p>Blah blah blah</p>
8745 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8748 ## parsoid html2wt will lose the space variations
8750 Interlanguage link with spacing
8752 parsoid=wt2html,wt2wt,html2html
8760 <p>Blah blah blah</p>
8761 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8765 Double interlanguage link
8774 <p>Blah blah blah</p>
8775 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8776 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8779 ## parsoid html2wt will lose the space variations
8781 Interlanguage link variations
8783 parsoid=wt2html,wt2wt,html2html
8793 <p>Blah blah blah</p>
8794 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish" />
8795 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" />
8796 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar" />
8800 Escaping of interlanguage links (T129218, T156308)
8804 [[ : zh : Chinese ]]
8807 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8808 <a href="http://zh.wikipedia.org/wiki/Chinese" class="extiw" title="zh:Chinese"> zh : Chinese </a>
8812 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8813 <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese"> zh : Chinese </a></p>
8817 Multiple colons escaping interlanguage links
8825 <p><a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">es:Spanish</a>
8830 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">es:Spanish</a>
8832 [[:::es:Spanish]]</p>
8835 ## parsoid html2wt will normalize the space to _
8837 Space and question mark encoding in interlanguage links (T95473)
8839 parsoid=wt2html,wt2wt,html2html
8847 <p>Blah blah blah</p>
8848 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar%3F" />
8852 Interlanguage link, with prefix links
8862 <p>Blah blah blah</p>
8863 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8867 Double interlanguage link, with prefix links (T10897)
8878 <p>Blah blah blah</p>
8879 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/>
8880 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/>
8884 "Extra" interlanguage links (T34189 / gerrit 111390)
8892 <p>Blah blah blah</p>
8893 <link rel="mw:PageProp/Language" title="Multilingual" href="http://wikisource.org/wiki/Article"/>
8896 ## PHP parser tests script needs an update
8897 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8899 Language links render as inline links if $wgInterwikiMagic=false
8901 wgInterwikiMagic=false
8902 parsoid=wt2html,wt2wt,html2html
8907 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8910 ## PHP parser tests script needs an update
8911 ## Parsoid html2wt will normalize output to [[:zh:Chinese]]
8913 Language links render as inline links in the Talk namespace
8916 parsoid=wt2html,wt2wt,html2html
8921 <p>Blah blah blah <a rel="mw:WikiLink/Interwiki" href="http://zh.wikipedia.org/wiki/Chinese" title="zh:Chinese">zh:Chinese</a></p>
8925 Parsoid-specific test: Wikilinks with should RT properly
8931 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
8936 Parsoid T55221: Wikilinks should be properly entity-escaped
8938 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
8940 <p>He&nbsp;llo <a href="./Foo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8941 <p>He&nbsp;llo <a href="./He&nbsp;llo" rel="mw:WikiLink">He&nbsp;llo</a></p>
8943 He&nbsp;llo [[Foo|He&nbsp;llo]]
8945 He&nbsp;llo He&nbsp;llo
8947 <p>He&nbsp;llo <a href="/wiki/Foo" title="Foo">He&nbsp;llo</a>
8948 </p><p>He&nbsp;llo He&nbsp;llo
8952 # html2wt will fail because of title normalization without data-parsoid
8954 Parsoid: handle constructor well
8956 parsoid=wt2html,wt2wt
8962 <p><a href="/index.php?title=Constructor&action=edit&redlink=1" class="new" title="Constructor (page does not exist)">constructor</a>
8963 </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>
8966 <p><a rel="mw:WikiLink" href="./Constructor" title="Constructor" data-parsoid='{"stx":"simple","a":{"href":"./Constructor"},"sa":{"href":"constructor"}}'>constructor</a></p>
8968 <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>
8977 # Note that `ko` isn't a known interlanguage prefix
8979 Parsoid: recognize interlanguage links without a target page
8989 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/"/>
8991 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
8994 # Note that `ko` isn't a known interwiki prefix
8996 Parsoid: recognize interwiki links without a target page
8998 parsoid=wt2html,wt2wt,html2html
9004 <p><a href="http://es.wikipedia.org/wiki/" class="extiw" title="es:">es:</a>
9005 </p><p><a href="/wiki/Ko:" title="Ko:">ko:</a>
9008 <p><a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/" title="es:">es:</a></p>
9009 <p><a rel="mw:WikiLink" href="./Ko:" title="Ko:">ko:</a></p>
9013 Handle interwiki links pointing to the current wiki as plain wiki links (T47209)
9017 <p><a href="/wiki/Foo" title="Foo">mi:Foo</a>
9020 <p><a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"simple","a":{"href":"./Foo"},"sa":{"href":"mi:Foo"}}'>mi:Foo</a></p>
9024 Interlanguage link with preceding local interwiki link (T70085)
9026 parsoid=wt2html,wt2wt,html2html
9029 [[local:es:Spanish]]
9032 <a href="http://es.wikipedia.org/wiki/Spanish" class="extiw" title="es:Spanish">local:es:Spanish</a>
9036 <a rel="mw:WikiLink/Interwiki" href="http://es.wikipedia.org/wiki/Spanish" title="es:Spanish">local:es:Spanish</a></p>
9040 Looks like an interlanguage link, but is actually a local interwiki
9042 parsoid=wt2html,wt2wt,html2html
9048 <a href="/wiki/Template:Foo" title="Template:Foo">mi:Template:Foo</a>
9052 <a rel="mw:WikiLink" href="./Template:Foo" title="Template:Foo">mi:Template:Foo</a></p>
9056 ### Redirects, Parsoid-only
9060 1. Simple redirect to page
9062 #REDIRECT [[Main Page]]
9064 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9068 2. Other redirect variants
9070 #REDIRECT [[Main_Page]]
9072 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./Main_Page"},"sa":{"href":"Main_Page"}}'/>
9075 # Not a valid redirect in PHP (although perhaps it was, once upon a time)
9076 # This tests the Parsoid bail-out code.
9078 3. Other redirect variants
9082 #REDIRECT [[<nowiki>[[Bar]]</nowiki>]]
9084 <ol><li>REDIRECT [[<span typeof="mw:Nowiki">[[Bar]]</span>]]</li></ol>
9088 4. Redirect to a templated destination
9090 #REDIRECT [[{{echo|Foo}}bar]]
9092 <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"}]]}'/>
9098 parsoid=wt2html,wt2wt
9103 <li>REDIRECT [[]]</li></ol>
9107 Optional colon in #REDIRECT
9109 # the colon is archaic syntax. we support it for wt2html, but we
9110 # don't care that it roundtrips back to the modern syntax.
9111 parsoid=wt2html,html2html
9113 #REDIRECT:[[Main Page]]
9115 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9119 Whitespace in #REDIRECT with optional colon
9121 # the colon and gratuitous whitespace is archaic syntax. we support
9122 # it for wt2html, but we don't care that it roundtrips back to the
9123 # modern syntax (without extra whitespace)
9124 parsoid=wt2html,html2html
9131 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9135 Piped link in #REDIRECT
9137 # content after piped link is ignored. we support this syntax,
9138 # but don't care that the piped link is lost when we roundtrip this.
9141 #REDIRECT [[Main Page|bar]]
9143 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9147 Redirect to category (T104502)
9149 parsoid=wt2html,wt2wt
9151 #REDIRECT [[Category:Foo]]
9153 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9157 Redirect to category with URL encoding (T104502)
9161 #REDIRECT [[Category%3AFoo]]
9163 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9167 Redirect to category page
9169 #REDIRECT [[:Category:Foo]]
9171 <link rel="mw:PageProp/redirect" href="./Category:Foo"/>
9175 Redirect to image page (1)
9177 #REDIRECT [[File:Wiki.png]]
9179 <link rel="mw:PageProp/redirect" href="./File:Wiki.png"/>
9183 Redirect to image page (2)
9185 #REDIRECT [[Image:Wiki.png]]
9187 <link rel="mw:PageProp/redirect" href="./File:Wiki.png" data-parsoid='{"src":"#REDIRECT ","a":{"href":"./File:Wiki.png"},"sa":{"href":"Image:Wiki.png"}}'/>
9190 # html2wt disabled because wts serializes as "#REDIRECT [[:en:File:Wiki.png]]"
9191 # Next test confirms this.
9193 Redirect to language (1) (T104918)
9195 parsoid=wt2html,wt2wt,html2html
9197 #REDIRECT [[en:File:Wiki.png]]
9199 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9203 Redirect to language (2) (T104918)
9205 #REDIRECT [[:en:File:Wiki.png]]
9207 <link rel="mw:PageProp/redirect" href="//en.wikipedia.org/wiki/File:Wiki.png"/>
9211 Redirect to interwiki (T104918)
9213 #REDIRECT [[meatball:File:Wiki.png]]
9215 <link rel="mw:PageProp/redirect" href="http://www.usemod.com/cgi-bin/mb.pl?File:Wiki.png"/>
9219 Non-English #REDIRECT
9223 #TILVÍSUN [[Main Page]]
9225 <link rel="mw:PageProp/redirect" href="./Main_Page" data-parsoid='{"src":"#TILVÍSUN ","a":{"href":"./Main_Page"},"sa":{"href":"Main Page"}}'/>
9229 Redirect syntax under text isn't considered a redirect
9232 #redirect [[Main Page]]
9235 <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>
9243 <p>Foo<link rel="mw:PageProp/redirect" href="./Foo"/></p>
9250 Redirect followed by block on the same line
9254 #REDIRECT [[Main Page]]<!-- haha -->==hi==
9256 <link rel="mw:PageProp/redirect" href="./Main_Page"/><!-- haha --><h2 id="hi">hi</h2>
9260 Redirect followed by a newline
9262 #REDIRECT [[Main Page]]
9265 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9270 Redirect followed by multiple newlines
9272 #REDIRECT [[Main Page]]
9277 <link rel="mw:PageProp/redirect" href="./Main_Page"/>
9284 Drop duplicate redirects
9288 <link rel="mw:PageProp/redirect" href="./Foo"/>
9289 <link rel="mw:PageProp/redirect" href="./Bar"/>
9290 <link rel="mw:PageProp/redirect" href="./Baz"/>
9309 Broken br tag sanitization
9317 # TODO: Fix html2html mode (T53055)!
9319 Parsoid: Broken br tag recognition
9333 Incorrecly removing closing slashes from correctly formed XHTML
9335 <br style="clear:both;" />
9337 <p><br style="clear:both;" />
9342 Failing to transform badly formed HTML into correct XHTML
9344 <br style="clear: left;">
9345 <br style="clear: right;">
9346 <br style="clear: both;">
9348 <p><br style="clear: left;" />
9349 <br style="clear: right;" />
9350 <br style="clear: both;" />
9354 ## FIXME: Is Parsoid's acceptance of self-closing html-tags
9355 ## a feature or a bug? See https://phabricator.wikimedia.org/T76962
9357 Handling html with a div self-closing tag
9366 <p><div title />
9370 <p><div title=bar />
9371 <div title=bar/>
9373 <div title="bar/"></div>
9377 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9378 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9379 <div title="" data-parsoid='{"stx":"html","selfClose":true}'></div>
9380 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9381 <div title="bar" data-parsoid='{"stx":"html","selfClose":true}'></div>
9382 <div title="bar/" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></div>
9386 Handling html with a br self-closing tag
9413 Horizontal ruler (should it add that extra space?)
9422 foo </p><hr /><p> bar
9427 Horizontal ruler -- 4+ dashes render hr
9436 Horizontal ruler -- eats additional dashes on the same line
9445 Horizontal ruler -- does not collapse dashes on consecutive lines
9456 Horizontal ruler -- <4 dashes render as plain text
9465 Horizontal ruler -- Supports content following dashes on same line
9477 ### Block-level elements
9486 <ul><li>Common list</li>
9488 <li>item 3</li></ul>
9499 <ol><li>Numbered list</li>
9501 <li>item 3</li></ol>
9515 ***#Number on level 4
9517 **#Number on level 3
9518 **#Number on level 3
9522 #**Level 3, but ordered
9525 <ol><li>with numbers</li></ol>
9526 <ul><li>and bullets</li></ul>
9527 <ol><li>and numbers</li></ol></li>
9529 <ul><li>bullet level 2
9530 <ul><li>bullet level 3
9531 <ol><li>Number on level 4</li></ol></li></ul></li>
9533 <ol><li>Number on level 3</li>
9534 <li>Number on level 3</li></ol></li></ul>
9535 <ol><li>number level 2</li></ol></li>
9537 <ul><li><ul><li>Level 3</li></ul></li></ul></li></ul>
9538 <ol><li><ul><li><ul><li>Level 3, but ordered</li></ul></li></ul></li></ol>
9543 1. Nested mixed wikitext and html list
9546 *<ul><li>ho</li></ul>
9551 <li><ul><li>ho</li></ul></li>
9553 <ul><li>ho</li></ul></li></ul>
9557 <li><ul data-parsoid='{"stx":"html"}'><li data-parsoid='{"stx":"html"}'>ho</li></ul></li>
9559 <ul><li>ho</li></ul></li></ul>
9563 2. Nested mixed wikitext and html list (incompatible)
9566 :{{echo|<li>ho</li>}}
9569 <dd><li>ho</li></dd></dl>
9573 <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>
9583 <ul><li>bar</li></ul></li></ul>
9593 <ul><li><ul><li>foo</li></ul></li>
9599 Nested lists 3 (first element empty)
9605 <ul><li>bar</li></ul></li></ul>
9610 Nested lists 4 (first element empty)
9615 <ul><li><ul><li></li></ul></li>
9621 Nested lists 5 (both elements empty)
9626 <ul><li><ul><li></li></ul></li>
9632 Nested lists 6 (both elements empty)
9638 <ul><li></li></ul></li></ul>
9643 Nested lists 7 (skip initial nesting levels)
9647 <ul><li><ul><li><ul><li>foo</li></ul></li></ul></li></ul>
9652 Nested lists 8 (multiple nesting transitions)
9660 <ul><li><ul><li>bar</li></ul></li>
9661 <li>baz</li></ul></li>
9667 Nested lists 9 (extension interaction)
9673 <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>
9677 1. Lists with start-of-line-transparent tokens before bullets: Comments
9690 2. Lists with start-of-line-transparent tokens before bullets: Template close
9695 <ul><li>foo bar</li>
9701 List items are not parsed correctly following a <pre> block (T2785)
9707 <ul><li><pre>foo</pre></li>
9708 <li><pre>bar</pre></li>
9712 <ul><li><pre typeof="mw:Extension/pre" about="#mwt2" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo"}}'>foo</pre></li>
9713 <li><pre typeof="mw:Extension/pre" about="#mwt4" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"bar"}}'>bar</pre></li>
9717 # FIXME: Might benefit from a html/parsoid since this has a template
9719 List items from template
9730 *notSOL{{inner list}}
9734 <li>item 2</li></ul>
9737 <li>item 2</li></ul>
9741 <li>item 2</li></ul>
9746 List interrupted by empty line or heading
9754 <ul><li>foo</li></ul>
9755 <ul><li><ul><li>bar</li></ul></li></ul>
9756 <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>
9757 <ul><li>Another list item</li></ul>
9762 Multiple list tags generated by templates
9780 <li about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[0,44,null,null],"pi":[[{"k":"1"}],[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":0}},"a\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":1}},"b\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<li>"}},"i":2}},"c"]}'>a
9781 </li><li about="#mwt1">b
9782 </li><li about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,44,null,0]}'>c</li>
9786 Single-comment whitespace lines dont break lists, and neither do multi-comment whitespace lines
9789 <!--This line will NOT split the list-->
9791 <!--This line will NOT split the list either-->
9793 <!--foo--> <!----> <!--This line NOT split the list either-->
9804 Replacing whitespace with tabs still doesn't break the list (gerrit 78327)
9807 <!--This line will NOT split the list-->
9809 <!--This line will NOT split the list either-->
9811 <!--foo--> <!----> <!--This line NOT split the list
9822 # FIXME: Parsoid has a dedicated DOM pass to mimic this Tidy-specific li-hack
9823 # That pass could possibly be removed.
9825 Test the li-hack (a hack from Tidy days, but doesn't work as advertised with Remex)
9827 parsoid=wt2html,wt2wt
9831 *{{echo|<li>templated li-hack}}
9832 *<!--foo--><li> unsupported li-hack with preceding comments
9835 <li><li>not a li-hack
9840 <li class="mw-empty-elt"></li><li>li-hack</li>
9841 <li class="mw-empty-elt"></li><li>templated li-hack</li>
9842 <li class="mw-empty-elt"></li><li> unsupported li-hack with preceding comments</li></ul>
9844 <li class="mw-empty-elt"></li><li>not a li-hack
9849 <li data-parsoid='{"stx":"html","autoInsertedEnd":true,"liHackSrc":"*"}'>li-hack</li>
9850 <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>
9851 <li data-parsoid='{"autoInsertedEnd":true}'><!--foo--></li><li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>unsupported li-hack with preceding comments</li></ul>
9853 <ul data-parsoid='{"stx":"html"}'>
9854 <li class="mw-empty-elt" data-parsoid='{"stx":"html","autoInsertedEnd":true}'></li><li data-parsoid='{"stx":"html"}'>not a li-hack
9861 Parsoid: Make sure nested lists are serialized on their own line even if HTML contains no newlines
9888 Parsoid: Test of whitespace serialization with Templated bullets
9895 <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>
9899 # ------------------------------------------------------------------------
9900 # The next set of tests are about Parsoid's ability to handle badly nested
9901 # tags (parse, minimize scope of fixup, and roundtrip back)
9902 # ------------------------------------------------------------------------
9904 # Remex and Parsoid output stems from list handling diffs because Parsoid & PHP parser.
9905 # Parsoid's list handling is more aware of block structure.
9907 Unbalanced closing block tags break a list
9914 <ul><li>a</li></ul></div><div>
9926 Unbalanced closing non-block tags don't break a list
9934 <ul><li>a<span></span></li>
9939 <li>a<span></span></li>
9945 # Parsoid does some post-dom-building cleanup
9946 # which is why its output differs from Remex.
9948 Unclosed formatting tags that straddle lists are closed and reopened
9950 parsoid=wt2html,wt2wt,html2html
9955 <ol><li><s> a</s></li><s>
9956 </s><li><s>b </s></li></ol>
9958 <ol><li><s> a</s></li>
9959 <li><s>b </s></li></ol>
9962 # Output is ugly because of all the misnested tag fixups.
9963 # Remex is wrapping p-tags around empty elements.
9964 # Parsoid has special-case handling of this pattern of
9965 # wrapping lists in formatting tags.
9966 # FIXME: Should we remove this code from Parsoid? Or add
9967 # special support in Remex? If the latter, maybe just wait
9968 # for Parsoid to become the default parser.
9971 1. List embedded in a formatting tag
9978 </small></p><small><ul><li>foo</li></ul></small><small></small><p><small></small>
9988 # Output is ugly because of all the misnested tag fixups
9989 # Remex is wrapping p-tags around empty elements.
9990 # Parsoid has code that strips useless p-tags.
9992 2. List embedded in a formatting tag in a misnested way
9999 </small></p><small></small><ul><small><li>a</li>
10000 </small><li><small>b</small></li></ul>
10006 <li><small>b</small></li>
10011 Table with missing opening <tr> tag
10013 parsoid=wt2html,wt2wt
10021 <tbody><tr><td>foo</td>
10030 # Note that the current date is hard-coded as
10031 # 1970-01-01T00:02:03Z (a Thursday)
10032 # when running parser tests. The timezone is also fixed to GMT, so
10033 # local date will be identical to current date.
10036 Magic Word: {{CURRENTDAY}}
10045 Magic Word: {{CURRENTDAY2}}
10054 Magic Word: {{CURRENTDAYNAME}}
10063 Magic Word: {{CURRENTDOW}}
10072 Magic Word: {{CURRENTMONTH}}
10081 Magic Word: {{CURRENTMONTH1}}
10090 Magic Word: {{CURRENTMONTHABBREV}}
10092 {{CURRENTMONTHABBREV}}
10099 Magic Word: {{CURRENTMONTHNAME}}
10101 {{CURRENTMONTHNAME}}
10108 Magic Word: {{CURRENTMONTHNAMEGEN}}
10110 {{CURRENTMONTHNAMEGEN}}
10117 Magic Word: {{CURRENTTIME}}
10126 Magic Word: {{CURRENTHOUR}}
10135 Magic Word: {{CURRENTWEEK}} (T6594)
10144 Magic Word: {{CURRENTYEAR}}
10153 Magic Word: {{CURRENTTIMESTAMP}}
10155 {{CURRENTTIMESTAMP}}
10162 Magic Words LOCAL (UTC)
10166 *{{LOCALMONTHNAME}}
10167 *{{LOCALMONTHNAMEGEN}}
10168 *{{LOCALMONTHABBREV}}
10177 *{{LOCALTIMESTAMP}}
10192 <li>19700101000203</li></ul>
10197 Magic Word: {{FULLPAGENAME}}
10199 title=[[User:Ævar Arnfjörð Bjarmason]]
10200 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10204 <p>User:Ævar Arnfjörð Bjarmason
10209 Magic Word: {{FULLPAGENAMEE}}
10211 title=[[User:Ævar Arnfjörð Bjarmason]]
10212 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10216 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10221 Magic Word: {{TALKSPACE}}
10223 title=[[User:Ævar Arnfjörð Bjarmason]]
10224 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10233 Magic Word: {{TALKSPACE}}, same namespace
10235 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10236 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10245 Magic Word: {{TALKSPACE}}, main namespace
10247 title=[[Parser Test]]
10248 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10257 Magic Word: {{TALKSPACEE}}
10259 title=[[User:Ævar Arnfjörð Bjarmason]]
10260 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10269 Magic Word: {{SUBJECTSPACE}}
10271 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10272 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10281 Magic Word: {{SUBJECTSPACE}}, same namespace
10283 title=[[User:Ævar Arnfjörð Bjarmason]]
10284 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10293 Magic Word: {{SUBJECTSPACE}}, main namespace
10295 title=[[Parser Test]]
10296 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10304 Magic Word: {{SUBJECTSPACEE}}
10306 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10307 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10316 Magic Word: {{NAMESPACE}}
10318 title=[[User:Ævar Arnfjörð Bjarmason]]
10319 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10328 Magic Word: {{NAMESPACEE}}
10330 title=[[User:Ævar Arnfjörð Bjarmason]]
10331 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10340 Magic Word: {{NAMESPACENUMBER}}
10342 title=[[User:Ævar Arnfjörð Bjarmason]]
10343 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10345 {{NAMESPACENUMBER}}
10352 Magic Word: {{SUBPAGENAME}}
10354 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10355 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10364 Magic Word: {{SUBPAGENAMEE}}
10366 title=[[Ævar Arnfjörð Bjarmason/sub ö]] subpage
10367 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10376 Magic Word: {{ROOTPAGENAME}}
10378 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10379 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10383 <p>Ævar Arnfjörð Bjarmason
10388 Magic Word: {{ROOTPAGENAMEE}}
10390 title=[[Ævar Arnfjörð Bjarmason/sub/sub2]] subpage
10391 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10395 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10400 Magic Word: {{BASEPAGENAME}}
10402 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10403 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10407 <p>Ævar Arnfjörð Bjarmason
10412 Magic Word: {{BASEPAGENAMEE}}
10414 title=[[Ævar Arnfjörð Bjarmason/sub]] subpage
10415 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10419 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10424 Magic Word: {{TALKPAGENAME}}
10426 title=[[User:Ævar Arnfjörð Bjarmason]]
10427 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10431 <p>User talk:Ævar Arnfjörð Bjarmason
10436 Magic Word: {{TALKPAGENAMEE}}
10438 title=[[User:Ævar Arnfjörð Bjarmason]]
10439 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10443 <p>User_talk:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10448 Magic Word: {{SUBJECTPAGENAME}}
10450 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10451 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10453 {{SUBJECTPAGENAME}}
10455 <p>User:Ævar Arnfjörð Bjarmason
10460 Magic Word: {{SUBJECTPAGENAMEE}}
10462 title=[[User talk:Ævar Arnfjörð Bjarmason]]
10463 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10465 {{SUBJECTPAGENAMEE}}
10467 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10472 Magic Word: {{NUMBEROFFILES}}
10474 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10483 Magic Word: {{PAGENAME}}
10485 title=[[User:Ævar Arnfjörð Bjarmason]]
10486 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10490 <p>Ævar Arnfjörð Bjarmason
10495 Magic Word: {{PAGENAME}} with metacharacters
10497 title=[['foo & bar = baz']]
10498 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10502 <p><i>'foo & bar = baz'</i>
10507 Magic Word: {{PAGENAME}} with metacharacters (T28781)
10509 title=[[*RFC 1234 http://example.com/]]
10510 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10514 <p>*RFC 1234 http://example.com/
10519 Magic Word: {{PAGENAMEE}}
10521 title=[[User:Ævar Arnfjörð Bjarmason]]
10522 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10526 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
10531 Magic Word: {{PAGENAMEE}} with metacharacters (T28781)
10533 title=[[*RFC 1234 http://example.com/]]
10534 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10538 <p>*RFC_1234_http://example.com/
10543 Magic Word: {{REVISIONID}}
10545 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10552 flags=vary-revision-id
10556 Magic Word: {{SCRIPTPATH}}
10558 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10566 Magic Word: {{STYLEPATH}}
10568 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10577 Magic Word: {{SERVER}}
10579 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10583 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10588 Magic Word: {{SERVERNAME}}
10590 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10599 Magic Word: {{SITENAME}}
10601 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10610 Magic Word: {{PAGELANGUAGE}}
10613 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10622 Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
10624 parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true }
10633 Case-sensitive magic words, when cased differently, should just be template transclusions
10640 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
10641 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
10642 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
10643 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
10648 Case-insensitive magic words should still work with weird casing.
10658 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
10662 # From plwiki:PLOS_ONE
10664 Parsoid: Page property magic word with magic word contents
10666 {{DISPLAYTITLE:''{{PAGENAME}}''}}
10668 <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>"}]]}'/>
10671 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
10672 # But, this is a limitation of our representation and is documented in
10673 # TemplateHandler.js in processSpecialMagicWord
10675 Parsoid: Template-generated DISPLAYTITLE
10677 {{{{echo|DISPLAYTITLE}}:Foo}}
10681 wgAllowDisplayTitle=true
10682 wgRestrictDisplayTitle=false
10687 <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"}]]}'/>
10691 Namespace 1 {{ns:1}}
10700 Namespace 1 {{ns:01}}
10709 Namespace 0 {{ns:0}} (T6783)
10717 Namespace 0 {{ns:00}} (T6783)
10725 Namespace -1 {{ns:-1}}
10734 Namespace User {{ns:User}}
10743 Namespace User talk {{ns:User_talk}}
10752 Namespace User talk {{ns:uSeR tAlK}}
10761 Namespace File {{ns:File}}
10770 Namespace File {{ns:Image}}
10779 Namespace (lang=de) Benutzer {{ns:User}}
10790 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
10796 <p>Benutzer Diskussion
10803 {{urlencode:hi world?!}}
10804 {{urlencode:hi world?!|WIKI}}
10805 {{urlencode:hi world?!|PATH}}
10806 {{urlencode:hi world?!|QUERY}}
10816 Magic Word: prioritize type info over data-parsoid
10820 <meta property="mw:PageProp/forcetoc" data-parsoid='{"magicSrc":"__NOTOC__"}'/>
10826 Magic Word: serialize on separate line (parsoid)
10828 parsoid=wt2wt,html2wt
10834 foo<meta property="mw:PageProp/notoc"/>bar
10838 Magic Word: rt non-english wikis
10845 <meta property="mw:PageProp/noeditsection" data-parsoid='{"magicSrc":"__NOEDITSECTION__"}'/>
10849 __proto__ is treated as normal wikitext (T105997)
10861 Magic links: internal link to RFC (T2479)
10865 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
10868 <p><a rel="mw:WikiLink" href="./RFC_123" title="RFC 123">RFC 123</a></p>
10872 Magic links: RFC (T2479)
10876 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10879 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a></p>
10883 Magic links: RFC (T67278)
10885 This is RFC 822 but thisRFC 822 is not RFC 822linked.
10887 <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.
10890 <p>This is <a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">RFC 822</a> but thisRFC 822 is not RFC 822linked.</p>
10894 Magic links: RFC (w/ non-newline whitespace, T30950/T31025)
10896 RFC      822
10900 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc822">RFC 822</a>
10905 <p><a href="https://tools.ietf.org/html/rfc822" rel="mw:ExtLink" class="external text">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>
10911 Magic links: ISBN (T3937)
10915 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
10918 <p><a href="./Special:BookSources/0306406152" rel="mw:WikiLink">ISBN 0-306-40615-2</a></p>
10922 Magic links: ISBN (T67278)
10924 This is ISBN 978-0-316-09811-3 but thisISBN 978-0-316-09811-3 is not ISBN 978-0-316-09811-3linked.
10926 <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.
10929 <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>
10933 Magic links: ISBN (w/ non-newline whitespace, T30950/T31025)
10935 ISBN      978 0 316 09811 3
10941 <p><a href="/wiki/Special:BookSources/9780316098113" class="internal mw-magiclink-isbn">ISBN 978 0 316 09811 3</a>
10948 <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>
10956 Magic links: PMID incorrectly converts space to underscore
10960 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10963 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a></p>
10967 Magic links: PMID (T67278)
10969 This is PMID 1234 but thisPMID 1234 is not PMID 1234linked.
10971 <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.
10974 <p>This is <a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">PMID 1234</a> but thisPMID 1234 is not PMID 1234linked.</p>
10978 Magic links: PMID (w/ non-newline whitespace, T30950/T31025)
10980 PMID      1234
10984 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
10989 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" rel="mw:ExtLink" class="external text">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>
10994 # <nowiki> nodes shouldn't be inserted during html2wt by Parsoid,
10995 # since these are ExtLinkText, not MagicLinkText
10997 Magic links: use appropriate serialization for "almost" magic links.
10999 X[[Special:BookSources/0978739256|foo]]
11001 X[https://tools.ietf.org/html/rfc1234 foo]
11003 <p>X<a href="/wiki/Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a>
11004 </p><p>X<a rel="nofollow" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a>
11007 <p>X<a rel="mw:WikiLink" href="./Special:BookSources/0978739256" title="Special:BookSources/0978739256">foo</a></p>
11008 <p>X<a rel="mw:ExtLink" class="external text" href="https://tools.ietf.org/html/rfc1234">foo</a></p>
11012 Magic links: All disabled (T47942)
11014 wgEnableMagicLinks={"ISBN":false, "PMID":false, "RFC":false}
11020 <p>ISBN 0-306-40615-2
11031 Nonexistent template
11033 {{thistemplatedoesnotexist}}
11035 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
11040 Template with invalid target containing tags
11042 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11044 <p>{{a<b>b</b>|foo|a=b|a = b}}
11049 Template with invalid target containing unclosed tag
11051 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
11053 <p>{{a<b>|foo|a=b|a = b}}</b>
11058 Template with invalid target containing wikilink
11062 <p>{{<a href="/wiki/Main_Page" title="Main Page">Main Page</a>}}
11065 <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>
11069 Template with just whitespace in it, T70421
11073 <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>
11079 This is a test template
11087 <p>This is a test template
11092 Template with explicit namespace
11096 <p>This is a test template
11104 This is a test template with parameter {{{param}}}
11110 {{paramtest|param=foo}}
11112 <p>This is a test template with parameter foo
11117 Template:paramtestnum
11119 [[{{{1}}}|{{{2}}}]]
11123 Template unnamed parameter
11125 {{paramtestnum|Main Page|the main page}}
11127 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
11132 Template:templatesimple
11138 Template:templateredirect
11140 #redirect [[Template:templatesimple]]
11144 Template:templateasargtestnum
11150 Template:templateasargtest
11152 {{template{{{templ}}}}}
11156 Template:templateasargtest2
11162 Template with template name as unnamed argument
11164 {{templateasargtestnum|templatesimple}}
11171 Template with template name as argument
11173 {{templateasargtest|templ=simple}}
11180 Template with template name as argument (2)
11182 {{templateasargtest2|templ=templatesimple}}
11189 Template:templateasargtestdefault
11191 {{{{{templ|templatesimple}}}}}
11201 Template with default value
11203 {{templateasargtestdefault}}
11210 Template with default value (value set)
11212 {{templateasargtestdefault|templ=templa}}
11221 {{templateredirect}}
11226 <link rel="mw:PageProp/redirect" href="./Template:Templatesimple" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"templateredirect","href":"./Template:Templateredirect"},"params":{},"i":0}}]}'/>
11230 Template with argument in separate line
11232 {{ templateasargtest |
11240 Template with complex template as argument
11243 param ={{ templateasargtest |
11244 templ = simple }}}}
11246 <p>This is a test template with parameter (test)
11251 Templates with templated name
11253 {{{{echo|echo}}|foo}}
11254 {{{{echo|inner list}} }}
11258 <ul><li>item 1</li></ul>
11261 <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>
11262 <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>
11265 ## Regression test; the output here isn't really that interesting.
11267 Templates with templated name and top level template args
11269 {{1{{2{{{3}}}|4=5}}}}
11271 <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>
11274 # Parsoid markup is deliberate "broken". This is an edge case.
11275 # See long comment in TemplateHandler.js:convertAttribsToString.
11277 Templates with invalid templated targets
11288 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo\n{{echo|foo}}\n"},"params":{},"i":0}}]}'>{{echo
11293 Template with thumb image (with link in description)
11295 {{paramtest|param=[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
11297 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>
11300 <p>This is a test template with parameter </p><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>
11302 <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>
11306 Template:complextemplate
11308 {{{1}}} {{paramtest|
11309 param ={{{param}}}}}
11313 Template with complex arguments
11316 param ={{ templateasargtest |
11317 templ = simple }}|[[Template:complextemplate|link]]}}
11319 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
11324 T2553: link with two variables in a piped link
11327 |[[{{{1}}}|{{{2}}}]]
11332 <td>[[{{{1}}}|{{{2}}}]]
11337 <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>
11343 Abort table cell attribute parsing on wikilink
11346 |testing [[one|two]] |three||four
11347 |testing one two |three||four
11348 |testing="[[one|two]]" |three||four
11353 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> |three</td>
11359 <td>testing="<a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a>" |three</td>
11365 <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>
11366 <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>
11367 <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>
11372 Don't abort table cell attribute parsing if wikilink is found in template arg
11375 |Test {{#tag:ref|One two "[[three]]" four}}
11379 <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>
11384 Magic variable as template parameter
11386 {{paramtest|param={{SITENAME}}}}
11388 <p>This is a test template with parameter MediaWiki
11395 [[{{{param}}}|link]]
11399 Template parameter as link source
11401 {{linktest|param=Main Page}}
11403 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
11408 Template:paramtest2
11410 including another template, {{paramtest|param={{{arg}}}}}
11414 Template passing argument to another template
11416 {{paramtest2|arg='hmm'}}
11418 <p>including another template, This is a test template with parameter 'hmm'
11429 Template as link source
11433 [[{{linktest2}}|Main Page]]
11435 [[{{linktest2}}]]Page
11437 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11438 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11439 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
11457 Template infinite loop
11461 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
11466 Template from main namespace
11485 T2529: Template with table, not included at beginning of line
11504 T2523: Template shouldn't eat newline (or add an extra one before table)
11524 T2041: Template parameters shown as broken links
11533 Template with targets containing wikilinks
11539 {{[[{{echo|foo}}]]}}
11541 {{{{echo|[[foo}}]]}}
11543 <p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11544 </p><p>{{<a href="/wiki/Foo" title="Foo">foo</a>}}
11548 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">foo</a>}}</p>
11549 <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>
11550 <p>{{<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[foo}}]]"}},"i":0}}]}'>[[foo}}]]</span></p>
11560 Templates: Double quotes as template target
11567 <p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"''","href":"./Template:''"},"params":{},"i":0}}]}'>bar</span> baz
11571 ## This test is about making sure Parsoid's data-mw is well formed in the
11572 ## face of multiple templates with intersecting and overlapping ranges. The
11573 ## wikitext itself is wretched.
11575 Templates with intersecting and overlapping ranges
11586 </table><p>ho</p><table>
11590 </td></tr></tbody></table>
11592 <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":""}]]}'>
11594 </table><p about="#mwt1">ho</p><table about="#mwt1" typeof="mw:ExpandedAttrs" data-mw='{"attribs":[[{"txt":"","html":""},{"html":""}]]}'>
11596 <tbody><tr><td>hi</td></tr>
11601 Template:MSGNW test
11603 ''None'' of '''this''' should be
11605 but rather passed unmodified
11613 # hmm, fix this or just deprecate msgnw and document its behavior?
11617 {{msgnw:MSGNW test}}
11619 <p>''None'' of '''this''' should be
11621  but rather passed unmodified
11622 {{test}}
11626 <!-- comment -->
11633 {{int:youhavenewmessages|lots of money|not!}}
11635 <p>You have lots of money (not!).
11640 int keyword - non-existing message
11651 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11655 <includeonly> and <noinclude> being included
11666 <onlyinclude>Foo</onlyinclude>bar
11670 <onlyinclude> being included
11682 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
11686 <onlyinclude> and <includeonly> being included
11695 <includeonly> and <noinclude> on a page
11697 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
11704 Un-closed <noinclude>
11711 <onlyinclude> on a page
11713 <onlyinclude>Foo</onlyinclude>bar
11720 Un-closed <onlyinclude>
11727 Self-closed noinclude, includeonly, onlyinclude tags
11738 Unbalanced includeonly and noinclude tags
11742 |b</noinclude></noinclude>
11743 |c</noinclude></includeonly>
11744 |d</includeonly></includeonly>
11753 <td>c</includeonly>
11755 <td>d</includeonly></includeonly>
11761 Template:Includeonly section
11764 ==Includeonly section==
11770 T8563: Edit link generation for section shown by <includeonly>
11772 {{includeonly section}}
11774 <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>
11775 <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>
11779 # Uses same input as the contents of [[Template:Includeonly section]]
11781 T8563: Section extraction for section shown by <includeonly>
11786 ==Includeonly section==
11794 T8563: Edit link generation for section suppressed by <includeonly>
11797 ==Includeonly section==
11801 <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>
11806 T8563: Section extraction for section suppressed by <includeonly>
11811 ==Includeonly section==
11819 Un-closed <includeonly>
11824 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>"}'/>
11827 ## We used to, but no longer wt2wt this test since the default serializer
11828 ## will normalize the include directives to serialize on their own line.
11829 ## Selser will take care of preserving formatting in scenarios where they
11830 ## intermingled with other wikitext.
11832 Includes and comments at SOL
11834 parsoid=wt2html,html2html
11836 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->==hu==
11843 <includeonly>can have stuff</includeonly>===here===
11846 <h2><span class="mw-headline" id="hu">hu</span></h2>
11851 <h3><span class="mw-headline" id="here">here</span></h3>
11854 <!-- 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>
11856 <meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>"}'/>
11858 <meta typeof="mw:Includes/NoInclude/End" data-parsoid='{"src":"</noinclude>"}'/><ul><li>stuff</li>
11861 <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>
11865 # TODO: test with DOM fragment reuse!
11867 Parsoid: DOM fragment reuse
11869 parsoid=wt2wt,wt2html
11871 a{{echo|b<table></table>c}}d
11883 <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>
11885 <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">
11886 </span><table about="#mwt2" data-parsoid='{"stx":"html"}'></table><span about="#mwt2">
11887 </span><p about="#mwt2">cd</p>
11889 <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">
11891 </span><table about="#mwt3" data-parsoid='{"stx":"html"}'></table><span about="#mwt3">
11893 </span><p about="#mwt3">b</p>
11897 Parsoid: Merge double tds (T52603)
11902 |{{echo|{{!}} foo}}
11906 <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>
11911 Parsoid: Merge double tds in nested transclusion content (T52603)
11917 |{{echo|{{!}} foo}}
11921 <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}}]}'>
11923 <tr><td data-mw='{"parts":["|"]}'> foo</td></tr>
11929 ### <includeonly> and <noinclude> in attributes
11932 0. includeonly around the entire attribute
11934 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
11936 <p><span id="v2">bar</span>
11941 1. includeonly in html attr key
11943 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
11945 <p><span id="foo">bar</span>
11950 2. includeonly in html attr value
11952 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
11953 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
11955 <p><span id="v1">bar</span>
11956 <span id="v1">bar</span>
11961 3. includeonly in part of an attr value
11963 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
11965 <p><span style="color:red;">bar</span>
11970 4. includeonly in table attributes
11994 ### Preprocessor precedence tests
11995 ### See: https://www.mediawiki.org/wiki/Preprocessor_ABNF
11997 ##{{[[-{{{{{{[[Foo|bar}}]]}-}}}}}]]
11999 Preprocessor precedence 1: link is rightmost opening
12005 But close-brace is not a valid character in a link title:
12008 However, we can still tell this was handled as a link in the preprocessor:
12009 {{echo|[[Foo}}|bar]]|bat}}
12011 <p>{{<a href="/wiki/Foo" title="Foo">bar}}</a>
12012 </p><p>But close-brace is not a valid character in a link title:
12014 </p><p>However, we can still tell this was handled as a link in the preprocessor:
12018 <p>{{<a rel="mw:WikiLink" href="./Foo" title="Foo">bar}}</a></p>
12019 <p>But close-brace is not a valid character in a link title: {{[[Foo}}|bar]]</p>
12020 <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>
12024 Preprocessor precedence 2: template is rightmost opening
12033 <p>-<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}-"}},"i":0}}]}'>foo}-</span>-</p>
12037 Preprocessor precedence 3: language converter is rightmost opening
12053 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi"}},"i":0}}]}'>hi</p>
12054 <p>{{<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"echo|hi}}"}}'></span></p>
12055 <p>[[<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw]]"}}'></span></p>
12059 Preprocessor precedence 4: left-most angle bracket
12070 Template:Precedence5
12076 Preprocessor precedence 5: tplarg takes precedence over template
12078 {{Precedence5|Bullet}}
12080 <ul><li>Bar</li></ul>
12083 <ul typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Precedence5","href":"./Template:Precedence5"},"params":{"1":{"wt":"Bullet"}},"i":0}}]}'><li>Bar</li></ul>
12087 Preprocessor precedence 6: broken link is rightmost opening
12093 {{echo|[[Foo|bar|bat=baz}}
12096 </p><p>{{echo|[[Foo|bar|bat=baz}}
12099 <p>{{echo|[[Foo}}</p>
12100 <p>{{echo|[[Foo|bar|bat=baz}}</p>
12103 # This next test exposes a difference between PHP and Parsoid:
12104 # Given [[Foo|{{echo|Bar]]x}}y]]z:
12105 # 1) Both PHP and Parsoid ignore the `]]` inside the `echo` in the
12106 # "preprocessor" stage. The `{{echo` extends until the `x}}`, and the
12107 # outer `[[Foo` extends until the `y]]`
12108 # 2a) But then the PHP preprocessor emits `[[Foo|Bar]]xy]]z` as an
12109 # intermediate result (after template expansion), and link processing
12110 # happens on this intermediate result, which moves the wikilink
12111 # boundary leftward to `[[Foo|Bar]]`
12112 # 2b) Parsoid works in a single step, so it's going to keep the
12113 # wikilink as extending to the `y]]`
12114 # 3a) Then PHP does linktrail processing which slurps up the trailing
12115 # `xy` inside the link.
12116 # 3b) Parsoid will do linktrail processing to slurp up the trailing
12117 # `z` inside the link.
12118 # This is "correct" behavior. Parsoid's basic worldview is that the
12119 # `]]` inside the template shouldn't be allowed to leak out to affect
12120 # the surrounding wikilink. PHP may match Parsoid (in the future)
12121 # if you use {{#balance}} (T114445).
12124 Preprocessor precedence 7: broken template is rightmost opening
12130 [[Foo|{{echo|Bar]]-x}}-y]]-z
12132 Careful: linktrails can move the end of the wikilink:
12133 [[Foo|{{echo|y']]a}}l]]l
12135 <p><a href="/wiki/Foo" title="Foo">{{echo|Bar</a>
12136 </p><p><a href="/wiki/Foo" title="Foo">Bar</a>-x-y]]-z
12137 </p><p>Careful: linktrails can move the end of the wikilink:
12138 <a href="/wiki/Foo" title="Foo">y'al</a>]]l
12141 <p>[[Foo|{{echo|Bar]]</p>
12142 <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>
12143 <p>Careful: linktrails can move the end of the wikilink:
12144 <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>
12148 Preprocessor precedence 8: broken language converter is rightmost opening
12159 Template:Preprocessor_precedence_9
12164 ;7: {{{{{{{4}}}}}}}
12168 Preprocessor precedence 9: groups of braces
12170 {{Preprocessor precedence 9|Four|Bullet|1|2}}
12176 <ul><li>Bar</li></ul>
12180 <dd>{Bullet}</dd></dl>
12183 <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}}]}'>
12188 </dl><ul about="#mwt1">
12190 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12199 Template:Preprocessor_precedence_10
12206 ;6: -{{{{{{4}}}}}}-
12207 ;7: -{{{{{{{5}}}}}}}-
12211 Preprocessor precedence 10: groups of braces with leading dash
12215 {{Preprocessor precedence 10|Three|raw2|Bullet|1|2}}
12221 <ul><li>Bar-</li></ul>
12228 <ul><li>Bar-</li></ul>
12235 <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}}]}'>
12237 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw"}}'></span></dd>
12240 </dl><ul about="#mwt1">
12242 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12246 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12249 </dl><ul about="#mwt1">
12251 </ul><span about="#mwt1"> </span><dl about="#mwt1">
12255 <dd><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"raw2"}}'></span></dd>
12260 Preprocessor precedence 11: found during visual diff testing
12262 {{#tag:span|-{{#tag:span|-{{echo|x}}}}}}
12264 {{echo|-{{echo|-{{echo|x}}}}}}
12266 {{echo|-{{echo|x}}}}
12268 <p><span>-<span>-x</span></span>
12273 <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>
12275 <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>
12277 <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>
12281 Preprocessor precedence 12: broken language converter closed by brace.
12285 This form breaks the template, which is unfortunate:
12286 *{{echo|foo-{bar}bat}}
12288 But if the broken language converter markup is inside an extension
12289 tag, nothing bad happens:
12290 *<nowiki>foo-{bar}bat</nowiki>
12291 *{{echo|<nowiki>foo-{bar}bat</nowiki>}}
12292 *<pre>foo-{bar}bat</pre>
12293 *{{echo|<pre>foo-{bar}bat</pre>}}
12295 <tag>foo-{bar}bat</tag>
12296 {{echo|<tag>foo-{bar}bat</tag>}}
12299 <p>This form breaks the template, which is unfortunate:
12301 <ul><li>{{echo|foo-{bar}bat}}</li></ul>
12302 <p>But if the broken language converter markup is inside an extension
12303 tag, nothing bad happens:
12305 <ul><li>foo-{bar}bat</li>
12306 <li>foo-{bar}bat</li>
12307 <li><pre>foo-{bar}bat</pre></li>
12308 <li><pre>foo-{bar}bat</pre></li></ul>
12309 <pre>'foo-{bar}bat'
12313 <pre>'foo-{bar}bat'
12318 <p>This form breaks the template, which is unfortunate:</p>
12320 <li>{{echo|foo-{bar}bat}}</li>
12322 <p>But if the broken language converter markup is inside an extension tag, nothing bad happens:</p>
12324 <li><span typeof="mw:Nowiki">foo-{bar}bat</span></li>
12325 <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>
12326 <li><pre typeof="mw:Extension/pre" data-mw='{"name":"pre","attrs":{},"body":{"extsrc":"foo-{bar}bat"}}'>foo-{bar}bat</pre></li>
12327 <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>
12329 <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>
12333 Preprocessor precedence 13: broken language converter in external link
12337 *[http://example.com/-{foo Example in URL]
12338 *[http://example.com Example in -{link} description]
12339 *{{echo|[http://example.com/-{foo Breaks template, however]}}
12341 <ul><li><a rel="nofollow" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12342 <li><a rel="nofollow" class="external text" href="http://example.com">Example in -{link} description</a></li>
12343 <li>{{echo|<a rel="nofollow" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li></ul>
12346 <li><a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Example in URL</a></li>
12347 <li><a rel="mw:ExtLink" class="external text" href="http://example.com">Example in -{link} description</a></li>
12348 <li>{{echo|<a rel="mw:ExtLink" class="external text" href="http://example.com/-{foo">Breaks template, however</a>}}</li>
12353 Preprocessor precedence 14: broken language converter in comment
12355 *<!--{{foo}}-->...should be ok
12356 *<!---{{foo}}-->...extra dashes
12357 *{{echo|foo<!-- -{bar} -->bat}}...should be ok
12359 <ul><li>...should be ok</li>
12360 <li>...extra dashes</li>
12361 <li>foobat...should be ok</li></ul>
12364 <li><!--{{foo}}-->...should be ok</li>
12365 <li><!---{{foo}}-->...extra dashes</li>
12366 <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>
12371 Preprocessor precedence 15: broken brace markup in headings
12373 wgFragmentMode=[ 'html5', 'legacy' ]
12377 __NOTOC__ __NOEDITSECTION__
12386 ===5 foo{{{bar 5===
12391 <h3><span id="1_foo.5Bbar_1"></span><span class="mw-headline" id="1_foo[bar_1">1 foo[bar 1</span></h3>
12394 <h3><span id="2_foo.5B.5Bbar_2"></span><span class="mw-headline" id="2_foo[[bar_2">2 foo[[bar 2</span></h3>
12397 <h3><span id="3_foo.7Bbar_3"></span><span class="mw-headline" id="3_foo{bar_3">3 foo{bar 3</span></h3>
12400 <h3><span id="4_foo.7B.7Bbar_4"></span><span class="mw-headline" id="4_foo{{bar_4">4 foo{{bar 4</span></h3>
12403 <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>
12406 <h3><span id="6_foo-.7Bbar_6"></span><span class="mw-headline" id="6_foo-{bar_6">6 foo-{bar 6</span></h3>
12410 <meta property="mw:PageProp/notoc"/> <meta property="mw:PageProp/noeditsection"/>
12411 <h3 id="1_foo[bar_1"><span id="1_foo.5Bbar_1" typeof="mw:FallbackId"></span>1 foo[bar 1</h3>
12413 <h3 id="2_foo[[bar_2"><span id="2_foo.5B.5Bbar_2" typeof="mw:FallbackId"></span>2 foo[[bar 2</h3>
12415 <h3 id="3_foo{bar_3"><span id="3_foo.7Bbar_3" typeof="mw:FallbackId"></span>3 foo{bar 3</h3>
12417 <h3 id="4_foo{{bar_4"><span id="4_foo.7B.7Bbar_4" typeof="mw:FallbackId"></span>4 foo{{bar 4</h3>
12419 <h3 id="5_foo{{{bar_5"><span id="5_foo.7B.7B.7Bbar_5" typeof="mw:FallbackId"></span>5 foo{{{bar 5</h3>
12421 <h3 id="6_foo-{bar_6"><span id="6_foo-.7Bbar_6" typeof="mw:FallbackId"></span>6 foo-{bar 6</h3>
12426 Preprocessor precedence 16: matching closing braces to opening braces
12431 -{{{echo|foo}}bar}-
12436 <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>
12440 Preprocessor precedence 17: template w/o target shouldn't prevent closing
12449 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"hi {{}}"}},"i":0}}]}'>hi {{}}</p>
12453 Preprocessor precedence 18: another rightmost wins scenario
12457 {{ -{{{{1|tplarg}}} }} }-
12459 <p>{{ -{tplarg }} }-
12462 <p>{{ -{<span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"1"},"params":{"1":{"wt":"tplarg"}},"i":0}}]}'>tplarg</span> }} }-</p>
12466 Preprocessor precedence 19: break syntax
12479 ### Token Stream Patcher tests
12481 ### These tests won't always pass wt2wt and other modes because
12482 ### on serialization, the table will be output on a new line.
12483 ### For now, we are blacklisting them, and using this to test selser.
12487 1. Table tag in SOL posn. should get reparsed correctly with valid TSR
12489 parsoid=wt2html,wt2wt
12491 {{echo|}}{| width = '100%'
12495 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":""}},"i":0}}]}'></span><table width="100%">
12496 <tbody><tr><td>foo</td></tr>
12500 ## We used to, but no longer wt2wt this test since the default serializer
12501 ## will normalize the include directives to serialize on their own line.
12502 ## Selser will take care of preserving formatting in scenarios where they
12503 ## intermingled with other wikitext.
12505 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
12509 <includeonly>a</includeonly>{| {{{b}}}
12513 <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":""}]]}'>
12514 <tbody><tr><td>c</td></tr>
12519 Table wikitext syntax outside wiki-tables
12523 ! not a table heading
12526 | class="foo bar" | baz
12534 ! not a table heading
12537 | class="foo bar" | baz
12546 ### Testing parsing of templates where a template arg
12547 ### has the same name as the template itself.
12553 {{{quote|{{{1}}}}}}
12557 Templates: Template Name/Arg clash: 1. Use of positional param
12566 Templates: Template Name/Arg clash: 2. Use of named param
12568 {{quote|quote=foo}}
12575 Templates: Template Name/Arg clash: 3. Use of named param with empty input
12584 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
12588 Templates: 1. Simple use
12597 Templates: 2. Inside a block tag
12599 <div>{{echo|Foo}}</div>
12600 <blockquote>{{echo|Foo}}</blockquote>
12603 <blockquote>Foo</blockquote>
12607 <blockquote><p>Foo</p></blockquote>
12611 Templates: P-wrapping: 1a. Templates on consecutive lines
12622 Templates: P-wrapping: 1b. Templates on consecutive lines
12636 Templates: P-wrapping: 1c. Templates on consecutive lines
12639 {{echo|bar}} <div>baz</div>
12648 bar </p><div>baz</div>
12652 Templates: P-wrapping: 1d. Template preceded by comment-only line
12661 <p about="#mwt223" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"Bar"}},"i":0}}]}'>Bar</p>
12665 Templates: Inline Text: 1. Multiple template uses
12667 {{echo|Foo}}bar{{echo|baz}}
12674 Templates: Inline Text: 2. Back-to-back template uses
12676 {{echo|Foo}}{{echo|bar}}
12683 Templates: Block Tags: 1. Multiple template uses
12685 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
12687 <div>Foo</div><div>bar</div><div>baz</div>
12692 Templates: Block Tags: 2. Back-to-back template uses
12694 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
12696 <div>Foo</div><div>bar</div>
12700 # This is an edge case relating to paragraph wrapping.
12702 Templates: Correctly encapsulate templates producing </p> tag without a corresponding <p> tag
12707 <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
12712 Templates: Links: 1. Simple example
12714 {{echo|[[Foo|bar]]}}
12716 <p><a href="/wiki/Foo" title="Foo">bar</a>
12721 Templates: Links: 2. Generation of link href
12723 [[{{echo|Foo}}|bar]]
12725 <p><a href="/wiki/Foo" title="Foo">bar</a>
12730 Templates: Links: 3. Generation of part of a link href
12732 [[Fo{{echo|o}}|bar]]
12734 [[Foo{{echo|bar}}]]
12736 [[Foo{{echo|bar}}baz]]
12738 [[Foo{{echo|bar}}|bar]]
12740 [[:Foo{{echo|bar}}]]
12742 [[:Foo{{echo|bar}}|bar]]
12744 <p><a href="/wiki/Foo" title="Foo">bar</a>
12745 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12746 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
12747 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12748 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12749 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
12754 Templates: Links: 4. Multiple templates generating link href
12756 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
12758 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
12763 Templates: Links: 5. Generation of link text
12765 [[Foo|{{echo|bar}}]]
12767 <p><a href="/wiki/Foo" title="Foo">bar</a>
12772 Templates: Links: 5. Nested templates (only outermost template should be marked)
12774 {{echo|[[{{echo|Foo}}|bar]]}}
12776 <p><a href="/wiki/Foo" title="Foo">bar</a>
12781 Templates: HTML Tag: 1. Generation of HTML attr. key
12783 <div {{echo|style}}="color:red;">foo</div>
12785 <div style="color:red;">foo</div>
12790 Templates: HTML Tag: 2. Generation of HTML attr. value
12792 <div style={{echo|'color:red;'}}>foo</div>
12794 <div style="color:red;">foo</div>
12799 Templates: HTML Tag: 3. Generation of HTML attr key and value
12801 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
12803 <div style="color:red;">foo</div>
12808 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
12810 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
12812 <div title="This is a long title with just one piece templated">foo</div>
12817 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
12819 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
12821 <div title="This is a long title with just one piece templated">foo</div>
12826 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
12828 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
12830 <div title="This is a long title with just one piece templated">foo</div>
12834 # SSS FIXME: While it is great we added support for all this,
12835 # do we want to make this part of the spec? Maybe we want to
12836 # deprecate this kind of usage in the future?
12838 Templates: HTML Tag: 7. Generation of partial attribute key string
12840 <div st{{echo|yle}}="color:red;">foo</div>
12842 <div style="color:red;">foo</div>
12847 Templates: HTML Tag: 8. Template-generated attribute (k=v)
12849 <div {{echo|1=id="v1"}}>bar</div>
12851 <div id="v1">bar</div>
12856 Templates: HTML Tag: 9. Multiple template-generated attributes
12858 <div {{echo|1=id="v1" title="foo"}}>bar</div>
12860 <div id="v1" title="foo">bar</div>
12865 Templates: Support for templates generating attributes and content
12867 {| {{mixed_attr_content_template}}
12872 <table style="color:red;" title="T48811">
12882 <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|}"]}'>
12891 1. Entities and nowikis inside templated attributes should be handled correctly
12893 <div {{echo|style{{=}}"background:#f9f9f9;"}}>foo</div>
12895 <div style="background:#f9f9f9;">foo</div>
12898 <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>
12902 2. Entities and nowikis inside templated attributes should be handled correctly
12905 |{{table_attribs_3}}
12910 <td style="background:#f9f9f9;">Foo
12915 <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>
12920 3. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12923 |{{table_attribs_3}}
12928 <td style="background:#f9f9f9;">Foo
12932 <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}}]}'>
12933 <tbody><tr><td style="background:#f9f9f9;">Foo</td></tr>
12939 4. Entities and nowikis inside templated attributes should be handled correctly inside templated tables
12942 |{{table_attribs_6}} hi
12947 <td style="background: red;">hi
12952 <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>
12957 Templates: HTML Tables: 1. Generating start of a HTML table
12959 {{echo|<table><tr><td>foo</td>}}</tr></table>
12961 <table><tr><td>foo</td></tr></table>
12966 Templates: HTML Tables: 2a. Generating middle of a HTML table
12968 <table><tr>{{echo|<td>foo</td>}}</tr></table>
12970 <table><tr><td>foo</td></tr></table>
12975 Templates: HTML Tables: 2b. Generating middle of a HTML table
12977 <table>{{echo|<tr><td>foo</td></tr>}}</table>
12979 <table><tr><td>foo</td></tr></table>
12984 Templates: HTML Tables: 3. Generating end of a HTML table
12986 <table><tr>{{echo|<td>foo</td></tr></table>}}
12988 <table><tr><td>foo</td></tr></table>
12993 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
12995 {{echo|<table>}}<tr><td>foo</td></tr></table>
12997 <table><tr><td>foo</td></tr></table>
13002 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
13004 <table>{{echo|<tr>}}<td>foo</td></tr></table>
13006 <table><tr><td>foo</td></tr></table>
13011 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
13013 <table><tr>{{echo|<td>}}foo</td></tr></table>
13015 <table><tr><td>foo</td></tr></table>
13020 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
13022 <table><tr><td>foo{{echo|</td>}}</tr></table>
13024 <table><tr><td>foo</td></tr></table>
13029 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
13031 <table><tr><td>foo</td>{{echo|</tr>}}</table>
13033 <table><tr><td>foo</td></tr></table>
13038 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
13040 <table><tr><td>foo</td></tr>{{echo|</table>}}
13042 <table><tr><td>foo</td></tr></table>
13047 Templates: HTML Tables: 5. Proper fostering of categories from inside
13049 parsoid=wt2html,wt2wt
13051 <table>[[Category:foo1]]<tr><td>foo</td></tr></table>
13052 <!--Two categories (T52330)-->
13053 <table>[[Category:bar1]][[Category:bar2]]<tr><td>foo</td></tr></table>
13055 <link rel="mw:PageProp/Category" href="./Category:Foo1"><table><tbody><tr><td>foo</td></tr></tbody></table>
13056 <!--Two categories (T52330)-->
13057 <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>
13061 Templates: Wiki Tables: 1a. Fostering of entire template content
13069 <tr><td></td></tr></table>
13074 <table><tbody><tr><td></td></tr></tbody></table>
13076 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}},"\n|}"]}'>a</p><table about="#mwt2">
13082 Templates: Wiki Tables: 1b. Fostering of entire template content
13095 <tr><td></td></tr></table>
13103 <tbody><tr><td></td></tr></tbody></table>
13105 <div about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}],[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>"}},"i":0}},"\nfoo\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"</div>"}},"i":1}},"\n|}"]}'>
13107 </div><table about="#mwt3">
13113 Templates: Wiki Tables: 2. Fostering of partial template content
13123 <tr><td></td></tr></table>
13128 <div>b</div><table>
13129 <tbody><tr><td></td></tr></tbody></table>
13131 <p about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"fostered":true,"autoInsertedEnd":true,"firstWikitextNode":"TABLE","pi":[[{"k":"1"}]]}' data-mw='{"parts":["{|\n",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n<div>b</div>"}},"i":0}},"\n|}"]}'>a</p><div about="#mwt2">b</div><table about="#mwt2">
13138 Templates: Wiki Tables: 3. td-content via multiple templates
13141 {{echo|{{pipe}}a}}{{echo|b}}
13152 Templates: Wiki Tables: 4. Templated tags, no content
13158 <tr><td></td></tr></table>
13163 Templates: Wiki Tables: 5. Templated tags, regular td-tags
13177 Templates: Wiki Tables: 6. Templated tags, templated td-tags
13190 ## This test case is very specific to Parsoid's internals
13191 ## and is hence only tested for Parsoid's code. Parsoid uses
13192 ## a <meta> marker tag for <ref> tags and they are expanded
13193 ## much later. We are verifying that this <meta> tag usage
13194 ## doesn't prevent foster parenting.
13196 Templates: Wiki Tables: 7. Fosterable <ref>s should get fostered
13198 {{PartialTable}}<ref>foo</ref>
13203 <sup 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></sup><table about="#mwt2">
13207 <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>
13211 Templates: Wiki Tables: 8. Fosterable meta-tags should get fostered
13221 <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{{!}}}"]}'>
13222 </span><meta typeof="mw:Includes/OnlyInclude" about="#mwt1"/><table about="#mwt1">
13226 <meta typeof="mw:Includes/OnlyInclude/End"/></td></tr>
13231 Templates: Lists: Multi-line list-items via templates
13233 *{{echo|a {{nonexistent|
13235 *{{echo|b {{nonexistent|
13238 <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>
13239 <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>
13244 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
13246 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
13248 <p><i>ab</i>c<i>d</i>e
13253 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
13254 (PHP parser generates misnested html)
13256 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
13258 <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>
13262 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
13263 (PHP parser generates misnested html; Parsoid html2wt mode adds newlines between {{echo}}s)
13265 parsoid=wt2html,wt2wt
13267 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
13269 <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>
13270 <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>
13271 <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>
13275 Templates: Ugly nesting: 4. Divs opened/closed across templates
13277 a<div>b{{echo|c</div>d}}e
13282 <p>a</p><div>bc</div><p>de
13287 Templates: Ugly templates: 3. newline-only template parameter
13296 # This looks like a bug: a single newline triggers p/br for some reason.
13298 Templates: Ugly templates: 4. newline-only template parameter inconsistency
13307 # T66017 -- ugly wikitext with fostered content generates two template ranges that
13308 # have a true overlap (T1-start - T2-start - T1-end - T2-end).
13310 Templates: Ugly templates: 5. Template encapsulation test: Non-trivial overlap of template ranges is properly handled
13316 <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
13317 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13321 # T66017 -- ugly wikitext with fostered content generates two template ranges
13322 # that are "identical" and generate nesting cycles in the algorithm
13324 Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of template ranges is properly handled
13326 {{echo|<table><tr><td><table>}}
13330 <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"}'>
13331 </div><table about="#mwt1" data-parsoid='{"stx":"html"}'>
13332 </table></td></tr></tbody></table>
13336 Templates: Parameters substituted at the top-level
13338 {{{foo|''who'' {{echo|me}}? '''never!'''}}}
13342 <p><i>who</i> me? <b>never!</b>
13346 <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>
13348 <p about="#mwt3" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"foo"},"params":{"1":{"wt":"bar"},"2":{"wt":"baz"}},"i":0}}]}'>bar</p>
13352 Templates: Param with empty arg in the final position
13356 <span about="#mwt1" typeof="mw:Param" data-mw='{"parts":[{"templatearg":{"target":{"wt":"hi"},"params":{"1":{"wt":""}},"i":0}}]}'></span>
13360 Parser Functions: 1. Simple example
13369 Parser Functions: 2. Nested use (only outermost should be marked up)
13378 ### Pre-save transform tests
13381 pre-save transform: subst:
13387 This is a test template
13391 pre-save transform: normal template
13401 pre-save transform: nonexistent template
13405 {{thistemplatedoesnotexist}}
13407 {{thistemplatedoesnotexist}}
13411 pre-save transform: subst magic variables
13420 # This is T2089, which I fixed. -- wtm
13422 pre-save transform: subst: templates with parameters
13426 {{subst:paramtest|param="something else"}}
13428 This is a test template with parameter "something else"
13432 Template:nowikitest
13434 <nowiki>'''not wiki'''</nowiki>
13438 pre-save transform: nowiki in subst (T3188)
13442 {{subst:nowikitest}}
13444 <nowiki>'''not wiki'''</nowiki>
13448 Template:commenttest
13450 This template has <!-- a comment --> in it.
13454 pre-save transform: comment in subst (T3936)
13458 {{subst:commenttest}}
13460 This template has <!-- a comment --> in it.
13464 pre-save transform: unclosed tag
13468 <nowiki>'''not wiki'''
13470 <nowiki>'''not wiki'''
13474 pre-save transform: mixed tag case
13478 <NOwiki>'''not wiki'''</noWIKI>
13480 <NOwiki>'''not wiki'''</noWIKI>
13484 pre-save transform: unclosed comment in <nowiki>
13488 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13490 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
13493 # Leading @ in this template definition works around a limitation
13494 # in parsoid's parserTests which otherwise strips the <span> from the
13495 # result (confusing it for a template wrapper)
13499 @<span onmouseover="alert('crap')">Oh no</span>
13503 (confirming safety of fix for subst T3936)
13505 {{Template:dangerous}}
13507 <p>@<span>Oh no</span>
13512 pre-save transform: comment containing gallery (T7024)
13516 <!-- <gallery>data</gallery> -->
13518 <!-- <gallery>data</gallery> -->
13522 pre-save transform: comment containing extension
13526 <!-- <tag>data</tag> -->
13528 <!-- <tag>data</tag> -->
13532 pre-save transform: comment containing nowiki
13536 <!-- <nowiki>data</nowiki> -->
13538 <!-- <nowiki>data</nowiki> -->
13542 pre-save transform: <noinclude> in subst (T5298)
13552 pre-save transform: <onlyinclude> in subst (T5298)
13556 {{subst:Includes2}}
13564 {{<includeonly>subst:</includeonly>Includes}}
13568 Template:SafeSubstTest
13570 {{<includeonly>safesubst:</includeonly>Includes}}
13574 T24297: safesubst: works during PST
13578 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
13584 T24297: safesubst: works during normal parse
13593 subst: does not work during normal parse
13597 <p>{{subst:Includes}}
13602 pre-save transform: context links ("pipe trick")
13606 [[Article (context)|]]
13609 [[Bar:Article (context)|]]
13610 [[:Bar:Article (context)|]]
13612 [[|Article (context)]]
13616 [[Article (context)|Article]]
13617 [[Bar:Article|Article]]
13618 [[:Bar:Article|Article]]
13619 [[Bar:Article (context)|Article]]
13620 [[:Bar:Article (context)|Article]]
13622 [[Article (context)]]
13623 [[Bar:X (Y) Z|X (Y) Z]]
13624 [[:Bar:X (Y) Z|X (Y) Z]]
13628 pre-save transform: context links ("pipe trick") with interwiki prefix
13632 [[interwiki:Article|]]
13633 [[:interwiki:Article|]]
13634 [[interwiki:Bar:Article|]]
13635 [[:interwiki:Bar:Article|]]
13637 [[interwiki:Article|Article]]
13638 [[:interwiki:Article|Article]]
13639 [[interwiki:Bar:Article|Bar:Article]]
13640 [[:interwiki:Bar:Article|Bar:Article]]
13644 pre-save transform: context links ("pipe trick") with parens in title
13646 pst title=[[Somearticle (context)]]
13650 [[Article (context)|Article]]
13654 pre-save transform: context links ("pipe trick") with comma in title
13656 pst title=[[Someplace, Somewhere]]
13659 [[Otherplace, Elsewhere|]]
13660 [[Otherplace, Elsewhere, Anywhere|]]
13662 [[Otherplace, Somewhere|Otherplace]]
13663 [[Otherplace, Elsewhere|Otherplace]]
13664 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
13668 pre-save transform: context links ("pipe trick") with parens and comma
13670 pst title=[[Someplace (IGNORED), Somewhere]]
13673 [[Otherplace (place), Elsewhere|]]
13675 [[Otherplace, Somewhere|Otherplace]]
13676 [[Otherplace (place), Elsewhere|Otherplace]]
13680 pre-save transform: context links ("pipe trick") with comma and parens
13682 pst title=[[Who, me? (context)]]
13685 [[Me, Myself, and I (1937 song)|]]
13687 [[Yes, you. (context)|Yes, you.]]
13688 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
13692 pre-save transform: context links ("pipe trick") with namespace
13694 pst title=[[Ns:Somearticle]]
13698 [[Ns:Article|Article]]
13702 pre-save transform: context links ("pipe trick") with namespace and parens
13704 pst title=[[Ns:Somearticle (context)]]
13708 [[Ns:Article (context)|Article]]
13712 pre-save transform: context links ("pipe trick") with namespace and comma
13714 pst title=[[Ns:Somearticle, Context, Whatever]]
13718 [[Ns:Article, Context, Whatever|Article]]
13722 pre-save transform: context links ("pipe trick") with namespace, comma and parens
13724 pst title=[[Ns:Somearticle, Context (context)]]
13728 [[Ns:Article (context)|Article]]
13732 pre-save transform: context links ("pipe trick") with namespace, parens and comma
13734 pst title=[[Ns:Somearticle (IGNORED), Context]]
13738 [[Ns:Article, Context|Article]]
13742 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, T32149)
13746 [[Article(context)|]]
13747 [[Bar:Article(context)|]]
13748 [[:Bar:Article(context)|]]
13749 [[|Article(context)]]
13753 [[Article(context)|Article]]
13754 [[Bar:Article(context)|Article]]
13755 [[:Bar:Article(context)|Article]]
13756 [[Article(context)]]
13757 [[Bar:X(Y)Z|X(Y)Z]]
13758 [[:Bar:X(Y)Z|X(Y)Z]]
13762 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, T32149)
13766 [[Article (context)|]]
13767 [[Bar:Article (context)|]]
13768 [[:Bar:Article (context)|]]
13769 [[|Article (context)]]
13773 [[Article (context)|Article]]
13774 [[Bar:Article (context)|Article]]
13775 [[:Bar:Article (context)|Article]]
13776 [[Article (context)]]
13777 [[Bar:X (Y) Z|X (Y) Z]]
13778 [[:Bar:X (Y) Z|X (Y) Z]]
13782 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, T32149)
13786 [[Article(context)|]]
13787 [[Bar:Article(context)|]]
13788 [[:Bar:Article(context)|]]
13789 [[|Article(context)]]
13793 [[Article(context)|Article]]
13794 [[Bar:Article(context)|Article]]
13795 [[:Bar:Article(context)|Article]]
13796 [[Article(context)]]
13797 [[Bar:X(Y)Z|X(Y)Z]]
13798 [[:Bar:X(Y)Z|X(Y)Z]]
13802 pre-save transform: context links ("pipe trick") with commas (T23660)
13806 [[Article (context), context|]]
13807 [[Article (context),context|]]
13808 [[Bar:Article (context), context|]]
13809 [[Bar:Article (context),context|]]
13810 [[:Bar:Article (context), context|]]
13811 [[:Bar:Article (context),context|]]
13813 [[Article (context), context|Article]]
13814 [[Article (context),context|Article]]
13815 [[Bar:Article (context), context|Article]]
13816 [[Bar:Article (context),context|Article]]
13817 [[:Bar:Article (context), context|Article]]
13818 [[:Bar:Article (context),context|Article]]
13822 Parsoid: backwards pipe trick
13829 <p>[[|<b>bar</b>]]</p>
13833 pre-save transform: trim trailing empty lines
13837 Empty lines are trimmed
13843 Empty lines are trimmed
13847 pre-save transform: Signature expansion
13854 * <noinclude>~~~</noinclude>
13855 * <includeonly>~~~</includeonly>
13856 * <onlyinclude>~~~</onlyinclude>
13858 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
13859 * [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13860 * 00:02, 1 January 1970 (UTC)
13861 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
13862 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
13863 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
13868 ParserOutput flags from signature expansion (T84843)
13875 [[Special:Contributions/127.0.0.1|127.0.0.1]] 00:02, 1 January 1970 (UTC)
13876 flags=user-signature
13881 pre-save transform: Signature expansion in nowiki tags (T2093)
13887 <nowiki>~~~~</nowiki>
13889 <includeonly><nowiki>~~~~</nowiki></includeonly>
13891 <noinclude><nowiki>~~~~</nowiki></noinclude>
13893 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13895 {{subst:Foo}} shall be converted to FOO
13897 As well as inside noinclude/onlyinclude
13898 <noinclude>{{subst:Foo}}</noinclude>
13899 <onlyinclude>{{subst:Foo}}</onlyinclude>
13901 But not inside includeonly
13902 <includeonly>{{subst:Foo}}</includeonly>
13906 <nowiki>~~~~</nowiki>
13908 <includeonly><nowiki>~~~~</nowiki></includeonly>
13910 <noinclude><nowiki>~~~~</nowiki></noinclude>
13912 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
13914 FOO shall be converted to FOO
13916 As well as inside noinclude/onlyinclude
13917 <noinclude>FOO</noinclude>
13918 <onlyinclude>FOO</onlyinclude>
13920 But not inside includeonly
13921 <includeonly>{{subst:Foo}}</includeonly>
13925 Parsoid: Recognize nowiki with trailing space in tags
13929 <nowiki ><div>[[foo]]</nowiki >
13937 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13944 Parsoid: Recognize nowiki with odd capitalization
13948 <noWikI ><div>[[foo]]</Nowiki >
13950 <p><span typeof="mw:Nowiki"><div>[[foo]]</span></p>
13955 Parsoid: Escape nowiki with trailing space in tags
13959 <p><nowiki > foo </nowiki ></p>
13960 <p>a<nowiki />b</p>
13961 <p>c<nowiki/ >d</p>
13963 <nowiki > foo </nowiki >
13971 Parsoid: Escape weird noWikI capitalizations
13975 <p><noWikI > foo </NoWikI ></p>
13977 <noWikI > foo </NoWikI >
13981 ### Message transform tests
13984 message transform: magic variables
13994 message transform: should not transform wiki markup
14004 message transform: <noinclude> in transcluded template (T6926)
14014 message transform: <onlyinclude> in transcluded template (T6926)
14024 {{#special:}} page name, known
14028 {{#special:Recentchanges}}
14030 Special:RecentChanges
14034 {{#special:}} page name with subpage, known
14038 {{#special:Recentchanges/param}}
14040 Special:RecentChanges/param
14044 {{#special:}} page name, unknown
14048 {{#special:foobar nonexistent}}
14050 Special:Foobar nonexistent
14054 {{#speciale:}} page name, known
14058 {{#speciale:Recentchanges}}
14060 Special:RecentChanges
14064 {{#speciale:}} page name with subpage, known
14068 {{#speciale:Recentchanges/param}}
14070 Special:RecentChanges/param
14074 {{#speciale:}} page name, unknown
14078 {{#speciale:foobar nonexistent}}
14080 Special:Foobar_nonexistent
14086 ### For Parsoid-specific tests, see
14087 #### https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
14092 parsoid=wt2html,wt2wt,html2html
14094 [[Image:foobar.jpg]]
14096 <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>
14099 <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>
14103 Serialize simple image with span wrapper
14107 <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>
14109 [[File:Foobar.jpg]]
14113 Simple image (using File: namespace, now canonical)
14115 [[File:Foobar.jpg]]
14117 <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>
14120 <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>
14124 Right-aligned image
14126 [[File:Foobar.jpg|right]]
14128 <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>
14131 <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>
14137 [[File:Foobar.jpg|right|Caption text]]
14139 <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>
14142 <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>
14146 Image with caption, T55312 #1
14148 [[File:Foobar.jpg|right|Caption page stuff]]
14150 <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>
14153 <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>
14157 Image with caption, T55312 #2
14159 [[File:Foobar.jpg|right|Caption page=]]
14161 <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>
14164 <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>
14168 Image with caption, T55312 #3
14170 [[File:Foobar.jpg|right|Caption page=stuff]]
14172 <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>
14175 <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>
14179 Image caption with pipe entity
14181 [[File:Foobar.jpg|thumb|one | two]]
14182 [[File:Foobar.jpg|thumb|one ''two'' | three]]
14184 <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>
14185 <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>
14188 <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>
14189 <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>
14193 Allow empty links in image captions (T62753)
14197 [[File:Foobar.jpg|thumb|Caption [[Link1]]
14202 <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>
14205 <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>
14207 <a rel="mw:WikiLink" href="./Link2" title="Link2" data-parsoid='{"stx":"simple","a":{"href":"./Link2"},"sa":{"href":"Link2"}}'>Link2</a>
14208 </figcaption></figure>
14212 Titles in unlinked images (T23454)
14214 [[File:Foobar.jpg|link=|stuff]]
14216 <p><img alt="stuff" src="http://example.com/images/3/3a/Foobar.jpg" title="stuff" width="1941" height="220" />
14219 <p><figure-inline class="mw-default-size" typeof="mw:Image" data-mw='{"caption":"stuff"}'><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>
14223 Link with empty target
14232 Image with link trail
14234 Linktrails should not work for images: [[File:Foobar.jpg]]s
14236 <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
14239 <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>
14243 Image with empty attribute
14245 parsoid=wt2html,wt2wt,html2html
14247 [[File:Foobar.jpg|right||Caption text]]
14249 <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>
14252 <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>
14256 1. Block image with individual attributes from templates
14258 [[File:Foobar.jpg|thumb|{{echo|137px}}|This is a caption]]
14260 <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>
14263 <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>
14267 2. Block Image with individual attributes from templates
14269 [[File:Foobar.jpg|{{echo|thumb}}|{{echo|137px}}|This is a caption]]
14271 <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>
14274 <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>
14278 3. Inline image with individual attributes from templates
14280 [[File:Foobar.jpg|{{echo|50px}}]]
14282 <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>
14285 <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>
14288 ## Parsoid does not provide editing support for images where templates produce multiple image attributes.
14289 ## To signal this, we add a 'mw:Placeholder' type to such images. This could change in the future.
14291 Image with multiple attributes from the same template
14293 [[File:Foobar.jpg|{{image_attribs}}]]
14295 <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>
14298 <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>
14302 Image with link tails
14306 123[[File:Foobar.jpg]]456
14307 123[[File:Foobar.jpg|right]]456
14308 123[[File:Foobar.jpg|thumb]]456
14310 <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
14312 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
14313 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
14316 <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
14318 123</p><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><p>456
14319 123</p><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><p>456
14322 <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>
14323 <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>
14324 <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>
14328 Image with multiple captions -- only last one is accepted
14330 [[File:Foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
14332 <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>
14335 <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>
14339 Image with multiple widths -- use last
14341 [[File:Foobar.jpg|200px|300px|caption]]
14343 <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>
14346 <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>
14350 Image with multiple alignments -- use first (T50664)
14354 [[File:Foobar.jpg|thumb|left|right|center|caption]]
14356 [[File:Foobar.jpg|middle|text-top|caption]]
14358 <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>
14359 <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>
14362 <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>
14363 <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>
14367 Image with width attribute at different positions
14369 [[File:Foobar.jpg|200px|right|Caption]]
14370 [[File:Foobar.jpg|right|200px|Caption]]
14371 [[File:Foobar.jpg|right|Caption|200px]]
14373 <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>
14374 <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>
14375 <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>
14378 <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>
14379 <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>
14380 <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>
14383 # a sad bit of backward-compatibility
14385 Image with size specified with pxpx (T15500, T53628)
14387 parsoid=wt2html,wt2wt,html2html
14389 [[File:Foobar.jpg|20pxpx]]
14390 [[File:Foobar.jpg|200x20pxpx]]
14392 <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>
14393 <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>
14396 <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>
14400 Image with link parameter, wiki target
14402 [[File:Foobar.jpg|link=Main Page]]
14404 <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>
14407 <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>
14410 # parsoid T51293 (part 1)
14412 Image with link parameter, URL target
14414 [[File:Foobar.jpg|link=http://example.com/]]
14416 <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>
14419 <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>
14422 # parsoid T51293 (part 2)
14424 Image with link parameter, protocol-less URL target
14426 [[File:Foobar.jpg|link=//example.com/]]
14428 <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>
14431 <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>
14435 Escaping non-block captions (T107435)
14438 "modes": ["wt2wt"],
14440 ["[typeof~='mw:Image']", "attr", "data-mw", "{\"caption\": \"|\"}"]
14444 [[Image:Foobar.jpg|caption]]
14446 [[Image:Foobar.jpg|<nowiki>|</nowiki>]]
14449 # wgExternalLinkTarget not supported by Parsoid
14451 Image with link parameter, wgExternalLinkTarget
14453 [[Image:foobar.jpg|link=http://example.com/]]
14455 wgExternalLinkTarget='foobar'
14457 <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>
14462 Image with link parameter, wgNoFollowLinks set to false
14464 [[Image:foobar.jpg|link=http://example.com/]]
14466 wgNoFollowLinks=false
14468 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14473 Image with link parameter, wgNoFollowDomainExceptions
14475 [[Image:foobar.jpg|link=http://example.com/]]
14477 wgNoFollowDomainExceptions='example.com'
14479 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
14483 # wgExternalLinkTarget not supported by Parsoid
14485 Image with link parameter, wgExternalLinkTarget, unnamed parameter
14487 [[Image:foobar.jpg|link=http://example.com/|Title]]
14489 wgExternalLinkTarget='foobar'
14491 <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>
14496 Image with empty link parameter
14498 [[File:Foobar.jpg|link=]]
14500 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
14503 <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>
14507 Image with link parameter (wiki target) and unnamed parameter
14509 [[File:Foobar.jpg|link=Main_Page|Title]]
14511 <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>
14514 <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>
14518 Image with link parameter (URL target) and unnamed parameter
14520 [[File:Foobar.jpg|link=http://example.com/|Title]]
14522 <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>
14525 <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>
14529 Thumbnail image with link parameter
14532 parsoid=wt2html,wt2wt,html2html
14534 [[File:Foobar.jpg|thumb|link=http://example.com/|Title]]
14536 <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>
14539 <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>
14543 Manually-specified thumbnail image
14547 [[File:Foobar.jpg|thumbnail=Thumb.png|Title]]
14549 <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>
14552 <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>
14556 Manually-specified thumbnail image with explicit link to wiki page
14559 parsoid=wt2html,wt2wt,html2html
14561 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|Title]]
14563 <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>
14566 <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>
14570 Manually-specified thumbnail image with explicit link to url
14573 parsoid=wt2html,wt2wt,html2html
14575 [[File:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
14577 <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>
14580 <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>
14584 Manually-specified thumbnail image with explicit no link
14587 parsoid=wt2html,wt2wt,html2html
14589 [[File:Foobar.jpg|thumb=Thumb.png|link=|Title]]
14591 <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>
14594 <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>
14598 Manually-specified thumbnail image with explicit link and alt text
14601 parsoid=wt2html,wt2wt,html2html
14603 [[File:Foobar.jpg|thumb=Thumb.png|link=Main_Page|alt=alttext|Title]]
14605 <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>
14608 <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>
14612 Image with frame and link
14614 parsoid=wt2html,wt2wt,html2html
14616 [[File:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
14618 <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>
14621 <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>
14625 Image with frame and link and explicit alt
14627 parsoid=wt2html,wt2wt,html2html
14629 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
14631 <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>
14634 <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>
14638 Image with wiki markup in implicit alt
14640 [[Image:Foobar.jpg|testing '''bold''' in alt]]
14642 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
14644 <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>
14645 </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>
14648 <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>
14650 <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>
14654 Alt image option should handle most kinds of wikitext without barfing
14656 [[Image:Foobar.jpg|thumb|This is the image caption|alt=This is a [[link]] and a {{echo|''bold template''}}.]]
14658 <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>
14661 <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>
14665 Image with table with attributes in caption
14667 parsoid=wt2html,html2html
14669 [[File:Foobar.jpg|thumb|
14676 <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>
14677 <table class="123">
14678 <tbody><tr class="456" data-parsoid='{"startTagSrc":"|-"}'>
14681 </figcaption></figure>
14685 Image with table with rows from templates in caption
14687 [[File:Foobar.jpg|thumb|
14693 <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>
14695 <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>
14697 </figcaption></figure>
14701 Image with nested tables in caption
14703 [[File:Foobar.jpg|thumb|Foo<br />
14712 <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}'/>
14716 <tbody><tr><td>z</td></tr>
14717 </tbody></table></td></tr>
14719 </figcaption></figure>
14722 ###################
14723 # Conflicting image format options.
14724 # First option specified should 'win'.
14725 # All three cases in each test should be identical.
14728 Image with 'frameless' first.
14730 parsoid=wt2html,wt2wt,html2html
14732 [[File:Foobar.jpg|frameless|caption]]
14734 [[File:Foobar.jpg|frameless|frame|caption]]
14736 [[File:Foobar.jpg|frameless|thumb|caption]]
14738 <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>
14739 </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>
14740 </p><p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
14743 <p><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>
14744 <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>
14745 <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>
14749 Image with 'frame' first.
14751 parsoid=wt2html,wt2wt,html2html
14753 [[File:Foobar.jpg|frame|caption]]
14754 [[File:Foobar.jpg|frame|frameless|caption]]
14755 [[File:Foobar.jpg|frame|thumb|caption]]
14757 <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>
14758 <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>
14759 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">caption</div></div></div>
14762 <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>
14763 <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>
14764 <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>
14768 Image with 'thumb' first.
14770 parsoid=wt2html,wt2wt,html2html
14772 [[File:Foobar.jpg|thumb|caption]]
14773 [[File:Foobar.jpg|thumb|frameless|caption]]
14774 [[File:Foobar.jpg|thumb|frame|caption]]
14776 <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>
14777 <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>
14778 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"></a></div>caption</div></div></div>
14781 <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>
14782 <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>
14783 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption>caption</figcaption></figure>
14786 ###################
14788 # See https://www.mediawiki.org/wiki/Help:Images#Size_and_frame
14789 # and https://phabricator.wikimedia.org/T64258
14790 # Foobar has actual size of 1941x220
14791 # 1. Thumbs & frameless always reduce, can't be enlarged unless it's
14792 # a scalable format.
14793 # 2. Framed images always ignore size options; always render at default size.
14794 # 3. "Unspecified format" and border are the only types which can be
14798 Image: unspecified format and border enlarge
14800 parsoid=wt2html,wt2wt,html2html
14802 [[File:Foobar.jpg|2000px]]
14804 [[File:Foobar.jpg|border|2000px]]
14806 <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>
14807 </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>
14810 <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>
14811 <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>
14815 Image: "unspecified format" and border reduce
14817 parsoid=wt2html,wt2wt,html2html
14819 [[File:Foobar.jpg|1000px]]
14821 [[File:Foobar.jpg|border|1000px]]
14823 <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>
14824 </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>
14827 <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>
14828 <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>
14832 Image: thumbs reduce
14834 parsoid=wt2html,wt2wt,html2html
14836 [[File:Foobar.jpg|thumb|50px]]
14838 <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>
14841 <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>
14845 Image: bitmap thumbs can't be enlarged past original size, but vector can.
14847 parsoid=wt2html,wt2wt,html2html
14849 [[File:Foobar.jpg|thumb|2000px]]
14851 [[File:Foobar.svg|thumb|2000px]]
14853 <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>
14854 <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>
14857 <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>
14858 <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>
14862 Image: frameless can reduce in size
14864 parsoid=wt2html,wt2wt,html2html
14866 [[File:Foobar.jpg|frameless|50px]]
14868 <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>
14871 <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>
14875 Image: bitmap frameless can't be enlarged past original size, but vector can
14877 parsoid=wt2html,wt2wt,html2html
14879 [[File:Foobar.jpg|frameless|2000px]]
14881 [[File:Foobar.svg|frameless|2000px]]
14883 <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>
14884 </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>
14887 <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>
14888 <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>
14892 Image: framed images are always unscaled.
14894 parsoid=wt2html,wt2wt,html2html
14896 [[File:Foobar.jpg|frame]]
14898 [[File:Foobar.jpg|frame|50px]]
14900 [[File:Foobar.jpg|frame|50x50px]]
14902 [[File:Foobar.jpg|frame|2000px]]
14904 <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>
14905 <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>
14906 <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>
14907 <div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption"></div></div></div>
14910 <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>
14911 <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>
14912 <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>
14913 <figure typeof="mw:Image/Frame"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/3/3a/Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="220" width="1941"/></a></figure>
14916 ###################
14919 Link to image page- image page normally doesn't exists, hence edit link
14920 Add test with existing image page
14921 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
14925 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
14930 T20784 Link to non-existent image page with caption should use caption as link text
14932 [[:Image:test|caption]]
14934 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
14939 Frameless image caption with a free URL
14941 [[File:Foobar.jpg|http://example.com]]
14943 <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>
14946 <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>
14950 Thumbnail image caption with a free URL
14954 [[File:Foobar.jpg|thumb|http://example.com]]
14956 <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>
14959 <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" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
14963 Thumbnail image caption with a free URL and explicit alt
14966 parsoid=wt2html,wt2wt,html2html
14968 [[File:Foobar.jpg|thumb|http://example.com|alt=Alteration]]
14970 <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>
14973 <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" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
14977 SVG thumbnails with no language set
14980 [[File:Foobar.svg|thumb|caption]]
14982 <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>
14985 <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>
14989 SVG thumbnails with language de
14991 parsoid=wt2html,wt2wt,html2html
14993 [[File:Foobar.svg|thumb|caption|lang=de]]
14995 <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>
14998 <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>
15002 SVG thumbnails with invalid language code
15004 parsoid=wt2html,wt2wt,html2html
15006 [[File:Foobar.svg|thumb|caption|lang=invalid:language:code]]
15008 <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>
15011 <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>
15015 T3887: A ISBN with a thumbnail
15017 [[File:Foobar.jpg|thumb|ISBN 1235467890]]
15019 <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>
15022 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption><a href="./Special:BookSources/1235467890" rel="mw:WikiLink">ISBN 1235467890</a></figcaption></figure>
15026 T3887: A RFC with a thumbnail
15028 [[File:Foobar.jpg|thumb|This is RFC 12354]]
15030 <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>
15033 <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" class="external text">RFC 12354</a></figcaption></figure>
15037 T3887: A mailto link with a thumbnail
15039 [[File:Foobar.jpg|thumb|Please mailto:nobody@example.com]]
15041 <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>
15044 <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" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></figcaption></figure>
15047 # Pending resolution to T2368
15049 T2648: Frameless image caption with a link
15051 [[File:Foobar.jpg|text with a [[link]] in it]]
15053 <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>
15056 <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>
15060 T2648: Frameless image caption with a link (suffix)
15062 [[File:Foobar.jpg|text with a [[link]]foo in it]]
15064 <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>
15067 <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>
15071 T2648: Frameless image caption with an interwiki link
15073 [[File:Foobar.jpg|text with a [[MeatBall:Link]] in it]]
15075 <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>
15078 <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>
15082 T2648: Frameless image caption with a piped interwiki link
15084 [[File:Foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
15086 <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>
15089 <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>
15093 T107474: Frameless image caption with <nowiki>
15095 [[File:Foobar.jpg|<nowiki>text with a [[MeatBall:Link|link]] in it</nowiki>]]
15097 <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>
15101 Escape HTML special chars in image alt text
15103 [[File:Foobar.jpg|& < > "]]
15105 <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>
15108 <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>
15112 Escape HTML special chars in image alt text with LanguageConverter
15116 [[File:Foobar.jpg|& < > "]]
15118 <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>
15121 <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>
15125 Entities in file name and attributes
15127 [[File:7%25 solution.gif|manualthumb=7%25 solution.gif|link=7%25 solution|[[7%25 solution]]]]
15129 <p><a href="/index.php?title=Special:Upload&wpDestFile=7%25_solution.gif" class="new" title="File:7% solution.gif">7% solution</a>
15132 <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>
15136 T2499: Alt text should have Ӓ, not &1234;
15138 [[File:Foobar.jpg|♀]]
15140 <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>
15143 <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>
15147 Broken image caption with link
15149 parsoid=wt2html,wt2wt,html2html
15151 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
15153 <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.
15156 <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>
15160 Image caption containing another image
15162 [[File:Foobar.jpg|thumb|This is a caption with another [[File:Thumb.png|image]] inside it!]]
15164 <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>
15167 <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>
15171 Image: caption containing a newline
15173 [[File:Foobar.jpg|This
15176 <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>
15179 <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>
15183 Image: caption containing leading space
15184 (The leading space should not trigger nowiki escaping in wt2wt mode)
15186 [[File:Foobar.jpg|thumb| bar]]
15188 <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>
15191 <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>
15194 # html/php output not have newlines after table, td, th, etc. because
15195 # Linker::makeThumbLink2() replaces the newlines with spaces since
15196 # the table is inside a caption.
15197 # FIXME: Verify if that circa 2004 fix is still required.
15199 Image: caption containing a table
15201 parsoid=wt2html,wt2wt,html2html
15203 [[Image:Foobar.jpg|thumb|200px|This is an example image thumbnail caption with a table
15209 and some more text.]]
15211 <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>
15214 <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
15217 <tr><th>Foo</th><th>Bar</th></tr>
15220 <td>Bar1</td></tr></tbody></table>and some more text.</figcaption></figure>
15224 T5090: External links other than http: in image captions
15226 [[File:Foobar.jpg|thumb|200x200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
15228 <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>
15231 <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" class="external text" href="irc://example.net">irc</a> and <a rel="mw:ExtLink" class="external text" href="https://example.com">Secure</a> ext links in it.</figcaption></figure>
15237 parsoid=wt2html,wt2wt,html2html
15239 [[Image:foobar.jpg|a|class=b]]
15241 <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>
15244 <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>
15248 Localized image handling (1).
15250 parsoid=wt2html,wt2wt,html2html
15253 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
15255 <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>
15258 <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>
15262 Localized image handling (2).
15265 parsoid=wt2html,wt2wt,html2html
15268 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
15270 <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>
15273 <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>
15277 Localized image handling (3).
15282 <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>
15284 [[File:Foobar.jpg|بندانگشتی]]
15288 "border", "frameless" and "class" attributes on an image.
15291 parsoid=wt2html,wt2wt,html2html
15293 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
15295 <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>
15298 <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>
15301 # Note that 'right' is the default alignment, despite the misspelled 'righ' below
15303 Invalid image attributes (T64500)
15306 parsoid=wt2html,wt2wt,html2html
15308 [[File:Foobar.jpg|thumb|float|left|caption]]
15310 [[File:Foobar.jpg|thumb|righ|caption]]
15312 [[File:Foobar.jpg|bogus1|thumb|bogus2|left|bogus3|caption]]
15314 <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>
15315 <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>
15316 <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>
15319 <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>
15320 <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>
15321 <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>
15327 #REDIRECT [[File:Barfoo.jpg]]
15330 # FIXME: Parsoid should run this test -- but we'd need to teach the
15331 # mockAPI about the redirected Barfoo.jpg image.
15335 [[Image:Barfoo.jpg]]
15337 <p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
15342 Missing image with uploads disabled
15346 [[File:Foobaz.jpg]]
15348 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
15351 <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>
15354 # Parsoid-specific testing for images
15355 # https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Images
15356 # Currently imperfect due to a flaw in the Parsoid testrunner
15358 # THESE TESTS SHOULD BE MOVED UP and merged with the php-specific
15362 Parsoid-specific image handling - simple image with size and middle alignment
15364 [[File:Foobar.jpg|middle|50px]]
15366 <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>
15370 Parsoid-specific image handling - simple image with size, middle alignment,
15371 non-standard namespace alias
15373 parsoid=wt2wt,wt2html,html2html
15375 [[Image:Foobar.jpg|middle|50px]]
15377 <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>
15381 Parsoid-specific image handling - simple image with size and middle alignment
15384 [[File:Foobar.jpg|50px|middle]]
15386 <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>
15390 Parsoid-specific image handling - simple image with size and middle alignment
15391 and non-standard namespace name
15393 parsoid=wt2html,wt2wt,html2html
15395 [[Image:Foobar.jpg|50px|middle]]
15397 <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>
15401 Parsoid-specific image handling - simple image with both sizes, a baseline alignment, and a caption
15403 [[File:Foobar.jpg|500x10px|baseline|caption]]
15405 <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>
15409 Parsoid-specific image handling - simple image with border and size spec
15411 [[File:Foobar.jpg|50px|border|caption]]
15413 <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>
15417 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15419 [[File:Foobar.jpg|left|baseline|thumb|caption content]]
15421 <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>
15425 Parsoid-specific image handling - thumbnail with halign, valign, and caption
15428 [[File:Foobar.jpg|thumb|left|baseline|caption content]]
15430 <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>
15434 Parsoid-specific image handling - thumbnail with specific size, halign, valign, and caption
15436 [[Image:Foobar.jpg|right|middle|thumb|50x50px|caption]]
15438 <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>
15442 Parsoid-specific image handling - thumbnail with specific size, halign,
15443 valign, and caption (existing content)
15445 [[File:Foobar.jpg|thumb|50x50px|right|middle|caption]]
15447 <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>
15451 Parsoid-specific image handling - framed image with specific size and caption
15454 parsoid=wt2html,wt2wt,html2html
15456 [[File:Foobar.jpg|frame|500x50px|caption]]
15458 <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>
15462 Parsoid-specific image handling - framed image with specific size, halign, valign, and caption
15465 parsoid=wt2html,wt2wt,html2html
15467 [[File:Foobar.jpg|left|baseline|frame|500x50px|caption]]
15469 <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>
15473 Parsoid-specific image handling - frameless image with specific size, border, and caption
15475 [[File:Foobar.jpg|frameless|442x50px|border|caption]]
15477 <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>
15481 Parsoid-specific image handling - simple image with a formatted caption
15483 [[File:Foobar.jpg|<table><tr><td>a</td><td>b</td></tr><tr><td>c</td></tr></table>]]
15485 <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>
15489 Parsoid-specific image handling - caption with a template in it
15491 [[File:Foobar.jpg|thumb|200x23px|This caption has a {{echo|transclusion}} in it.]]
15493 <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>
15497 Parsoid-specific image handling - caption with unbalanced tags in it
15499 parsoid=wt2html,wt2wt,html2html
15502 [[File:Foobar.jpg|thumb|200x200px|This caption has a <center>unbalanced tag in it.]]
15506 <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>
15511 Parsoid-specific image handling - empty caption (1)
15513 parsoid=wt2html,wt2wt
15515 [[File:Foobar.jpg|thumb|]]
15517 <figure class="mw-default-size" typeof="mw:Image/Thumb"><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/220px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="25" width="220"/></a><figcaption></figcaption></figure>
15520 # empty captions don't get serialized unless we're in the "round trip" case
15522 Parsoid-specific image handling - empty caption (2)
15526 <figure class="mw-default-size" typeof="mw:Image/Thumb">
15527 <a href="./File:Foobar.jpg">
15528 <img resource="./File:Foobar.jpg"
15529 src="//example.com/images/3/3a/Foobar.jpg"
15530 data-file-width="1941" data-file-height="220" data-file-type="bitmap"
15531 height="25" width="220"/>
15533 <figcaption></figcaption>
15536 [[File:Foobar.jpg|thumb]]
15540 Parsoid-specific image handling - whitespace caption
15542 [[File:Foobar.jpg|thumb| ]]
15544 <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>
15548 Parsoid-specific image handling - lang option
15551 [[File:Foobar.svg|lang=de|caption]]
15555 <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>
15559 ## Edge case bugs in Parsoid from T93580
15561 T93580: 1. Templated <ref> inside block images
15563 [[File:Foobar.jpg|thumb|Caption with templated ref: {{echo|<ref>foo</ref>}}]]
15567 <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: <sup 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></sup></figcaption></figure>
15569 <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>
15573 T93580: 2. <ref> inside inline images
15575 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: <ref>foo</ref>]]
15579 <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: <sup 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></sup>"}'><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>
15581 <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>
15585 T93580: 3. Templated <ref> inside inline images
15587 [[File:Foobar.jpg|Undisplayed caption in inline image with ref: {{echo|<ref>{{echo|foo}}</ref>}}]]
15591 <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: <sup 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></sup>"}'><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>
15593 <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>
15600 Subpage test/subpage
15608 subpage title=[[Subpage test]]
15612 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
15617 Subpage noslash link
15619 subpage title=[[Subpage test]]
15623 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
15628 Subpage test/1/2/subpage
15634 Relative subpage noslash link
15636 parsoid=wt2wt,wt2html,html2html
15637 subpage title=[[Subpage test/1/2/3/4]]
15643 <p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a>
15644 </p><p><a href="/wiki/Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage test/1/2/subpage</a>
15647 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">subpage</a></p>
15648 <p><a rel="mw:WikiLink" href="./Subpage_test/1/2/subpage" title="Subpage test/1/2/subpage">Subpage_test/1/2/subpage</a></p>
15652 Parsoid: dot-slash prefixed wikilinks
15662 </p><p>[[././baz/]]
15667 </p><p>[[././baz/]]
15672 Render invalid page names as plain text (T53090)
15684 [[foo[http://example.com]xyz]]
15686 [[{{echo|./../foo}}|bar]]
15687 [[{{echo|foo/.}}|bar]]
15688 [[{{echo|foo/..}}|bar]]
15689 [[{{echo|foo~~~~bar}}]]
15690 [[{{echo|foo>bar}}]]
15691 [[{{echo|foo././bar}}]]
15692 [[{{echo|foo{bar}}]]
15693 [[{{echo|foo}bar}}]]
15694 [[{{echo|foo[bar}}]]
15695 [[{{echo|foo]bar}}]]
15696 [[{{echo|foo<bar}}]]
15698 <p>[[./../foo|bar]]
15708 [[foo<a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>xyz]]
15709 </p><p>[[./../foo|bar]]
15722 <p>[[./../foo|bar]]
15732 [[foo<a rel="mw:ExtLink" class="external autonumber" href="http://example.com"></a>xyz]]</p>
15734 <p>[[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"./../foo"}},"i":0}}]}'>./../foo</span>|bar]]
15735 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/."}},"i":0}}]}'>foo/.</span>|bar]]
15736 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo/.."}},"i":0}}]}'>foo/..</span>|bar]]
15737 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo~~~~bar"}},"i":0}}]}'>foo~~~~bar</span>]]
15738 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo>bar"}},"i":0}}]}'>foo>bar</span>]]
15739 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo././bar"}},"i":0}}]}'>foo././bar</span>]]
15740 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo{bar"}},"i":0}}]}'>foo{bar</span>]]
15741 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo}bar"}},"i":0}}]}'>foo}bar</span>]]
15742 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo[bar"}},"i":0}}]}'>foo[bar</span>]]
15743 [[<span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo]bar"}},"i":0}}]}'>foo]bar</span>]]
15744 [[<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>
15752 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
15757 T2561: {{/Subpage}}
15759 subpage title=[[Page]]
15763 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
15771 Category:MediaWiki User's Guide
15779 [[:Category:MediaWiki User's Guide]]
15781 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
15790 [[Category:MediaWiki User's Guide]]
15792 cat=MediaWiki_User's_Guide sort=
15794 <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"}}'/>
15798 PAGESINCATEGORY invalid title fatal (r33546 fix)
15800 {{PAGESINCATEGORY:<bogus>}}
15807 Category with different sort key
15811 [[Category:MediaWiki User's Guide|Foo]]
15813 cat=MediaWiki_User's_Guide sort=Foo
15815 <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"}}'/>
15819 Category with identical sort key
15823 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15825 cat=MediaWiki_User's_Guide sort=MediaWiki User's Guide
15827 <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"}}'/>
15831 Category with empty sort key
15836 [[Category:MediaWiki User's Guide|]]
15838 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
15842 Category with empty sort key and parentheses
15847 [[Category:Foo (bar)|]]
15849 [[Category:Foo (bar)|Foo]]
15853 Category with link tail
15858 123[[Category:Foo]]456
15860 123[[Category:Foo]]456
15864 Category with template
15869 [[Category:{{echo|Foo}}]]
15871 [[Category:{{echo|Foo}}]]
15875 Category with template in sort key
15880 [[Category:Foo|{{echo|Bar}}]]
15882 [[Category:Foo|{{echo|Bar}}]]
15886 Category with template in sort key and title
15891 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15893 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
15896 ## We used to, but no longer wt2wt this test since the default serializer
15897 ## will normalize all categories to serialize on their own line.
15898 ## This wikitext usage is going to be fairly uncommon in production and
15899 ## selser will take care of preserving formatting in those scenarios.
15901 Category / paragraph interactions
15905 Foo [[Category:Baz]] Bar
15907 Foo [[Category:Baz]]
15915 [[Category:Baz]] Bar
15928 {{echo|[[Category:Baz]]}}
15941 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15942 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15943 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15944 <p>Foo <link rel="mw:PageProp/Category" href="./Category:Baz"/> Bar</p>
15945 <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</p>
15946 <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}}]}'/>
15947 <link rel="mw:PageProp/Category" href="./Category:Baz"/>
15950 ## We used to, but no longer wt2wt this test since the default serializer
15951 ## will normalize all categories to serialize on their own line.
15952 ## This wikitext usage is going to be fairly uncommon in production and
15953 ## selser will take care of preserving formatting in those scenarios.
15955 ## The whitespace on the empty line is part of the test. Please do not delete
15957 1. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15963 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
15965 {{echo|[[Category:Foo]] and so should this!}}
15967 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
15972 <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of same paragraph (not an indent-pre)
15974 <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>
15977 ## Parsoid will not try to wt2wt this while preserving newlines because
15978 ## it suppresses excess newlines within list items -- and we don't want to
15979 ## introduce a special case just for categories, which is, in reality somewhat
15980 ## odd behavior -- categories are unlikely to be used in list items like this
15981 ## in top-level pages and are only likely to show up in template-generated
15982 ## list items where this RT-ing is a non-issue.
15984 ## The whitespace on the empty line is part of the test. Please do not delete
15986 2. Categories and newlines: All preceding newlines should be suppressed (courtesy T2087)
15992 [[Category:Foo]] and this should be part of the same list item
15995 {{echo|[[Category:Foo]] and this should be part of the same list item}}
15997 <ul><li>This and this should be part of the same list item</li>
15998 <li>So should this and this should be part of the same list item</li></ul>
16001 <li>This <link rel="mw:PageProp/Category" href="./Category:Foo"/> and this should be part of the same list item</li>
16002 <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>
16006 ## Newlines and categories that follow the last item of a list
16007 ## are treated differently because this (list followed by categories)
16008 ## is an extremely common pattern on wikis.
16010 3. Categories and newlines: newline suppression for last list item should RT properly
16023 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16025 <link rel="mw:PageProp/Category" href="./Category:Bar" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16026 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16030 4. Categories and newlines: newline suppression for last list item should RT properly
16038 <ul><li><ul><li><ul><li> b</li></ul></li></ul></li></ul></li></ul>
16040 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16043 ## only wt2html for this to make sure the algo only applies to the rightmost path
16045 5. Categories and newlines: migrateTrailingCategories dom pass should only run on the rightmost path of nested lists
16058 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/></li></ul></li>
16060 <ul><li> d</li></ul></li></ul>
16061 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
16064 ## We used to, but no longer wt2wt this test since the default serializer
16065 ## will normalize all categories to serialize on their own line.
16066 ## This wikitext usage is going to be fairly uncommon in production and
16067 ## selser will take care of preserving formatting in those scenarios.
16069 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
16073 * a [[Category:Foo]]
16075 <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>
16078 # This test also demonstrates because of newline+category tunneling
16079 # through the list hander, template wrapping doesn't expand to the
16080 # containing list when the list item swallows the category.
16082 7. Categories and newlines: migrateTrailingCategories dom pass should leave template content alone
16087 <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
16088 </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>
16092 8. Categories and newlines: migrateTrailingCategories dom pass should not get tripped by intervening templates
16096 {{echo|[[Category:Foo]]
16100 <ul><li> a</li></ul>
16102 <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">
16103 </span><link rel="mw:PageProp/Category" href="./Category:Bar" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Bar"},"sa":{"href":"Category:Bar"}}'/>
16104 <link rel="mw:PageProp/Category" href="./Category:Baz" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:Baz"}}'/>
16108 9. Categories and newlines: should behave properly with linkprefix (T87753)
16123 <link rel="mw:PageProp/Category" href="./تصنيف:Foo"/>
16124 <link rel="mw:PageProp/Category" href="./تصنيف:Bar"/>
16128 10. No regressions on internal links following category (T174639)
16130 parsoid=wt2html,html2html
16132 [[Category:Foo]]<div>a
16137 <a href="/wiki/Foo" title="Foo">Foo</a></div>
16140 <link rel="mw:PageProp/Category" href="./Category:Foo"/><div>a
16142 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></div>
16145 # Note that Parsoid differs slightly from PHP due to T175421
16147 11. Special case where only newlines separate links (T175416)
16149 parsoid=wt2html,html2html
16153 [[Foo]][[es:Alimento]]
16158 <a href="/wiki/Foo" title="Foo">Foo</a>
16159 </p><p><a href="/wiki/Foo" title="Foo">Foo</a>
16162 <link rel="mw:PageProp/Category" href="./Category:Foo"/>
16164 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p><link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16166 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a></p>
16170 Category links with multiple namespaces
16172 [[Category:Project:Foo]]
16174 <link rel="mw:PageProp/Category" href="./Category:Project:Foo" />
16178 Parsoid: Serialize link to category page with colon escape
16184 [[:Category:Foo|Bar]]
16187 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Category:Foo</a>
16188 <a rel="mw:WikiLink" href="./Category:Foo" title="Category:Foo">Bar</a>
16192 # We used to, but no longer wt2wt this test since the default serializer
16193 # will normalize all categories to serialize on their own line.
16194 # This wikitext usage is going to be fairly uncommon in production and
16195 # selser will take care of preventing whitespace insertion if this
16196 # occurs in an article.
16198 # html2html disabled for the same reason (whitespace insertion between
16201 # html2wt disabled because it localizes the "Category" namespace.
16203 Link prefix/suffixes aren't applied to category links
16213 <p>x<link rel="mw:PageProp/Category" href="./Flokkur:Foo" data-parsoid=""/>y</p>
16217 Link prefix/suffixes aren't applied to language links
16227 <p>x<link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo" data-parsoid=""/>y</p>
16231 Parsoid: Serialize link to file page with colon escape
16237 [[:File:Foo.png|Bar]]
16240 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">File:Foo.png</a>
16241 <a rel="mw:WikiLink" href="./File:Foo.png" title="File:Foo.png">Bar</a>
16246 Parsoid: Serialize a genuine category link without colon escape
16251 [[Category:Foo|Bar]]
16253 <link rel="mw:PageProp/Category" href="./Category:Foo">
16254 <link rel="mw:PageProp/Category" href="./Category:Foo#Bar">
16258 Normalize hrefs properly before testing for invalid link targets (T72894)
16262 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne"/>
16264 [[Category:Toxine bactérienne]]
16268 Parsoid: Defaultsort
16270 {{DEFAULTSORT:Foo}}
16272 <meta property="mw:PageProp/categorydefaultsort" content="Foo"/>
16275 # NOTE: mw:ExpandedAttrs is not the best typeof here. mw:Transclusion is better.
16276 # But, this is a limitation of our representation and is documented in
16277 # TemplateHandler.js in processSpecialMagicWord
16279 Parsoid: Defaultsort (template-generated)
16281 {{{{echo|DEFAULTSORT}}:Foo}}
16283 <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"}]]}'/>
16287 ### Inter-language links
16290 Interlanguage links
16298 es:Alimento fr:Nourriture zh:食品
16300 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Alimento"/>
16301 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/Nourriture"/>
16302 <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/食品"/>
16306 Duplicate interlanguage links (T26502)
16317 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/1"/>
16318 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/2"/>
16319 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/1"/>
16320 <link rel="mw:PageProp/Language" href="http://fr.wikipedia.org/wiki/2"/>
16327 Basic section headings
16334 ===Smaller headline===
16337 <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>
16340 <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>
16343 <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>
16349 Section headings with TOC
16352 ===Subheadline 1===
16353 =====Skipping a level=====
16354 ======Skipping a level======
16358 ===Another headline===
16360 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16362 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
16364 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
16366 <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>
16368 <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>
16375 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
16377 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
16383 <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>
16384 <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>
16385 <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>
16386 <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>
16387 <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>
16390 <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>
16395 TOC anchors don't collide
16403 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16405 <li class="toclevel-1 tocsection-1"><a href="#Headline_2"><span class="tocnumber">1</span> <span class="toctext">Headline 2</span></a></li>
16406 <li class="toclevel-1 tocsection-2"><a href="#Headline"><span class="tocnumber">2</span> <span class="toctext">Headline</span></a></li>
16407 <li class="toclevel-1 tocsection-3"><a href="#Headline_2_2"><span class="tocnumber">3</span> <span class="toctext">Headline 2</span></a></li>
16408 <li class="toclevel-1 tocsection-4"><a href="#Headline_3"><span class="tocnumber">4</span> <span class="toctext">Headline</span></a></li>
16412 <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>
16413 <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>
16414 <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>
16415 <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>
16419 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
16420 # Parsoid html2wt direction adds <nowiki> for level 7 and up.
16422 Handling of sections up to level 6 and beyond
16427 ==Level 2 Heading==
16428 ===Level 3 Heading===
16429 ====Level 4 Heading====
16430 =====Level 5 Heading=====
16431 ======Level 6 Heading======
16432 =======Level 7 Heading=======
16433 ========Level 8 Heading========
16434 =========Level 9 Heading=========
16435 ==========Level 10 Heading==========
16437 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16439 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
16441 <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>
16443 <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>
16445 <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>
16447 <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>
16449 <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>
16450 <li class="toclevel-6 tocsection-7"><a href="#.3DLevel_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">=Level 7 Heading=</span></a></li>
16451 <li class="toclevel-6 tocsection-8"><a href="#.3D.3DLevel_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">==Level 8 Heading==</span></a></li>
16452 <li class="toclevel-6 tocsection-9"><a href="#.3D.3D.3DLevel_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">===Level 9 Heading===</span></a></li>
16453 <li class="toclevel-6 tocsection-10"><a href="#.3D.3D.3D.3DLevel_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>
16467 <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>
16468 <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>
16469 <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>
16470 <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>
16471 <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>
16472 <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>
16473 <h6><span class="mw-headline" id=".3DLevel_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>
16474 <h6><span class="mw-headline" id=".3D.3DLevel_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>
16475 <h6><span class="mw-headline" id=".3D.3D.3DLevel_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>
16476 <h6><span class="mw-headline" id=".3D.3D.3D.3DLevel_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>
16479 <h1 id="Level_1_Heading" data-parsoid='{}'>Level 1 Heading</h1>
16480 <h2 id="Level_2_Heading" data-parsoid='{}'>Level 2 Heading</h2>
16481 <h3 id="Level_3_Heading" data-parsoid='{}'>Level 3 Heading</h3>
16482 <h4 id="Level_4_Heading" data-parsoid='{}'>Level 4 Heading</h4>
16483 <h5 id="Level_5_Heading" data-parsoid='{}'>Level 5 Heading</h5>
16484 <h6 id="Level_6_Heading" data-parsoid='{}'>Level 6 Heading</h6>
16485 <h6 id="=Level_7_Heading=" data-parsoid='{}'><span id=".3D_Level_7_Heading.3D" typeof="mw:FallbackId"></span>=Level 7 Heading=</h6>
16486 <h6 id="==Level_8_Heading==" data-parsoid='{}'><span id=".3D.3D_Level_8_Heading.3D.3D" typeof="mw:FallbackId"></span>==Level 8 Heading==</h6>
16487 <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>
16488 <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>
16492 TOC regression (T11764)
16496 ====title 1.1.1====
16501 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16503 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16505 <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>
16507 <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>
16510 <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>
16513 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16515 <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>
16521 <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>
16522 <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>
16523 <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>
16524 <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>
16525 <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>
16526 <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>
16531 TOC for heading containing <span id="..."></span> (T96153)
16534 ==<span id="old-anchor"></span>New title==
16536 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16538 <li class="toclevel-1 tocsection-1"><a href="#New_title"><span class="tocnumber">1</span> <span class="toctext">New title</span></a></li>
16542 <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>
16547 TOC with wgMaxTocLevel=3 (T8204)
16553 ====title 1.1.1====
16558 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16560 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16562 <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>
16563 <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>
16566 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
16568 <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>
16574 <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>
16575 <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>
16576 <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>
16577 <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>
16578 <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>
16579 <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>
16584 TOC with wgMaxTocLevel=3 and two level four headings (T8204)
16590 ====Section 1.1.1====
16591 ====Section 1.1.1.1====
16594 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16596 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
16598 <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>
16601 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
16605 <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>
16606 <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>
16607 <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>
16608 <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>
16609 <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>
16615 Resolving duplicate section names
16620 <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>
16621 <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>
16626 Resolving duplicate section names with differing case (T12721)
16631 <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>
16632 <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>
16644 Template with sections, __NOTOC__
16651 <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>
16652 <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>
16653 <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>
16654 <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>
16659 __NOEDITSECTION__ keyword
16665 <h2><span class="mw-headline" id="Section_1">Section 1</span></h2>
16666 <h2><span class="mw-headline" id="Section_2">Section 2</span></h2>
16671 Link inside a section heading
16673 ==Section with a [[Main Page|link]] in it==
16675 <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>
16680 TOC regression (T14077)
16687 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16689 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
16691 <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>
16694 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
16698 <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>
16699 <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>
16700 <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>
16705 T3219 URL next to image (good)
16707 http://example.com [[File:Foobar.jpg]]
16709 <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>
16712 <p><a rel="mw:ExtLink" class="external free" 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>
16715 # Parsoid doesn't wt2wt this cleanly because it adds <nowiki>s.
16717 Short headings with trailing space should match behavior of Parser::doHeadings (T21910)
16719 parsoid=wt2html,html2html
16722 The line above must have a trailing space!
16725 But just in case it doesn't...
16727 <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>
16728 <p>The line above must have a trailing space!
16730 <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>
16731 <p>But just in case it doesn't...
16734 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
16735 <p>The line above must have a trailing space!</p>
16736 <h1 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h1> <!--
16738 <p>But just in case it doesn't...</p>
16742 Header with special characters (T27462)
16744 The tooltips shall not show entities to the user (ie. be double escaped)
16761 <p>The tooltips shall not show entities to the user (ie. be double escaped)
16763 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16765 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
16766 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
16767 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
16768 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
16769 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
16773 <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>
16776 <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>
16779 <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>
16782 <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>
16785 <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>
16789 <p>The tooltips shall not show entities to the user (ie. be double escaped)</p>
16791 <h2 id="text_>_text"><span id="text_.3E_text" typeof="mw:FallbackId"></span>text > text</h2>
16794 <h2 id="text_<_text"><span id="text_.3C_text" typeof="mw:FallbackId"></span>text < text</h2>
16797 <h2 id="text_&_text"><span id="text_.26_text" typeof="mw:FallbackId"></span>text & text</h2>
16800 <h2 id="text_'_text"><span id="text_.27_text" typeof="mw:FallbackId"></span>text ' text</h2>
16803 <h2 id='text_"_text'><span id="text_.22_text" typeof="mw:FallbackId"></span>text " text</h2>
16808 Header with space, plus and underscore as entity
16810 Id should not contain + for spaces
16812 ==Space between Text==
16815 ==Space-Entity between Text==
16818 ==Plus+between+Text==
16821 ==Plus-Entity+between+Text==
16824 ==Underscore_between_Text==
16827 ==Underscore-Entity_between_Text==
16830 [[#Space between Text]]
16831 [[#Space-Entity between Text]]
16832 [[#Plus+between+Text]]
16833 [[#Plus-Entity+between+Text]]
16834 [[#Underscore_between_Text]]
16835 [[#Underscore-Entity_between_Text]]
16837 <p>Id should not contain + for spaces
16839 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16841 <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>
16842 <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>
16843 <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>
16844 <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>
16845 <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>
16846 <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>
16850 <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>
16853 <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>
16856 <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>
16859 <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>
16862 <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>
16865 <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>
16867 </p><p><a href="#Space_between_Text">#Space between Text</a>
16868 <a href="#Space-Entity_between_Text">#Space-Entity between Text</a>
16869 <a href="#Plus.2Bbetween.2BText">#Plus+between+Text</a>
16870 <a href="#Plus-Entity.2Bbetween.2BText">#Plus-Entity+between+Text</a>
16871 <a href="#Underscore_between_Text">#Underscore_between_Text</a>
16872 <a href="#Underscore-Entity_between_Text">#Underscore-Entity_between_Text</a>
16875 <p>Id should not contain + for spaces</p>
16877 <h2 id="Space_between_Text">Space between Text</h2>
16880 <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>
16883 <h2 id="Plus+between+Text"><span id="Plus.2Bbetween.2BText" typeof="mw:FallbackId"></span>Plus+between+Text</h2>
16886 <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>
16889 <h2 id="Underscore_between_Text">Underscore_between_Text</h2>
16892 <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>
16895 <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>
16896 <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>
16897 <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>
16898 <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>
16899 <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>
16900 <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>
16903 # Parsoid html2wt disabled because it adds padding spaces around =
16905 Headers with excess '=' characters
16906 (Are similar tests necessary beyond the 1st level?)
16908 parsoid=wt2html,wt2wt,html2html
16912 =''italic'' heading==
16913 ==''italic'' heading=
16915 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16917 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
16918 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
16919 <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>
16920 <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>
16924 <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>
16925 <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>
16926 <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>
16927 <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>
16930 <h1 id="foo="><span id="foo.3D" typeof="mw:FallbackId"></span>foo=</h1>
16931 <h1 id="=foo"><span id=".3Dfoo" typeof="mw:FallbackId"></span>=foo</h1>
16932 <h1 id="italic_heading="><span id="italic_heading.3D" typeof="mw:FallbackId"></span><i>italic</i> heading=</h1>
16933 <h1 id="=italic_heading"><span id=".3Ditalic_heading" typeof="mw:FallbackId"></span>=<i>italic</i> heading</h1>
16937 HTML headers vs TOC (T25393)
16938 (__NOEDITSECTION__ for clearer output, doesn't matter here)
16950 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
16952 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
16954 <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>
16955 <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>
16958 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
16960 <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>
16961 <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>
16967 <h1><span class="mw-headline" id="Header_1">Header 1</span></h1>
16968 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
16969 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
16970 <h1><span class="mw-headline" id="Header_2">Header 2</span></h1>
16971 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
16972 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
16975 <h1 id="Header_1" data-parsoid='{"stx":"html"}'>Header 1</h1>
16976 <h2 id="Header_1.1" data-parsoid='{}'>Header 1.1</h2>
16977 <h2 id="Header_1.2" data-parsoid='{}'>Header 1.2</h2>
16979 <h1 id="Header_2" data-parsoid='{"stx":"html"}'>Header 2
16981 <h2 id="Header_2.1" data-parsoid='{}'>Header 2.1</h2>
16982 <h2 id="Header_2.2" data-parsoid='{}'>Header 2.2</h2>
16983 <meta property="mw:PageProp/noeditsection"/>
16987 Single-line or multiline-comments can follow headings
16989 parsoid=wt2html,wt2wt
16997 <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>
16998 <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>
16999 <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>
17002 <h2 id="foo">foo</h2><!---->
17003 <h2 id="bar">bar</h2><!--c1-->
17004 <h2 id="baz">baz</h2><!--
17010 T3219 URL next to image (broken)
17012 http://example.com[[File:Foobar.jpg]]
17014 <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>
17017 <p><a rel="mw:ExtLink" class="external free" 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>
17021 T3186 news: in the middle of text
17023 http://en.wikinews.org/wiki/Wikinews:Workplace
17025 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
17031 Namespaced link must have a title
17040 Namespaced link must have a title (bad fragment version)
17042 [[Project:#fragment]]
17044 <p>[[Project:#fragment]]
17050 ### HTML tags and HTML attributes
17054 div with no attributes
17056 <div>HTML rocks</div>
17058 <div>HTML rocks</div>
17063 div with double-quoted attribute
17065 <div id="rock">HTML rocks</div>
17067 <div id="rock">HTML rocks</div>
17072 div with single-quoted attribute
17074 <div id='rock'>HTML rocks</div>
17076 <div id="rock">HTML rocks</div>
17081 div with unquoted attribute
17083 <div id=rock>HTML rocks</div>
17085 <div id="rock">HTML rocks</div>
17090 div with illegal double attributes
17092 <div id="a" id="b">HTML rocks</div>
17094 <div id="b">HTML rocks</div>
17099 div with empty attribute value, space before equals
17101 parsoid=wt2html,html2html
17103 <div class =>HTML rocks</div>
17105 <div class="">HTML rocks</div>
17108 <div class="" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17112 div with multiple empty attribute values
17114 wgFragmentMode=[ 'html5', 'legacy' ]
17116 parsoid=wt2html,html2html
17118 <div id= title=>HTML rocks</div>
17120 <div id="title=">HTML rocks</div>
17123 <div id="title=" data-parsoid='{"stx":"html"}'>HTML rocks</div>
17126 # FIXME Parsoid doesn't actually match PHP here.
17127 # Probably we should use the synthetic <foo /> or <indicator>
17128 # extensions for this test, which are enabled when running parser tests.
17130 Extension tag in attribute value
17132 <span title="<translate>123</translate>">ok</span>
17133 !! html/php+disabled
17134 <p><span title="<translate>123</translate>">ok</span>
17137 <p><span title="123" about="#mwt4" typeof="mw:ExpandedAttrs" data-parsoid='{"stx":"html","a":{"title":"123"},"sa":{"title":"<translate>123</translate>"}}' data-mw='{"attribs":[[{"txt":"title"},{"html":"<translate typeof=\"mw:Extension/translate\" about=\"#mwt3\" data-parsoid='{\"dsr\":[13,39,2,2]}' data-mw='{\"name\":\"translate\",\"attrs\":{},\"body\":{\"extsrc\":\"123\"}}'>123</translate>"}]]}'>ok</span></p>
17141 table with multiple empty attribute values
17143 parsoid=wt2html,html2html
17149 <table title="id=">
17155 <table title="id=">
17156 <tbody><tr><td>hi</td></tr>
17161 div with braces in attribute value
17163 <div title="{}">Foo</div>
17165 <div title="{}">Foo</div>
17168 <div title="{}">Foo</div>
17172 div with empty attribute value, no space before equals
17174 parsoid=wt2html,html2html
17176 <div class=>HTML rocks</div>
17178 <div class="">HTML rocks</div>
17181 <div class="">HTML rocks</div>
17185 HTML multiple attributes correction
17187 <p class="error" class="awesome">Awesome!</p>
17189 <p class="awesome">Awesome!</p>
17194 Table multiple attributes correction
17197 !+ class="error" class="awesome"|status
17202 <th class="awesome">status
17210 <DIV ID="x">HTML ROCKS</DIV>
17212 <div id="x">HTML ROCKS</div>
17217 Non-ASCII pseudo-tags are rendered as text
17226 Pseudo-tag with URL 'name' renders as url link
17228 <http://example.com/>
17230 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
17235 text with amp in the middle of nowhere
17239 <p>Remember AT&T?
17244 text with character entity: eacute
17246 I always thought é was a cute letter.
17248 <p>I always thought é was a cute letter.
17253 text with entity-escaped character entity-like string: eacute
17255 I always thought &eacute; was a cute letter.
17257 <p>I always thought &eacute; was a cute letter.
17262 text with undefined character entity: xacute
17264 I always thought &xacute; was a cute letter.
17266 <p>I always thought &xacute; was a cute letter.
17273 <data value="5">five</data>
17274 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17275 <mark>This highlighted text</mark>
17277 <p><data value="5">five</data>
17278 <time datetime="2000-01-01T00:00Z">The new millenium started</time>
17279 <mark>This highlighted text</mark>
17284 HTML tag with leading space is parsed as text
17288 <p>< div>foo< /div>
17292 ## Don't expect Parsoid and PHP to match, since PHP isn't exactly following
17293 ## the HTML5 parsing spec.
17295 Element with broken attribute syntax
17299 <div style=" style="123">hi</div>
17302 <div style="123">hi</div>
17306 <div style=" style=" data-parsoid='{"stx":"html","a":{"123\"":null},"sa":{"123\"":""}}'>hi</div>
17307 <div data-parsoid='{"stx":"html","a":{"=":null},"sa":{"=":""}}'>ho</div>
17311 ### Nesting tests (see T43545, T52604, T53081)
17314 # This test case is fixed in Parsoid by domino 1.0.12. (T52604)
17315 # Note that html2wt is considerably more difficult if we use <b> in
17316 # the test case, instead of <small>
17318 Ensure that HTML adoption agency algorithm is properly implemented.
17320 <small>X<small>Y</small>Z</small>
17322 <p><small>X<small>Y</small>Z</small>
17326 # This was T43545 in the PHP parser.
17330 <kbd>X<kbd>Y</kbd>Z</kbd>
17332 <p><kbd>X<kbd>Y</kbd>Z</kbd>
17336 # The following cases were T53081 in the PHP parser.
17337 # Note that there are some other nestable tags (b, i, etc) which are
17338 # not covered; see T53081 for discussion.
17343 <em>X<em>Y</em>Z</em>
17345 <p><em>X<em>Y</em>Z</em>
17350 Nesting of <strong>
17352 <strong>X<strong>Y</strong>Z</strong>
17354 <p><strong>X<strong>Y</strong>Z</strong>
17363 <p><q>X<q>Y</q>Z</q>
17370 <ruby>X<ruby>Y</ruby>Z</ruby>
17372 <p><ruby>X<ruby>Y</ruby>Z</ruby>
17379 <bdo>X<bdo>Y</bdo>Z</bdo>
17381 <p><bdo>X<bdo>Y</bdo>Z</bdo>
17393 [[Media:Foobar.jpg]]
17394 [[Media:Video.ogv]]
17395 [[:Media:Video.ogv]]
17397 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
17398 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17399 <a href="http://example.com/images/0/00/Video.ogv" class="internal" title="Video.ogv">Media:Video.ogv</a>
17402 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">Media:Foobar.jpg</a>
17403 <a rel="mw:MediaLink" href="//example.com/images/0/00/Video.ogv" title="Video.ogv">Media:Video.ogv</a>
17404 <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>
17408 Media link with text
17410 [[Media:Foobar.jpg|A neat file to look at]]
17412 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
17415 <p><a rel="mw:MediaLink" href="//example.com/images/3/3a/Foobar.jpg" title="Foobar.jpg">A neat file to look at</a></p>
17418 # FIXME: this is still bad HTML tag nesting
17419 # FIXME: doBlockLevels won't wrap this in a paragraph because it contains a div
17420 # Parsoid & Remex fix the p-wrapping since they operate on the DOM.
17422 Media link with nasty text
17424 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
17426 <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>
17429 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link</a></p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg"><div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
17431 <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>
17436 Media link to nonexistent file (T3702)
17438 [[Media:No such.jpg]]
17439 [[Media:No_such file.jpg]]
17441 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
17442 <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>
17445 <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>
17446 <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>
17450 Image link to nonexistent file (T3850 - good)
17452 [[File:No_such.jpg]]
17454 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
17457 <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>
17461 :Image link to nonexistent file (T3850 - bad)
17463 [[:Image:No such.jpg]]
17465 <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>
17468 <p><a rel="mw:WikiLink" href="./File:No_such.jpg" title="File:No such.jpg">Image:No such.jpg</a></p>
17472 Character reference normalization in link text (T3938)
17474 [[Main Page|this&that]]
17476 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
17483 Test for unicode normalization
17485 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
17489 (T21451) Links should refer to the normalized form.
17497 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17498 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17499 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17500 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17501 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
17506 Empty attribute crash test (T4067)
17508 <font color="">foo</font>
17510 <p><font color="">foo</font>
17515 Empty attribute crash test single-quotes (T4067)
17517 <font color=''>foo</font>
17519 <p><font color="">foo</font>
17524 Attribute test: equals, then nothing
17526 parsoid=wt2html,html2html
17528 <font color=>foo</font>
17530 <p><font color="">foo</font>
17533 <p><font color="" data-parsoid='{"stx":"html"}'>foo</font></p>
17537 Attribute test: unquoted value
17539 parsoid=wt2html,html2html
17541 <font color=x>foo</font>
17543 <p><font color="x">foo</font>
17546 <p><font color="x" data-parsoid='{"stx":"html"}'>foo</font></p>
17550 Attribute test: unquoted but illegal value (hash)
17552 <font color=#x>foo</font>
17554 <p><font color="#x">foo</font>
17558 # Parsoid does not serialize to empty attribute syntax,
17559 # so wt2wt and html2wt cases are skipped
17561 Attribute test: no value (T54330)
17563 parsoid=wt2html,html2html
17565 <font color>foo</font>
17567 <p><font color="">foo</font>
17570 <p><font color="">foo</font></p>
17574 T4095: link with three closing brackets
17578 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
17581 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a>]</p>
17585 T4095: link with pipe and three closing brackets
17587 [[Main Page|link]]]
17589 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
17592 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">link</a>]</p>
17596 T4095: link with pipe and three closing brackets, version 2
17598 [[Main Page|[http://example.com/]]]
17600 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
17603 <p><a rel="mw:WikiLink" href="./Main_Page" title="Main Page">[http://example.com/]</a></p>
17612 Template:Dangerous attribute
17614 " onmouseover="alert(document.cookie)
17618 Template:Dangerous style attribute
17620 border-size: expression(alert(document.cookie))
17626 <div style="float: right; {{{1}}}">Magic div</div>
17630 T4304: HTML attribute safety (safe template; regression T4309)
17632 <div title="{{test}}"></div>
17634 <div title="This is a test template"></div>
17637 <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>
17640 # Parsoid has enough context to handle this case
17642 T4304: HTML attribute safety (dangerous template; 2309)
17644 <div title="{{dangerous attribute}}"></div>
17646 <div title=""></div>
17649 <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>
17653 T4304: HTML attribute safety (dangerous style template; 2309)
17655 <div style="{{dangerous style attribute}}"></div>
17657 <div style="/* insecure input */"></div>
17660 <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>
17664 T4304: HTML attribute safety (safe parameter; 2309)
17666 {{div style|width: 200px}}
17668 <div style="float: right; width: 200px">Magic div</div>
17671 <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>
17675 T4304: HTML attribute safety (unsafe parameter; 2309)
17677 {{div style|width: expression(alert(document.cookie))}}
17679 <div style="/* insecure input */">Magic div</div>
17682 <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>
17685 ## Parsoid output here differs; needs investigation.
17687 T4304: HTML attribute safety (unsafe breakout parameter; 2309)
17689 {{div style|"><script>alert(document.cookie)</script>}}
17691 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17695 ## Parsoid output here differs; needs investigation.
17697 T4304: HTML attribute safety (unsafe breakout parameter 2; 2309)
17699 {{div style|" ><script>alert(document.cookie)</script>}}
17701 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
17706 T4304: HTML attribute safety (link)
17708 <div title="[[Main Page]]"></div>
17710 <div title="[[Main Page]]"></div>
17713 <div title="[[Main Page]]"></div>
17717 T4304: HTML attribute safety (italics)
17719 <div title="''foobar''"></div>
17721 <div title="''foobar''"></div>
17726 T4304: HTML attribute safety (bold)
17728 <div title="'''foobar'''"></div>
17730 <div title="'''foobar'''"></div>
17735 T4304: HTML attribute safety (ISBN)
17737 <div title="ISBN 1234567890"></div>
17739 <div title="ISBN 1234567890"></div>
17744 T4304: HTML attribute safety (RFC)
17746 <div title="RFC 1234"></div>
17748 <div title="RFC 1234"></div>
17753 T4304: HTML attribute safety (PMID)
17755 <div title="PMID 1234567890"></div>
17757 <div title="PMID 1234567890"></div>
17762 T4304: HTML attribute safety (web link)
17764 <div title="http://example.com/"></div>
17766 <div title="http://example.com/"></div>
17771 T4304: HTML attribute safety (named web link)
17773 <div title="[http://example.com/ link]"></div>
17775 <div title="[http://example.com/ link]"></div>
17778 <div title="[http://example.com/ link]"></div>
17782 T5244: HTML attribute safety (extension; safe)
17784 <div style="<nowiki>background:blue</nowiki>"></div>
17786 <div style="background:blue"></div>
17789 <div style="background:blue" data-parsoid='{"stx":"html","a":{"style":"background:blue"},"sa":{"style":"<nowiki>background:blue</nowiki>"}}'></div>
17793 T5244: HTML attribute safety (extension; unsafe)
17795 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
17797 <div style="/* insecure input */"></div>
17800 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"<nowiki>border-left:expression(alert(document.cookie))</nowiki>"}}'></div>
17803 # More MSIE fun discovered by Tom Gilder
17806 MSIE CSS safety test: spurious slash
17808 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
17810 <div style="/* insecure input */">evil</div>
17813 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\rl(javascript:alert('boo'))"}}'>evil</div>
17817 MSIE CSS safety test: hex code
17819 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
17821 <div style="/* insecure input */">evil</div>
17824 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:u\\72l(javascript:alert('boo'))"}}'>evil</div>
17828 MSIE CSS safety test: comment in url
17830 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
17832 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
17835 <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>
17839 MSIE CSS safety test: comment in expression
17841 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
17843 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
17846 <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>
17850 CSS safety test (all browsers): vertical tab (T57332 / CVE-2013-4567)
17852 <p style="font-size: 100px; background-image:url\b(https://www.google.com/images/srpr/logo6w.png)">A</p>
17854 <p style="/* invalid control char */">A</p>
17857 <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>
17861 MSIE 6 CSS safety test: Fullwidth (T57332)
17863 <p style="font-size: 100px; color: expression((title='XSSed'),'red')">A</p>
17864 <div style="top:EXPRESSION(alert())">B</div>
17866 <p style="/* insecure input */">A</p>
17867 <div style="/* insecure input */">B</div>
17870 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expression((title='XSSed'),'red')"}}'>A</p>
17871 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"top:EXPRESSION(alert())"}}'>B</div>
17875 MSIE 6 CSS safety test: IPA extensions (T57332)
17877 <div style="background-image:uʀʟ(javascript:alert())">A</div>
17878 <p style="font-size: 100px; color: expʀessɪoɴ((title='XSSed'),'red')">B</p>
17880 <div style="/* insecure input */">A</div>
17881 <p style="/* insecure input */">B</p>
17884 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:uʀʟ(javascript:alert())"}}'>A</div>
17885 <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>
17889 MSIE 6 CSS safety test: sup/sub script (T57332)
17891 <div style="background-image:url⁽javascript:alert())">A</div>
17892 <div style="background-image:url₍javascript:alert())">B</div>
17893 <p style="font-size: 100px; color: expressioⁿ((title='XSSed'),'red')">C</p>
17895 <div style="/* insecure input */">A</div>
17896 <div style="/* insecure input */">B</div>
17897 <p style="/* insecure input */">C</p>
17900 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url⁽javascript:alert())"}}'>A</div>
17901 <div style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"background-image:url₍javascript:alert())"}}'>B</div>
17902 <p style="/* insecure input */" data-parsoid='{"stx":"html","a":{"style":"/* insecure input */"},"sa":{"style":"font-size: 100px; color: expressioⁿ((title='XSSed'),'red')"}}'>C</p>
17908 parsoid=wt2html,html2html
17911 title="data:text/html,<img src=1 onerror=alert(1)>"
17912 style="-o-link:attr(title);-o-link-source:current">X</div>
17914 <div title="data:text/html,<img src=1 onerror=alert(1)>" style="/* insecure input */">X</div>
17917 <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>
17921 MSIE 6 CSS safety test: Repetition markers (T57332)
17923 <p style="font-size: 100px; color: expres〱ion((title='XSSed'),'red')">A</p>
17924 <p style="font-size: 100px; color: expresゝion((title='XSSed'),'red')">B</p>
17925 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">C</p>
17926 <p style="font-size: 100px; color: expresヽion((title='XSSed'),'red')">D</p>
17927 <p style="font-size: 100px; color: expresﹽion((title='XSSed'),'red')">E</p>
17928 <p style="font-size: 100px; color: expresﹼion((title='XSSed'),'red')">F</p>
17929 <p style="font-size: 100px; color: expresーion((title='XSSed'),'red')">G</p>
17931 <p style="/* insecure input */">A</p>
17932 <p style="/* insecure input */">B</p>
17933 <p style="/* insecure input */">C</p>
17934 <p style="/* insecure input */">D</p>
17935 <p style="/* insecure input */">E</p>
17936 <p style="/* insecure input */">F</p>
17937 <p style="/* insecure input */">G</p>
17940 <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>
17941 <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>
17942 <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>
17943 <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>
17944 <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>
17945 <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>
17946 <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>
17950 Table attribute legitimate extension
17953 !+ style="<nowiki>color:blue</nowiki>"|status
17958 <th style="color:blue">status
17964 Table attribute safety
17967 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"|status
17972 <th style="/* insecure input */">status
17978 CSS line continuation 1
17980 <div style="background-image: u\ rl(test.jpg);"></div>
17982 <div style="/* insecure input */"></div>
17987 CSS line continuation 2
17989 <div style="background-image: u\ rl(test.jpg); "></div>
17991 <div style="/* invalid control char */"></div>
18002 Expansion of multi-line templates in attribute values (T8255)
18004 <div style="background: {{identity|#00FF00}}">-</div>
18006 <div style="background: #00FF00">-</div>
18011 Expansion of multi-line templates in attribute values (T8255 sanity check)
18013 <div style="background:
18016 <div style="background: #00FF00">-</div>
18019 <div style="background:
18024 Expansion of multi-line templates in attribute values (T8255 sanity check 2)
18026 <div style="background: #00FF00">-</div>
18028 <div style="background: #00FF00">-</div>
18033 Tags which are hidden from tidiers cannot pass through the Sanitizer
18035 <mw:toc><script>alert();</script></mw:toc>
18037 <p><mw:toc><script>alert();</script></mw:toc>
18042 ### Parser hooks (see tests/parser/parserTestsParserHook.php for the <tag> extension)
18046 Parser hook: empty input
18057 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18060 ## Don't expect parsoid to rt this form.
18062 Parser hook: empty input using terminated empty elements
18064 parsoid=wt2html,html2html
18075 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18079 Parser hook: empty input using terminated empty elements (space before)
18090 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
18094 Parser hook: basic input
18105 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18108 ## Don't expect parsoid to rt this form.
18110 Parser hook: case insensitive
18112 parsoid=wt2html,html2html
18123 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18126 ## Don't expect parsoid to rt this form.
18128 Parser hook: case insensitive, redux
18130 parsoid=wt2html,html2html
18141 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
18145 Parser hook: nested tags
18147 <tag><tag></tag></tag>
18156 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"<tag>"}}' data-parsoid='{}' about="#mwt2"></pre></tag>
18160 Parser hook: basic arguments
18162 <tag width="200" height="100" depth="50" square=""></tag>
18175 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18178 ## Don't expect parsoid to rt this form.
18180 Parser hook: basic arguments, variations
18182 parsoid=wt2html,html2html
18184 <tag width=200 height = "100" depth = '50' square></tag>
18197 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18201 Parser hook: argument containing a forward slash (T7344)
18203 <tag filename="/tmp/bla"></tag>
18208 'filename' => '/tmp/bla',
18213 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
18216 ## Don't expect parsoid to rt this form.
18218 Parser hook: empty input using terminated empty elements (T4374)
18220 parsoid=wt2html,html2html
18232 <pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
18235 ## </tag> should be output literally since there is no matching tag that begins it
18236 ## Don't expect parsoid to rt this form.
18238 Parser hook: basic arguments using terminated empty elements (T4374)
18242 <tag width=200 height = "100" depth = '50' square/>
18259 <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
18263 ## Don't expect parsoid to rt this form.
18265 Parser hook: Don't allow unclosed extension tags
18271 this is a '''test'''
18273 <p>test <tag>123
18274 </p><p>this is a <b>test</b>
18277 <p>test <tag>123</p>
18279 <p>this is a <b>test</b></p>
18283 ### (see tests/parser/parserTestsParserHook.php for the <statictag> extension)
18287 Parser hook: static parser hook not inside a comment
18289 <statictag>hello, world</statictag>
18291 <statictag action="flush" />
18297 <p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
18298 <p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
18302 Parser hook: static parser hook inside a comment
18304 <!-- <statictag>hello, world</statictag> -->
18305 <statictag action="flush" />
18310 <!-- <statictag>hello, world</statictag> -->
18311 <p typeof='mw:Extension/statictag' data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about='#mwt2'></p>
18314 # Nested template calls; this case was broken by Parser.php rev 1.506,
18318 Template:One-parameter
18320 (My parameter is: {{{1}}})
18324 Template:Map-one-parameter
18326 {{{{{1}}}|{{{2}}}}}
18330 Nested template calls
18332 {{Map-one-parameter|One-parameter|param}}
18334 <p>(My parameter is: param)
18343 # Remex wraps empty tag runs with p-tags.
18344 # Parsoid strips them out during p-wrapping.
18346 Sanitizer: Closing of open tags
18348 <s></s><table></table>
18350 <p><s></s></p><table></table>
18352 <s></s><table></table>
18356 Sanitizer: Closing of open but not closed tags
18365 Sanitizer: Closing of closed but not open tags
18371 <p class="mw-empty-elt">
18377 Sanitizer: Closing of closed but not open table tags
18381 Table not started</td></tr></table>
18383 <p>Table not started
18388 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
18390 wgFragmentMode=[ 'html5', 'legacy' ]
18392 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18394 <p><span id="æ:_v">byte</span><a href="#æ:_v">backlink</a>
18397 <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>
18401 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id="" (legacy)
18403 wgFragmentMode=[ 'legacy' ]
18405 <span id="æ: v">byte</span>[[#æ: v|backlink]]
18407 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
18411 # In HTML5, the restrictions are that id must contain at least one character,
18412 # and must not contain any space characters.
18414 Sanitizer: Validating the contents of the id attribute (T6515)
18418 <br id="" /><br id="a space" />
18423 # In HTML5, id must be unique amongst all the ids in the element's home subtree.
18425 Sanitizer: Validating id attribute uniqueness (T6515, T8301)
18429 <br id="foo" /><br id="foo" />
18431 Something need to be done. foo-2 ?
18435 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
18438 <meta itemprop="hello" content="world">
18439 <meta http-equiv="refresh" content="5">
18440 <meta itemprop="hello" http-equiv="refresh" content="5">
18441 <link itemprop="hello" href="{{SERVER}}">
18442 <link rel="stylesheet" href="{{SERVER}}">
18443 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
18447 <p> <meta itemprop="hello" content="world" />
18448 <meta http-equiv="refresh" content="5">
18449 <meta itemprop="hello" content="5" />
18450 <link itemprop="hello" href="http://example.org" />
18451 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
18452 <link itemprop="hello" href="http://example.org" />
18459 Sanitizer: Strip comments from CSS attributes
18461 parsoid=wt2html,wt2wt
18463 <span style="margin:/*negate mbox-text padding */-0.125em -0.45em; /*rainbow*/rgba(255, 0, 0, 0.3)">2013</span>
18465 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span>
18468 <p><span style="margin: -0.125em -0.45em; rgba(255, 0, 0, 0.3)">2013</span></p>
18472 Sanitizer: Avoid unnecessary percent encoded characters in interwiki links
18474 [[meatball:Soft"Security]]
18476 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?Soft%22Security" class="extiw" title="meatball:Soft"Security">meatball:Soft"Security</a>
18479 <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>
18483 Sanitizer: angle brackets are invalid, even in interwiki links (T182338)
18485 [[meatball:Foo<Bar]]
18486 [[meatball:Foo>Bar]]
18487 [[meatball:Foo<bar]]
18488 [[meatball:Foo>bar]]
18490 <p>[[meatball:Foo<Bar]]
18491 [[meatball:Foo>Bar]]
18492 [[meatball:Foo<bar]]
18493 [[meatball:Foo>bar]]
18496 <p>[[meatball:Foo<Bar]]
18497 [[meatball:Foo>Bar]]
18498 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&lt;","srcContent":"<"}'><</span>bar]]
18499 [[meatball:Foo<span typeof="mw:Entity" data-parsoid='{"src":"&gt;","srcContent":">"}'>></span>bar]]</p>
18503 Language converter: output gets cut off unexpectedly (T7757)
18507 this bit is safe: }-
18509 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
18511 then we get cut off here: }-
18513 all additional text is vanished
18515 <p>this bit is safe: }-
18516 </p><p>but if we add a conversion instance: xxx
18517 </p><p>then we get cut off here: }-
18518 </p><p>all additional text is vanished
18521 <p>this bit is safe: }-</p>
18522 <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>
18523 <p>then we get cut off here: }-</p>
18524 <p>all additional text is vanished</p>
18528 Language converter glossary rules inside attributes (T119158)
18530 language=sr variant=sr-el
18532 -{H|foAjrjvi=>sr-el:" onload="alert(1)" data-foo="}-
18534 [[File:Foobar.jpg|alt=-{}-foAjrjvi-{}-]]
18537 </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>
18540 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"foAjrjvi","l":"sr-el","t":"\" onload=\"alert(1)\" data-foo=\""}]}'/></p>
18542 <p><figure-inline 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></figure-inline></p>
18546 Self closed html pairs (T7487)
18548 <center><font id="bug" />Centered text</center>
18549 <div><font id="bug2" />In div text</div>
18551 <center><font id="bug"></font>Centered text</center>
18552 <div><font id="bug2"></font>In div text</div>
18556 Punctuation: nbsp before exclamation
18560 <p>C'est grave !
18565 Punctuation: CSS !important (T13874)
18567 <div style="width:50% !important">important</div>
18569 <div style="width:50% !important">important</div>
18574 Punctuation: CSS ! important (T13874; with space after)
18576 <div style="width:50% ! important">important</div>
18578 <div style="width:50% ! important">important</div>
18583 HTML bullet list, closed tags (T7497)
18596 <ul data-parsoid='{"stx":"html"}'>
18597 <li data-parsoid='{"stx":"html"}'>One</li>
18598 <li data-parsoid='{"stx":"html"}'>Two</li>
18604 HTML bullet list, unclosed tags (T7497)
18616 <ul data-parsoid='{"stx":"html"}'>
18617 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18618 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18624 HTML ordered list, closed tags (T7497)
18637 <ol data-parsoid='{"stx":"html"}'>
18638 <li data-parsoid='{"stx":"html"}'>One</li>
18639 <li data-parsoid='{"stx":"html"}'>Two</li>
18645 HTML ordered list, unclosed tags (T7497)
18658 <ol data-parsoid='{"stx":"html"}'>
18659 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>One</li>
18660 <li data-parsoid='{"stx":"html","autoInsertedEnd":true}'>Two</li>
18666 HTML nested bullet list, closed tags (T7497)
18689 <ul data-parsoid='{"stx":"html"}'>
18690 <li data-parsoid='{"stx":"html"}'>One</li>
18691 <li data-parsoid='{"stx":"html"}'>Two:
18692 <ul data-parsoid='{"stx":"html"}'>
18693 <li data-parsoid='{"stx":"html"}'>Sub-one</li>
18694 <li data-parsoid='{"stx":"html"}'>Sub-two</li>
18701 HTML nested bullet list, open tags (T7497)
18723 HTML nested ordered list, closed tags (T7497)
18748 HTML nested ordered list, open tags (T7497)
18785 HTML ordered list item with parameters oddity
18787 <ol><li id="fragment">One</li>
18790 <ol><li id="fragment">One</li>
18795 # parsoid doesn't explicitly mark autonumbered links, see T55505
18797 T7918: autonumbering
18799 [http://first/] [http://second] [ftp://ftp]
18803 [mailto:enclosed@mail.tld With target]
18805 [mailto:enclosed@mail.tld]
18807 mailto:inline@mail.tld
18809 <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>
18810 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
18811 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
18812 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
18813 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
18816 <p><a rel="mw:ExtLink" class="external autonumber" href="http://first/"></a> <a rel="mw:ExtLink" class="external autonumber" href="http://second"></a> <a rel="mw:ExtLink" class="external autonumber" href="ftp://ftp"></a></p>
18817 <p><a rel="mw:ExtLink" class="external free" href="ftp://inlineftp">ftp://inlineftp</a></p>
18818 <p><a rel="mw:ExtLink" class="external text" href="mailto:enclosed@mail.tld">With target</a></p>
18819 <p><a rel="mw:ExtLink" class="external autonumber" href="mailto:enclosed@mail.tld"></a></p>
18820 <p><a rel="mw:ExtLink" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a></p>
18825 # Security and HTML correctness
18826 # From Nick Jenkins' fuzz testing
18830 Fuzz testing: Parser13
18844 # Note that Parsoid output differs from the PHP parser here: the PHP
18845 # parser breaks the URL for the magic word, while in Parsoid the URL
18846 # production takes precedence.
18848 Fuzz testing: Parser14
18853 <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>
18854 http://<div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18856 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18862 <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><p>
18863 http://</p><div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
18865 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
18869 <h2 id="onmouseover="><span id="onmouseover.3D" typeof="mw:FallbackId"></span>onmouseover=</h2>
18870 <p><a rel="mw:ExtLink" class="external free" href="http://__TOC__" data-parsoid='{"stx":"url"}'>http://__TOC__</a></p>
18874 Fuzz testing: Parser14-table
18876 parsoid=wt2html,html2html
18881 <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>
18882 <table style="__TOC__">
18887 <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>
18888 <table style="__TOC__">
18895 <table style="__TOC__"></table>
18898 # Known to produce bogus xml (extra </td>)
18899 # Don't add the html/php section since it generates broken HTML
18901 Fuzz testing: Parser16
18918 Fuzz testing: Parser21
18921 !irc://{{ftp://a" onmouseover="alert('hello world');"
18926 <th><a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
18936 Fuzz testing: Parser22
18938 http://===r:::https://b
18942 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
18950 # Known to produce bad XML for now
18952 Fuzz testing: Parser24
18959 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
18960 <br style="onmouseover='alert(document.cookie);' " />
18962 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18967 <u class="|">}}}} >
18968 <br style="onmouseover='alert(document.cookie);'" />
18970 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
18978 <p data-parsoid='{"fostered":true,"autoInsertedEnd":true}'>{{{|
18979 <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>"}'/>}}}} >
18980 <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}'>
18984 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'></td></tr></tbody></table>
18987 # Note: the current result listed for this is not what the original one was,
18988 # but the original bug was JavaScript injection, which is fixed in any case.
18989 # It's not clear that the original result listed was any more correct than the
18990 # current one. Original result:
18993 # <li class="||">
18994 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
18996 Fuzz testing: Parser25 (T8055)
19002 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
19004 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
19007 <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"]}'>
19008 </span><p about="#mwt1"><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b></p>
19012 Fuzz testing: URL adjacent extension (with space, clean)
19014 http://example.com <nowiki>junk</nowiki>
19016 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
19019 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a> <span typeof="mw:Nowiki">junk</span></p>
19023 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
19025 http://example.com<nowiki>junk</nowiki>
19027 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
19030 <p><a rel="mw:ExtLink" class="external free" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a><span typeof="mw:Nowiki">junk</span></p>
19034 Fuzz testing: URL adjacent extension (no space, dirty; pre)
19036 http://example.com<pre>junk</pre>
19038 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
19041 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></p><pre>junk</pre>
19043 <p><a rel="mw:ExtLink" class="external free" 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>
19047 Fuzz testing: image with bogus manual thumbnail
19049 [[Image:foobar.jpg|thumbnail= ]]
19051 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
19054 <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>
19057 # Parsoid will emit the newline literally in wt2wt; see next test case.
19059 Fuzz testing: encoded newline in generated HTML replacements (T8577)
19063 <pre dir=" "></pre>
19065 <pre dir=" "></pre>
19068 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19069 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19073 Fuzz testing: encoded newline in generated HTML replacements, html2wt (T8577)
19077 <pre typeof="mw:Extension/pre" about="#mwt2" dir="
19078 " data-mw='{"name":"pre","attrs":{"dir":"\n"},"body":{"extsrc":""}}'></pre>
19088 Templates in extension attributes are not expanded
19090 <pre dir="{{echo|ltr}}"></pre>
19092 <pre dir="{{echo|ltr}}"></pre>
19095 <pre typeof="mw:Extension/pre" about="#mwt2" dir="{{echo|ltr}}" data-mw='{"name":"pre","attrs":{"dir":"{{echo|ltr}}"},"body":{"extsrc":""}}'></pre>
19099 Parsing optional HTML elements (T8171)
19104 <td> Some tabular data</td>
19105 <td> More tabular data ...
19106 <td> And yet som tabular data</td>
19112 <td> Some tabular data</td>
19113 <td> More tabular data ...
19114 </td><td> And yet som tabular data</td>
19121 Correct handling of <td>, <tr> (T8171)
19126 <td> Some tabular data</td>
19127 <td> More tabular data ...</td>
19128 <td> And yet som tabular data</td>
19134 <td> Some tabular data</td>
19135 <td> More tabular data ...</td>
19136 <td> And yet som tabular data</td>
19144 Parsing crashing regression (fr:JavaScript)
19148 <p></body></x>
19153 Inline wiki vs wiki block nesting
19159 <p><b>Bold paragraph</b>
19160 </p><p>New wiki paragraph
19164 # FIXME: The current php output is documented
19165 # and desired output is the parsoid target.
19167 Inline HTML vs wiki block nesting
19173 <p><b>Bold paragraph
19174 </p><p>New wiki paragraph</b>
19177 <p><b>Bold paragraph</b>
19178 </p><p>New wiki paragraph
19182 # Original result was this:
19183 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
19185 # While that might be marginally more intuitive, maybe, the six-apostrophe
19186 # construct is clearly pathological and the result stated here (which is what
19187 # the parser actually does) is about as reasonable as anything.
19189 Mixing markup for italics and bold
19192 '''bold''''''bold''bolditalics'''''
19194 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
19202 Article for special page transclusion test
19206 Special page transclusion
19209 {{Special:Prefixindex/Xyzzyx}}
19211 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19217 Special page transclusion twice (T7021)
19220 {{Special:Prefixindex/Xyzzyx}}
19221 {{Special:Prefixindex/Xyzzyx}}
19223 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19225 <ul class="mw-prefixindex-list"><li><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></li>
19231 Transclusion of default MediaWiki message
19233 {{MediaWiki:Mainpage}}
19240 Transclusion of nonexistent MediaWiki message
19242 {{MediaWiki:Mainpagexxx}}
19244 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
19249 Transclusion of MediaWiki message with underscore
19251 {{MediaWiki:history_short}}
19258 Transclusion of MediaWiki message with space
19260 {{MediaWiki:history short}}
19267 Invalid header with following text
19277 Section extraction test (section 0)
19297 Section extraction test (section 1)
19319 Section extraction test (section 2)
19340 Section extraction test (section 3)
19360 Section extraction test (section 4)
19384 Section extraction test (section 5)
19404 Section extraction test (section 6)
19425 Section extraction test (section 7)
19445 Section extraction test (section 8)
19465 Section extraction test (section 9)
19486 Section extraction test (section 10)
19506 Section extraction test (nonexistent section 11)
19525 Section extraction test with bogus heading (section 1)
19530 ==bogus== not a legal section
19534 ==bogus== not a legal section
19538 Section extraction test with bogus heading (section 2)
19543 ==bogus== not a legal section
19550 Section extraction test with comment after heading (section 1)
19562 Section extraction test with comment after heading (section 2)
19574 Section extraction test with bogus <nowiki> heading (section 1)
19579 ==bogus== <nowiki>not a legal section</nowiki>
19583 ==bogus== <nowiki>not a legal section</nowiki>
19587 Section extraction test with bogus <nowiki> heading (section 2)
19592 ==bogus== <nowiki>not a legal section</nowiki>
19598 # Formerly testing for T4587, now resolved by the use of unmarked sections
19599 # instead of respecting commented sections
19601 Section extraction prefixed by comment (section 1)
19612 Section extraction prefixed by comment (section 2)
19622 # Formerly testing for T4607, now resolved by the use of unmarked sections
19623 # instead of respecting HTML-style headings
19625 Section extraction, mixed wiki and html (section 1)
19641 Section extraction, mixed wiki and html (section 2)
19657 # Formerly testing for T5342
19659 Section extraction, heading surrounded by <noinclude>
19663 <noinclude>==unmarked==</noinclude>
19669 # Test behavior of T21910
19671 Sectiion with all-equals
19676 The line above must have a trailing space
19679 But just in case it doesn't...
19683 But just in case it doesn't...
19687 Section replacement test (section 0)
19718 Section replacement test (section 1)
19747 Section replacement test (section 2)
19777 Section replacement test (section 3)
19808 Section replacement test (section 4)
19835 Section replacement test (section 5)
19866 Section replacement test (section 6)
19896 Section replacement test (section 7)
19927 Section replacement test (section 8)
19958 Section replacement test (section 9)
19987 Section replacement test (section 10)
20017 Section replacement test with initial whitespace (T15728)
20021 Preformatted initial line
20025 Preformatted initial line
20032 Section extraction, heading followed by pre with 20 spaces (T8398)
20044 Section extraction, heading followed by pre with 19 spaces (T8398 sanity check)
20057 Section extraction, <pre> around bogus header (T12309)
20074 Section replacement, <pre> around bogus header (T12309)
20095 Handling of 
 in URLs
20099 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20102 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa" data-parsoid='{"stx":"url","a":{"href":"irc://%0Aa"},"sa":{"href":"irc://&#x0A;a"}}'>irc://%0Aa</a></li></ul>
20106 Handling of %0A in URLs
20110 <ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20113 <ul><li><a rel="mw:ExtLink" class="external free" href="irc://%0Aa">irc://%0Aa</a></li></ul>
20116 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
20118 5 quotes, code coverage +1 line
20128 # same html as previous, but wikitext adjusted to match parsoid html2wt
20129 # note that wt2html and html2html will put the <i> before the <b>
20131 5 quotes, code coverage +1 line w/ nowiki (1)
20133 parsoid=wt2wt,html2wt
20135 '''''<nowiki/>'''''
20140 <p><b><i></i></b></p>
20143 # same as previous, just swapping the <i> and <b>
20145 5 quotes, code coverage +1 line w/ nowiki (2)
20147 '''''<nowiki/>'''''
20152 <p><i><b></b></i></p>
20156 Special:Search page linking.
20160 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
20165 {{!}} is a magic word
20167 {{!}} is a magic word there and {{!}} is still a magic word here
20168 | is not a magic word here but {{!}} is still a magic word here
20170 <p>| is a magic word there and | is still a magic word here
20171 | is not a magic word here but | is still a magic word here
20174 <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
20175 | 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>
20181 title=[[Parser test]]
20195 *{{SUBJECTPAGENAME}}
20196 *{{SUBJECTPAGENAMEE}}
20199 *{{NAMESPACENUMBER}}
20204 *{{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
20206 <ul><li>Parser test</li>
20207 <li>Parser_test</li>
20208 <li>Parser test</li>
20209 <li>Parser_test</li>
20210 <li>Parser test</li>
20211 <li>Parser_test</li>
20212 <li>Parser test</li>
20213 <li>Parser_test</li>
20214 <li>Parser test</li>
20215 <li>Parser_test</li>
20216 <li>Talk:Parser test</li>
20217 <li>Talk:Parser_test</li>
20218 <li>Parser test</li>
20219 <li>Parser_test</li>
20227 <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>
20230 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
20233 Gallery with valid attributes
20235 <gallery type="123" summary="345">
20236 File:File:Foobar.jpg
20239 <ul class="gallery mw-gallery-traditional" type="123">
20240 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20241 <div class="thumb" style="height: 150px;">File:Foobar.jpg</div>
20242 <div class="gallerytext">
20248 <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"}}'>
20249 <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>
20253 ## Parsoid thinks the "centre" here is a property, not a caption.
20258 "modes": ["wt2html"],
20259 "nativeGallery": true
20267 image4 |300px| centre
20268 image5.svg| http://///////
20273 <ul class="gallery mw-gallery-traditional">
20274 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20275 <div class="thumb" style="height: 150px;">Image1.png</div>
20276 <div class="gallerytext">
20279 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20280 <div class="thumb" style="height: 150px;">Image2.gif</div>
20281 <div class="gallerytext">
20284 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20285 <div class="thumb" style="height: 150px;">Image3</div>
20286 <div class="gallerytext">
20289 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20290 <div class="thumb" style="height: 150px;">Image4</div>
20291 <div class="gallerytext">
20296 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20297 <div class="thumb" style="height: 150px;">Image5.svg</div>
20298 <div class="gallerytext">
20299 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
20303 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20304 <div class="thumb" style="height: 150px;">* image6</div>
20305 <div class="gallerytext">
20311 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20312 <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>
20313 <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>
20314 <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>
20315 <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>
20316 <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" class="external free" href="http://///////">http://///////</a></div></li>
20317 <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>
20322 Gallery (with options, html)
20325 "modes": ["wt2html", "html2html"],
20326 "nativeGallery": true
20329 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20330 File:Nonexistent.jpg|caption
20331 File:Nonexistent.jpg
20332 image:foobar.jpg|some '''caption''' [[Main Page]]
20334 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20337 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20338 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20339 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20340 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20341 <div class="gallerytext">
20346 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20347 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20348 <div class="gallerytext">
20351 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20352 <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>
20353 <div class="gallerytext">
20354 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20358 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20359 <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>
20360 <div class="gallerytext">
20363 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20364 <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>
20365 <div class="gallerytext">
20373 <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":{}}'>
20374 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20375 <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>
20376 <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>
20377 <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>
20378 <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>
20379 <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>
20384 Gallery (with options, extsrc)
20387 "nativeGallery": false
20390 <gallery widths="70px" heights="40px" perrow="2" caption="Foo [[Main Page]]">
20391 File:Nonexistent.jpg|caption
20392 File:Nonexistent.jpg
20393 image:foobar.jpg|some '''caption''' [[Main Page]]
20395 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
20398 <ul class="gallery mw-gallery-traditional" style="max-width: 226px;_width: 226px;">
20399 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
20400 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20401 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20402 <div class="gallerytext">
20407 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20408 <div class="thumb" style="height: 70px;">Nonexistent.jpg</div>
20409 <div class="gallerytext">
20412 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20413 <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>
20414 <div class="gallerytext">
20415 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20419 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20420 <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>
20421 <div class="gallerytext">
20424 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20425 <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>
20426 <div class="gallerytext">
20434 <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"}}'>
20435 <li class="gallerycaption">Foo <a rel="mw:WikiLink" href="./Main_Page" title="Main Page">Main Page</a></li>
20436 <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>
20437 <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>
20438 <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>
20439 <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>
20440 <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>
20445 Gallery (without px units)
20447 <gallery widths="70" heights="40">
20451 <ul class="gallery mw-gallery-traditional">
20452 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
20453 <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>
20454 <div class="gallerytext">
20460 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70","heights":"40"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
20461 <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>
20466 Gallery (with invalid units)
20468 <gallery widths="70em" heights="40em">
20472 <ul class="gallery mw-gallery-traditional">
20473 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20474 <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>
20475 <div class="gallerytext">
20481 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"widths":"70em","heights":"40em"},"body":{"extsrc":"\nFile:Foobar.jpg\n"}}'>
20482 <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>
20487 Gallery with link that has fragment
20490 "modes": ["wt2html", "html2html"],
20491 "nativeGallery": true
20495 image:foobar.jpg|link=Main_Page
20496 image:foobar.jpg|link=Main_Page#section
20497 image:foobar.jpg|link=Main Page#section|caption
20500 <ul class="gallery mw-gallery-traditional">
20501 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20502 <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>
20503 <div class="gallerytext">
20506 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20507 <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>
20508 <div class="gallerytext">
20511 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20512 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/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>
20513 <div class="gallerytext">
20521 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20522 <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>
20523 <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>
20524 <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>
20528 ## Whoops, Parsoid shouldn't be parsing templates in the attribute caption!
20530 Gallery with template inside caption
20533 "nativeGallery": true
20536 <gallery caption="{{echo|hi}}">
20537 File:Foobar.jpg|{{echo|ho}}
20540 <ul class="gallery mw-gallery-traditional">
20541 <li class='gallerycaption'>{{echo|hi}}</li>
20542 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20543 <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>
20544 <div class="gallerytext">
20552 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20553 <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>
20554 <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>
20559 Gallery with wikitext inside caption
20562 "nativeGallery": true
20566 File:Foobar.jpg|alt=galleryalt|[[File:Foobar.jpg|alt=inneralt|20x20px|desc]]
20567 File:Foobar.jpg|alt=galleryalt|{{Test|unamedParam|alt=param}}
20570 <ul class="gallery mw-gallery-traditional">
20571 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20572 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/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>
20573 <div class="gallerytext">
20574 <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>
20578 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20579 <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>
20580 <div class="gallerytext">
20581 <p>This is a test template
20588 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt6" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20589 <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>
20590 <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>
20595 Gallery (with showfilename option)
20598 "nativeGallery": true
20601 <gallery showfilename="">
20602 File:Nonexistent.jpg|caption
20603 File:Nonexistent.jpg
20604 File:Foobar.jpg|some '''caption''' [[Main Page]]
20608 <ul class="gallery mw-gallery-traditional">
20609 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20610 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20611 <div class="gallerytext">
20612 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20617 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20618 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20619 <div class="gallerytext">
20620 <p><a href="/wiki/File:Nonexistent.jpg" class="galleryfilename galleryfilename-truncate" title="File:Nonexistent.jpg">Nonexistent.jpg</a>
20624 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20625 <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>
20626 <div class="gallerytext">
20627 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20628 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
20632 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20633 <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>
20634 <div class="gallerytext">
20635 <p><a href="/wiki/File:Foobar.jpg" class="galleryfilename galleryfilename-truncate" title="File:Foobar.jpg">Foobar.jpg</a>
20642 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt3" data-mw='{"name":"gallery","attrs":{"showfilename":""},"body":{}}'>
20643 <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>
20644 <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>
20645 <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>
20646 <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>
20650 ## Should Parsoid be preserving these variations? See T151367
20652 Gallery (with namespace-less filenames)
20655 "modes": ["wt2html", "html2html"],
20656 "nativeGallery": true
20660 File:Nonexistent.jpg
20666 <ul class="gallery mw-gallery-traditional">
20667 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20668 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20669 <div class="gallerytext">
20672 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20673 <div class="thumb" style="height: 150px;">Nonexistent.jpg</div>
20674 <div class="gallerytext">
20677 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20678 <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>
20679 <div class="gallerytext">
20682 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20683 <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>
20684 <div class="gallerytext">
20690 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20691 <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>
20692 <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>
20693 <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>
20694 <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>
20699 Gallery override link with wikilink (T36852)
20702 "nativeGallery": true
20706 File:Foobar.jpg|alt=galleryalt|link=Wikilink
20709 <ul class="gallery mw-gallery-traditional">
20710 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20711 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/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>
20712 <div class="gallerytext">
20718 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20719 <li class="gallerybox" style="width: 155px;"><div class="thumb" style="width: 150px; height: 150px;"><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>
20724 Gallery override link with absolute external link (T36852)
20727 "nativeGallery": true
20731 File:Foobar.jpg|alt=galleryalt|link=http://www.example.org
20734 <ul class="gallery mw-gallery-traditional">
20735 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20736 <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>
20737 <div class="gallerytext">
20743 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20744 <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>
20749 Gallery override link with absolute external link with LanguageConverter
20754 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
20757 <ul class="gallery mw-gallery-traditional">
20758 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20759 <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>
20760 <div class="gallerytext">
20768 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{"extsrc":"\nFile:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org\n"}}'>
20769 <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">caption</div></li>
20774 Gallery override link with malicious javascript (T36852)
20777 "modes": ["wt2html", "html2html"],
20778 "nativeGallery": true
20782 File:Foobar.jpg|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
20785 <ul class="gallery mw-gallery-traditional">
20786 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20787 <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>
20788 <div class="gallerytext">
20794 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20795 <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>
20799 # Note that parsoid uses the invalid link as a caption, PHP does not.
20801 Gallery with invalid title as link (T45964)
20804 "modes": ["wt2html", "html2html"],
20805 "nativeGallery": true
20809 File:Foobar.jpg|link=<
20812 <ul class="gallery mw-gallery-traditional">
20813 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20814 <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>
20815 <div class="gallerytext">
20821 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{},"body":{}}'>
20822 <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>
20827 Serialize gallery without attrs in data-mw
20830 "modes": ["html2wt"],
20831 "nativeGallery": true
20834 <ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","body":{}}'>
20835 <li class="gallerycaption">123</li>
20836 <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>
20839 <gallery caption="123">
20845 Gallery with class and style attributes
20848 "nativeGallery": true
20851 <gallery class="center" style="text-align: center;">
20855 <ul class="gallery mw-gallery-traditional center" style="text-align: center;">
20856 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20857 <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>
20858 <div class="gallerytext">
20864 <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":{}}'>
20865 <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>
20870 Gallery in slideshow mode
20873 "nativeGallery": true
20876 <gallery mode="slideshow" showthumbnails="">
20880 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1">
20881 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
20882 <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>
20883 <div class="gallerytext">
20889 <ul class="gallery mw-gallery-slideshow" data-showthumbnails="1" typeof="mw:Extension/gallery" about="#mwt2" data-mw='{"name":"gallery","attrs":{"mode":"slideshow","showthumbnails":""},"body":{}}'>
20890 <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>
20895 HTML Hex character encoding (spells the word "JavaScript")
20897 parsoid=wt2html,wt2wt,html2html
20899 JavaScript
20901 <p>JavaScript
20904 <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>
20908 HTML Hex character encoding bogus encoding (T28437 regression check)
20912 <p>&#xsee;&#XSEE;
20917 HTML Hex character encoding mixed case
20919 parsoid=wt2html,wt2wt,html2html
20926 <p><span typeof="mw:Entity">î</span><span typeof="mw:Entity">î</span></p>
20929 # See: https://www.w3.org/TR/html5/syntax.html#character-references
20930 # Note that U+000C (form feed) is not a valid XML character, so
20931 # it is banned even though allowed in HTML5.
20933 Illegal character references (T106578)
20938 ; Control (low): 
20939 ; Control (high):  Ÿ
20940 ; Surrogate: ��
20941 ; This is an okay astral character: 💩
20949 <dt>Control (low)</dt>
20951 <dt>Control (high)</dt>
20952 <dd>&#x7F; &#x9F;</dd>
20954 <dd>&#xD83D;&#xDCA9;</dd>
20955 <dt>This is an okay astral character</dt>
20956 <dd>💩</dd></dl>
20960 __FORCETOC__ override
20972 ISBN 978-0-1234-56 789
20974 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
20977 <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>
20981 ISBN followed by 5 spaces
20992 ISBN ISBN 1234567890
20994 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
20997 <p>ISBN <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21000 # Uppercase X and lowercase x as well
21011 <p><a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-X</a>
21012 <a href="/wiki/Special:BookSources/346204561X" class="internal mw-magiclink-isbn">ISBN 3-462-04561-x</a>
21013 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957X</a>
21014 <a href="/wiki/Special:BookSources/080442957X" class="internal mw-magiclink-isbn">ISBN 080442957x</a>
21015 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957X</a>
21016 <a href="/wiki/Special:BookSources/978080442957X" class="internal mw-magiclink-isbn">ISBN 978080442957x</a>
21019 <p><a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-X</a>
21020 <a href="./Special:BookSources/346204561X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 3-462-04561-x</a>
21021 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957X</a>
21022 <a href="./Special:BookSources/080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 080442957x</a>
21023 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957X</a>
21024 <a href="./Special:BookSources/978080442957X" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 978080442957x</a></p>
21028 ISBN with empty prefix (parsoid test)
21032 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21035 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink">ISBN 1234567890</a></p>
21039 T24905: <abbr> followed by ISBN followed by </a>
21041 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
21043 <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>
21046 <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" class="external text" href="http://www.example.com">example.com</a></p>
21054 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a>
21059 Double RFC with a wiki link
21063 <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>
21072 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc983">RFC 983</a> 987
21075 <p><a href="https://tools.ietf.org/html/rfc983" rel="mw:ExtLink" class="external text" data-parsoid='{"stx":"magiclink"}'>RFC 983</a><span typeof="mw:Entity" data-parsoid='{"src":"&#x20;","srcContent":" "}'> </span>987</p>
21079 Centre-aligned image
21081 [[Image:foobar.jpg|centre]]
21083 <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>
21086 <figure class="mw-default-size mw-halign-center" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"center","ak":"centre"}]}'><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>
21092 [[Image:foobar.jpg|none]]
21094 <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>
21097 <figure class="mw-default-size mw-halign-none" 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>
21101 Width + Height sized image (using px) (height is ignored)
21103 [[Image:foobar.jpg|640x480px]]
21105 <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>
21108 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640x480px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
21112 Width-sized image (using px, no following whitespace)
21114 [[Image:foobar.jpg|640px]]
21116 <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>
21119 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
21123 Width-sized image (using px, with following whitespace - test regression from r39467)
21125 [[Image:foobar.jpg|640px ]]
21127 <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>
21130 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"640px "}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
21134 Width-sized image (using px, with preceding whitespace - test regression from r39467)
21136 [[Image:foobar.jpg| 640px]]
21138 <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>
21141 <p><figure-inline typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":" 640px"}]}'><a href="./File:Foobar.jpg"><img resource="./File:Foobar.jpg" src="//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" data-file-width="1941" data-file-height="220" data-file-type="bitmap" height="73" width="640" data-parsoid='{"a":{"resource":"./File:Foobar.jpg","height":"73","width":"640"},"sa":{"resource":"Image:foobar.jpg"}}'/></a></figure-inline></p>
21145 Image with page parameter
21149 [[File:LoremIpsum.djvu|page=2]]
21151 <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>
21154 <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>
21158 Another italics / bold test
21166 # FIXME: The php output seems broken. It's interleaving some open/close tags.
21172 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dt></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl>
21175 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd></dd></dl></dd></dl></dt></dl></dt></dl></dt></dl></dd></dl>
21179 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
21181 Images with the "|" character in the comment
21183 [[File:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
21185 <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>
21188 <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" class="external text" 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>
21192 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
21194 <html><script>alert(1);</script></html>
21196 <p><html><script>alert(1);</script></html>
21201 HTML with raw HTML ($wgRawHtml==true)
21205 <html><script>alert(1);</script></html>
21207 <p><script>alert(1);</script>
21212 Parents of subpages, one level up
21214 subpage title=[[Subpage test/L1/L2/L3]]
21218 <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>
21224 Parents of subpages, one level up, not named
21226 subpage title=[[Subpage test/L1/L2/L3]]
21230 <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>
21237 Parents of subpages, two levels up
21239 subpage title=[[Subpage test/L1/L2/L3]]
21245 <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
21246 </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>
21251 Parents of subpages, two levels up, without trailing slash or name.
21253 subpage title=[[Subpage test/L1/L2/L3]]
21262 Parents of subpages, two levels up, with lots of extra trailing slashes.
21264 subpage title=[[Subpage test/L1/L2/L3]]
21268 <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>
21273 Subpage test/L1/L2/L3Sibling
21279 Transclusion of a sibling page (one level up)
21281 subpage title=[[Subpage test/L1/L2/L3]]
21290 Transclusion of a child page
21292 subpage title=[[Subpage test/L1/L2]]
21300 # This is wt2html only in Parsoid because we add <nowiki>
21301 # because of {{..}} and we don't expect to fix that to
21302 # eliminate the nowikis selective for {{..}} markup.
21304 Non-transclusion because of too many up levels
21306 subpage title=[[Subpage test/L1/L2/L3]]
21309 {{../../../../More than parent}}
21311 <p>{{../../../../More than parent}}
21314 <p>{{../../../../More than parent}}</p>
21318 Definition list code coverage
21324 <dl><dt>title  </dt>
21326 <dt>title </dt>
21332 <dl><dt>title <span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21333 <dt>title<span typeof="mw:Placeholder"> </span></dt><dd> def</dd>
21334 <dt>title</dt><dd> def</dd></dl>
21338 Don't fall for the self-closing div
21340 <div>hello world</div/>
21342 <div>hello world</div>
21351 <p>[[:Template:Msg]]
21360 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
21364 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
21366 Always escape literal '>' in output, not just after '<'
21380 <p>This is a test template
21381 This is a test template
21393 Inclusion of !userCanEdit() content
21397 <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>
21403 Out-of-order TOC heading levels
21412 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
21414 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
21416 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
21417 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
21420 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
21422 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
21423 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
21429 <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>
21430 <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>
21431 <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>
21432 <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>
21433 <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>
21434 <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>
21440 ISBN with a dummy number
21450 ISBN with space-delimited number
21454 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
21457 <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>
21462 ISBN with multiple spaces, no number
21481 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
21482 </p><p>ISBN 12345678901
21485 <p>ISBN 123456789</p>
21487 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a></p>
21489 <p>ISBN 12345678901</p>
21494 ISBN with trailing year (T9110)
21496 ISBN 1-234-56789-0 - 2006
21498 ISBN 1 234 56789 0 - 2006
21500 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
21501 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
21504 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1-234-56789-0</a> - 2006</p>
21506 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1 234 56789 0</a> - 2006</p>
21513 wgFragmentMode=[ 'html5', 'legacy' ]
21515 {{anchorencode:foo bar©#%n}}
21520 <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>
21524 anchorencode (legacy)
21526 wgFragmentMode=[ 'legacy' ]
21528 {{anchorencode:foo bar©#%n}}
21530 <p>foo_bar.C2.A9.23.25n
21535 anchorencode trims spaces
21537 wgFragmentMode=[ 'html5', 'legacy' ]
21539 {{anchorencode: __pretty__please__}}
21544 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: __pretty__please__","function":"anchorencode"},"params":{},"i":0}}]}'>pretty_please</p>
21548 anchorencode deals with links
21550 wgFragmentMode=[ 'html5', 'legacy' ]
21552 {{anchorencode: [[hello|world]] [[hi]]}}
21557 <p about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: [[hello|world]] [[hi]]","function":"anchorencode"},"params":{},"i":0}}]}'>world_hi</p>
21561 anchorencode deals with templates
21563 wgFragmentMode=[ 'html5', 'legacy' ]
21565 {{anchorencode: {{Foo}} x}}
21570 <p about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"anchorencode: {{Foo}} x","function":"anchorencode"},"params":{},"i":0}}]}'>FOO_x</p>
21574 anchorencode encodes like the TOC generator: (T20431)
21576 wgFragmentMode=[ 'html5', 'legacy' ]
21578 ===_ +:.3A%3A _ &&]] x===
21579 {{anchorencode: _ +:.3A%3A _ &&]] x}}
21582 <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>
21583 <p>+:.3A%3A_&&]]_x
21586 <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>
21587 <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>
21588 <meta property="mw:PageProp/noeditsection"/>
21592 anchorencode encodes like the TOC generator: (T20431) (legacy)
21594 wgFragmentMode=[ 'legacy' ]
21596 ===_ +:.3A%3A&&]]===
21597 {{anchorencode: _ +:.3A%3A&&]] }}
21600 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
21601 <p>.2B:.3A.253A.26.26.5D.5D
21606 T8200: blockquotes and paragraph formatting
21627 T10293: Use of center tag ruins paragraph formatting
21648 Parsing of overlapping (improperly nested) inline html tags
21650 <span><s>x</span></s>
21652 <p><span><s>x</span></s></span>
21655 <p><span><s>x</s></span>
21660 ### Language variants related tests
21663 # Parsoid does not mark self-links.
21664 # Parsoid does not convert links; PHP will do any necessary redirects.
21667 Self-link in language variants
21669 title=[[Dunav]] language=sr
21671 Both [[Dunav]] and [[Дунав]] are names for this river.
21673 <p>Both <a class="mw-selflink selflink">Dunav</a> and <a class="mw-selflink selflink">Дунав</a> are names for this river.
21676 <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>
21686 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
21688 title=[[Duna]] language=sr
21690 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
21692 <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.
21695 <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>
21699 Link to a section of a variant of this title shouldn't be parsed as self-link
21701 title=[[Duna]] language=sr
21703 [[Dуна]] is a self-link while [[Dunа#Foo]] and [[Dуна#Foo]] are not self-links.
21705 <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.
21708 <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>
21712 Link to pages in language variants
21716 Main Page can be written as [[Маин Паге]]
21718 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
21721 <p>Main Page can be written as <a rel="mw:WikiLink" href="./Маин_Паге" title="Маин Паге">Маин Паге</a></p>
21726 Multiple links to pages in language variants
21730 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
21732 <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>.
21735 <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>
21740 Simple template in language variants
21746 <p>This is a test template
21752 Template with explicit namespace in language variants
21758 <p>This is a test template
21764 Basic test for template parameter in language variants
21768 {{парамтест|param=foo}}
21770 <p>This is a test template with parameter foo
21775 Simple category in language variants
21779 [[Category:МедиаWики Усер'с Гуиде]]
21781 cat=МедиаWики_Усер'с_Гуиде sort=
21783 <link rel="mw:PageProp/Category" href="./Категорија:МедиаWики_Усер'с_Гуиде" data-parsoid='{"stx":"simple","a":{"href":"./Категорија:МедиаWики_Усер'с_Гуиде"},"sa":{"href":"Category:МедиаWики Усер'с Гуиде"}}'/>
21798 ## We used to, but no longer wt2wt this test since the default serializer
21799 ## will normalize all categories to serialize on their own line.
21800 ## This wikitext usage is going to be fairly uncommon in production and
21801 ## selser will take care of preserving formatting in those scenarios.
21803 Don't convert blue categorylinks to another variant (T35210)
21809 [[A]][[Category:分类]]
21813 <p><a rel="mw:WikiLink" href="./A" title="A">A</a></p>
21814 <link rel="mw:PageProp/Category" href="./Category:分类"/>
21818 Stripping -{}- tags (language variants)
21822 Latin proverb: -{Ne nuntium necare}-
21824 <p>Latin proverb: Ne nuntium necare
21827 <p>Latin proverb: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21832 Prevent conversion with -{}- tags (language variants)
21834 language=sr variant=sr-ec
21836 Latinski: -{Ne nuntium necare}-
21838 <p>Латински: Ne nuntium necare
21841 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21846 Prevent conversion of text with -{}- tags (language variants)
21848 language=sr variant=sr-ec
21850 Latinski: -{Ne nuntium necare}-
21852 <p>Латински: Ne nuntium necare
21855 <p>Latinski: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Ne nuntium necare"}}'></span></p>
21860 Prevent conversion of links with -{}- tags (language variants)
21862 language=sr variant=sr-ec
21866 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
21869 <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>
21874 -{}- tags within headlines (within html for parserConvert())
21876 wgFragmentMode=[ 'html5', 'legacy' ]
21878 language=sr variant=sr-ec
21882 Note that even an unprotected headline ID is not affected by language
21887 <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>
21888 <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге
21891 <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>
21894 <h2 id="-{Naslov}-"><span id="-.7BNaslov.7D-" typeof="mw:FallbackId"></span><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Naslov"}}'></span></h2>
21896 <p>Note that even an unprotected headline ID is not affected by language
21899 <h2 id="Latinski">Latinski</h2>
21903 Explicit definition of language variant alternatives
21905 language=zh variant=zh-tw
21907 -{zh:China;zh-tw:Taiwan}-, not China
21909 <p>Taiwan, not China
21912 <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>
21916 Filter syntax for language variants
21918 language=zh variant=zh-tw
21920 foo-{zh;zh-hans;zh-hant|blog, WEBJOURNAL, WEBLOG}-quux
21922 <p>fooblog, WEBJOURNAL, WEBLOGquux
21925 <p>foo<span typeof="mw:LanguageVariant" data-mw-variant='{"filter":{"l":["zh","zh-hans","zh-hant"],"t":"blog, WEBJOURNAL, WEBLOG"}}'></span>quux</p>
21928 # Note that Parsoid post-processing for language variants needs to
21929 # update the `title` attribute here, based on the mw:ExpandedAttrs property
21931 Conversion around HTML tags
21933 language=sr variant=sr-ec
21935 -{H|span=>sr-ec:script;title=>sr-ec:src}-
21936 <span title="La-{sr-el:L;sr-ec:C}-tin">ski</span>
21939 <span title="ЛаCтин">ски</span>
21942 <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"}]}'/>
21943 <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>
21947 Explicit session-wise two-way language variant mapping (A flag and - flag)
21949 language=zh variant=zh-tw
21951 This is -{zh:China; zh-tw:Taiwan}-, but we'll forget that now.
21953 Taiwan is not China.
21955 But -{A|zh:China; zh-tw:Taiwan}- is China,
21957 (This-{-|zh:China; zh-tw:Taiwan}- should be stripped!)
21959 and -{China}- is China.
21961 <p>This is Taiwan, but we'll forget that now.
21962 </p><p>Taiwan is not China.
21963 </p><p>But Taiwan is Taiwan,
21964 </p><p>(This should be stripped!)
21965 </p><p>and China is China.
21968 <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>
21969 <p>Taiwan is not China.</p>
21970 <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>
21971 <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>
21972 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"China"}}'></span> is China.</p>
21976 Explicit session-wise one-way language variant mapping (A flag and - flag)
21978 language=zh variant=zh-tw
21980 This is -{COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}-, but we'll forget that now.
21982 COUNTRY is China or Taiwan.
21984 But -{A|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- is COUNTRY,
21986 (This-{-|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
21988 and -{COUNTRY}- is COUNTRY.
21990 <p>This is Taiwan, but we'll forget that now.
21991 </p><p>COUNTRY is China or Taiwan.
21992 </p><p>But Taiwan is Taiwan,
21993 </p><p>(This should be stripped!)
21994 </p><p>and COUNTRY is COUNTRY.
21997 <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>
21998 <p>COUNTRY is China or Taiwan.</p>
21999 <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>
22000 <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>
22001 <p>and <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"COUNTRY"}}'></span> is COUNTRY.</p>
22005 Explicit session-wise two-way language variant mapping (H flag for hide)
22007 language=zh variant=zh-tw
22009 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
22013 <p>(This should be stripped!)
22014 </p><p>Taiwan is Taiwan.
22017 <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>
22018 <p>Taiwan is China.</p>
22022 Explicit session-wise one-way language variant mapping (H flag for hide)
22024 language=zh variant=zh-tw
22026 (This-{H|COUNTRY=>zh:China;COUNTRY=>zh-tw:Taiwan}- should be stripped!)
22028 COUNTRY is Taiwan or China.
22030 <p>(This should be stripped!)
22031 </p><p>Taiwan is Taiwan or China.
22034 <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>
22035 <p>COUNTRY is Taiwan or China.</p>
22038 ## Note that parsoid test runner does not support 'showtitle' option.
22040 Adding explicit conversion rule for title (T flag)
22042 language=zh variant=zh-tw showtitle
22044 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
22049 <p>Should be stripped!
22050 </p><p>Taiwan is China.
22053 <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>
22054 <p>Taiwan is China.</p>
22058 Code coverage: T combined with H flag
22060 language=zh variant=zh-tw showtitle
22062 Should be stripped-{T;H|zh:China; zh-tw:Taiwan}-!
22067 <p>Should be stripped!
22068 </p><p>Taiwan is Taiwan.
22071 <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>
22072 <p>Taiwan is China.</p>
22076 Code coverage: T with no variants
22078 language=zh variant=zh-tw showtitle
22080 -{H|zh:China; zh-tw:Taiwan}-
22081 Taiwan is China.-{T|Taiwan is China}-
22088 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22089 Taiwan is China.<meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"Taiwan is China"},"title":true}'/></p>
22093 Code coverage: rules with no variants
22095 language=zh variant=zh-tw
22097 -{H|zh:China; zh-tw:Taiwan}-
22108 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>
22110 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":"China"}]}'/>
22111 Taiwan is China.</p>
22116 Code coverage: D flag for conversion rule
22118 language=zh variant=zh-tw
22120 -{D|zh-cn:XA; zh-tw:YA}-
22121 -{A;D|zh-cn:XB; zh-tw:YB}-
22122 -{D;H|zh-cn:XC; zh-tw:YC}-
22124 -{D;H|FOO=>zh-tw:BAR;FOO=>zh-cn:BAT}-
22130 XA XB XC YA YB YC FOO BAR BAT 012345
22135 </p><p>FOO⇒台灣:BAR;FOO⇒大陆:BAT;
22139 </p><p>XA YB YC YA YB YC BAR BAR BAT 013355
22142 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"twoway":[{"l":"zh-cn","t":"XA"},{"l":"zh-tw","t":"YA"}]}'></span>
22143 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XB"},{"l":"zh-tw","t":"YB"}]}'/>
22144 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"twoway":[{"l":"zh-cn","t":"XC"},{"l":"zh-tw","t":"YC"}]}'></span></p>
22145 <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>
22146 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"describe":true,"oneway":[{"f":"0","l":"zh-tw","t":"1"}]}'></span>
22147 <meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"2","l":"zh-tw","t":"3"}]}'/>
22148 <span typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"describe":true,"oneway":[{"f":"4","l":"zh-tw","t":"5"}]}'></span></p>
22149 <p>XA XB XC YA YB YC FOO BAR BAT 012345</p>
22153 Code coverage: N flag for conversion rule
22155 language=zh variant=zh-cn
22165 </p><p>српски (ћирилица)
22168 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-cn"}}'></span></p>
22169 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"zh-tw"}}'></span></p>
22170 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"sr-ec"}}'></span></p>
22173 # html2wt suppresses the bogus 'D' flag, so this is wt2html only
22175 Code coverage: N flag for conversion rule (wt2html only)
22177 language=zh variant=zh-cn
22178 parsoid=wt2html,html2html
22185 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"name":{"t":"en"}}' data-parsoid='{"fl":["D","N"]}'></span></p>
22189 Testing that changing the language variant here in the tests actually works
22191 language=zh variant=zh showtitle
22193 Should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22196 <p>Should be stripped!
22199 <p>Should be stripped<meta typeof="mw:LanguageVariant" data-mw-variant='{"title":true,"twoway":[{"l":"zh","t":"China"},{"l":"zh-tw","t":"Taiwan"}]}'/>!</p>
22203 Recursive conversion of alt and title attrs shouldn't clear converter state
22205 language=zh variant=zh-cn
22208 -{H|zh-cn:Exclamation; zh-tw:exclamation}-
22209 Should be stripped-{T|zh-cn:China; zh-tw:Taiwan}-<span title="exclamation">!</span>
22213 Should be stripped<span title="Exclamation">!</span>
22216 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"zh-cn","t":"Exclamation"},{"l":"zh-tw","t":"exclamation"}]}'/>
22217 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>
22221 T26072: more test on conversion rule for title
22223 language=zh variant=zh-tw showtitle
22225 This should be stripped-{T|zh:China; zh-tw:Taiwan}-!
22227 This won't take interferes with the title rule-{H|zh:Beijing; zh-tw:Taipei}-.
22230 <p>This should be stripped!
22231 </p><p>This won't take interferes with the title rule.
22234 <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>
22235 <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>
22239 Partly disable title conversion if variant == main language code
22241 language=zh variant=zh title=[[ZH]] showtitle
22243 -{T|zh-cn:CN;zh-tw:TW}-
22249 <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>
22253 Partly disable title conversion if variant == main language code, more
22255 language=zh variant=zh title=[[ZH]] showtitle
22263 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"TW"},"title":true}'/></p>
22267 Raw output of variant escape tags (R flag)
22269 language=zh variant=zh-tw
22271 Raw: -{R|zh:China;zh-tw:Taiwan}-
22273 <p>Raw: zh:China;zh-tw:Taiwan
22276 <p>Raw: <span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"zh:China;zh-tw:Taiwan"}}'></span></p>
22279 # html2wt suppresses the bogus 'D' flags, so this is wt2html only
22281 Raw output of variant escape tags (R flag) (wt2html only)
22283 language=zh variant=zh-tw
22284 parsoid=wt2html,html2html
22286 -{Variant}- -{D|syntax}- -{D;R|options}-
22288 <p>Variant syntax options
22291 <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>
22295 Nested markup inside raw output of variant escape tags (R flag)
22297 language=zh variant=zh-tw
22299 Nested raw: -{R|nested -{zh:China;zh-tw:Taiwan}- nested}-
22301 <p>Nested raw: nested Taiwan nested
22304 <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>
22308 Nested markup and spaces inside raw output of variant escape tags (R flag)
22310 language=zh variant=zh-tw
22312 X-{ outer -{ inner }- outer }-X
22314 <p>X outer inner outer X
22317 <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>
22321 Templates inside raw output of variant escape tags (R flag)
22323 language=zh variant=zh-tw
22325 Nested raw: -{R|nested {{echo|hi}} templates}-
22327 <p>Nested raw: nested hi templates
22330 <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>
22334 Strings evaluating false shouldn't be ignored by Language converter (T51072)
22336 language=zh variant=zh-cn
22338 -{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
22343 <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>
22347 Conversion rules from [numeric-only string] to [something else] (T48634)
22349 language=zh variant=zh-cn
22351 -{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
22356 <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>
22360 Two-way converter rule entries with an empty value should be ignored (T53551)
22362 language=zh variant=zh-cn
22364 -{H|zh-cn:foo;zh-tw:;}-foobar
22369 <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>
22373 One-way converter rule entries with an empty "from" string should be ignored (T53551)
22375 language=zh variant=zh-cn
22377 -{H|=>zh-cn:foo;}-foobar
22382 <p><meta typeof="mw:LanguageVariant" data-parsoid='{"tSp":[5]}' data-mw-variant='{"add":true,"oneway":[{"f":"","l":"zh-cn","t":"foo"}]}'/>foobar</p>
22386 Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
22388 language=zh variant=zh-cn
22395 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"twoway":[{"l":"*","t":""}]}'/>foobar</p>
22399 Nested using of manual convert syntax
22401 language=zh variant=zh-hk
22403 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
22405 <p>Nested: Hello Hong Kong!
22408 <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>
22412 HTML markups with conversion syntax in attribs, nested in other conversion blocks
22414 language=zh variant=zh-cn
22416 -{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
22418 <p><span title="X">A</span>
22421 <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>
22425 HTML markups with conversion syntax in attribs, nested in other conversion blocks (not working yet in PHP parser)
22427 language=zh variant=zh-cn
22429 -{<span title="-{X}-">A</span>}-
22430 !! html/php+disabled
22431 <p><span title="X">A</span>
22434 <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>
22437 # Parsoid and PHP disagree on how to parse this example: Parsoid
22438 # insists that the content of a language converter element be a valid
22439 # DOM fragment or attribute string
22441 Language converter markup with block content
22443 language=zh variant=zh-cn
22445 <span>a-{b<div>c}-d
22447 <span>a-{zh;zh-hans;zh-hant|b<div>c}-d
22449 <span>a-{H|0=>zh-cn:x<span>y;0=>zh-tw:b<div>c}-d
22454 </span></div></span></div></span>
22456 <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>
22458 <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>
22460 <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>
22464 LanguageConverter selser (1)
22466 language=zh variant=zh-cn
22468 "modes": ["wt2wt", "selser"],
22470 ["span[typeof]", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22480 LanguageConverter selser (2)
22482 language=zh variant=zh-cn
22484 "modes": ["wt2wt", "selser"],
22486 ["span[class='x']", "contents", "text", "-{foo}-"],
22487 ["a", "contents", "text", "-{"],
22488 ["span[typeof]", "attr", "data-mw", "{\"parts\":[{\"template\":{\"target\":{\"wt\":\"1x\",\"href\":\"./Template:1x\"},\"params\":{\"1\":{\"wt\":\"-{\"}},\"i\":0}}]}"]
22492 <span class="x">TEXT1</span>
22493 [http://example.com TEXT2]
22497 <span class="x"><nowiki>-{foo}-</nowiki></span>
22498 [http://example.com -{]
22499 [[Foo|<nowiki>-{</nowiki>]]
22500 {{1x|<nowiki>-{</nowiki>}}
22503 # Tests LanguageVariantText in ConstrainedText
22505 LanguageConverter selser (3)
22507 language=zh variant=zh-cn
22509 "modes": ["wt2wt", "selser"],
22511 ["td > span", "attr", "typeof", "mw:LanguageVariant"],
22512 ["td > span", "attr", "data-mw-variant", "{\"disabled\":{\"t\":\"edited\"}}"]
22523 |<nowiki/>-{edited}-
22527 # Tests LanguageVariantText._fromSelSer
22529 LanguageConverter selser (4)
22531 language=zh variant=zh-cn
22533 "modes": ["wt2wt", "selser"],
22535 ["td > span.x", "remove"]
22541 |<span class="x">Foo</span>-{Bar}-
22542 ||<span class="x">Foo</span>-{Bar}-
22552 # Since Parsoid is starting to emit canonical wikitext for links,
22553 # [http://example.com http://example.com] will not RT back to that
22555 # Parsoid does not language-convert links (it is done in a
22556 # post-processing step)
22558 Proper conversion of text in external links
22560 language=sr variant=sr-ec
22563 http://www.google.com
22564 gopher://www.google.com
22565 [http://www.google.com http://www.google.com]
22566 [gopher://www.google.com gopher://www.google.com]
22567 [https://www.google.com irc://www.google.com]
22568 [ftp://www.google.com www.google.com/ftp://dir]
22569 [//www.google.com www.google.com]
22571 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
22572 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22573 <a rel="nofollow" class="external text" href="http://www.google.com">http://www.google.com</a>
22574 <a rel="nofollow" class="external text" href="gopher://www.google.com">gopher://www.google.com</a>
22575 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
22576 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
22577 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
22580 <p><a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22581 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22582 <a rel="mw:ExtLink" class="external free" href="http://www.google.com">http://www.google.com</a>
22583 <a rel="mw:ExtLink" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
22584 <a rel="mw:ExtLink" class="external text" href="https://www.google.com">irc://www.google.com</a>
22585 <a rel="mw:ExtLink" class="external text" href="ftp://www.google.com">www.google.com/ftp://dir</a>
22586 <a rel="mw:ExtLink" class="external text" href="//www.google.com">www.google.com</a></p>
22590 Do not convert roman numbers to language variants
22592 language=sr variant=sr-ec
22596 <p>Фридрих IV је цар.
22599 <p>Fridrih IV je car.</p>
22603 Unclosed language converter markup "-{"
22614 Don't convert raw rule "-{R|=>}-" to "=>"
22623 <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>
22627 Don't break link parsing if language converter markup is in the caption.
22629 language=sr variant=sr-ec
22631 [[Main Page|-{R|main page}-]]
22633 <p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
22636 <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>
22640 T146304: Don't break template parsing if language converter markup is in the parameter.
22642 language=sr variant=sr-ec
22649 <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>
22653 T146305: Don't break image parsing if language converter markup is in the caption.
22657 [[Датотека:Foobar.jpg|thumb|-{R|caption:}-]]
22659 <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>
22662 <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>
22666 T146305: Don't break image parsing if nested language converter markup is in the caption.
22668 language=zh variant=zh-cn
22670 [[File:Foobar.jpg|thumb|-{|zh-cn:blog (hk: -{zh-hans|WEBJOURNAL}-, tw: -{zh-hans|WEBLOG}-)}-]]
22672 <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>
22675 <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>
22678 # XXX html2wt disabled because rich markup in alt is not preserved.
22680 Don't break gallery if language converter markup is inside.
22685 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=-{R|foo}-|-{R|bar}-]]|alt=-{R|bat}-
22686 File:foobar.jpg|{{Test|unamedParam|alt=-{R|param}-}}|alt=galleryalt
22689 <ul class="gallery mw-gallery-traditional">
22690 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22691 <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>
22692 <div class="gallerytext">
22693 <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>
22697 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
22698 <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>
22699 <div class="gallerytext">
22700 <p>This is a test template
22707 <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"}}'>
22708 <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>
22709 <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>
22714 T153135: Don't break list handling if language converter markup is in the item.
22716 language=zh variant=zh-cn
22718 ;-{zh-cn:AAA;zh-tw:BBB}-
22722 <dt>foo:bar</dt></dl>
22725 <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>
22726 <dt data-parsoid='{"dsr":[25,39,1,0]}'><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"foo:bar"}}'></span></dt>
22730 // Note that parsoid does not protect colons unless language converter
22731 // markup is properly nested, because it is a backtracking parser.
22733 T153135: Unclosed markup in definition list (code coverage)
22735 language=zh variant=zh-cn
22740 <dl><dt><b>foo:bar</b></dt><b>
22741 <dt>-{zh-cn:AAA</dt></b></dl><p><b>
22744 <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}'>
22745 <dt data-parsoid='{"dsr":[12,20,1,0]}'>-{zh-cn</dt>
22746 <dd data-parsoid='{"stx":"row","dsr":[20,24,1,0]}'>AAA</dd>
22751 T153135: Nested language converter markup in definition list (code coverage)
22753 language=zh variant=zh-cn
22755 ;-{|zh-cn:AAA -{zh-hans|foo:bar}- -{R|bat:baz}-}-:def
22757 <dl><dt>AAA foo:bar bat:baz</dt>
22761 <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>
22762 <dd data-parsoid='{"stx":"row","dsr":[49,53,1,0]}'>def</dd>
22766 # html2wt mode disabled due to <nowiki> insertion.
22768 T153140: Don't break table handling if language converter markup is in the cell.
22770 language=sr variant=sr-ec
22771 parsoid=wt2html,wt2wt,html2html
22788 <td><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"B"}}'></span></td>
22795 Language converter tricky html2wt cases (1)
22798 parsoid=html2wt,wt2wt
22800 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"}-"}}'></span></p>
22802 -{<nowiki>}-</nowiki>}-
22809 Language converter tricky html2wt cases (2)
22812 parsoid=html2wt,wt2wt
22816 <nowiki>-{foo}-</nowiki>
22818 <p>-{foo}-
22823 Language converter tricky html2wt cases (3)
22826 parsoid=html2wt,wt2wt
22828 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"|"}}'></span></p>
22829 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"R|raw"}}'></span></p>
22830 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"-{foo}-"}}'></span></p>
22836 -{<nowiki>-{foo}-</nowiki>}-
22840 </p><p>-{foo}-
22845 Language converter tricky html2wt cases (4)
22848 parsoid=html2wt,wt2wt
22850 <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>
22858 # Note that the <nowiki> escaping added by parsoid for source text,
22859 # destination text, and language names only works on the PHP side
22860 # for *destination text*. (HTML entity escaping wouldn't work
22861 # any better.) This is probably a bug, at least for source texts.
22862 # (For language names PHP uses a precise regexp based on the languages
22863 # it currently knows have variants, which is fragile since this set
22864 # can grow/shrink over time.)
22866 Language converter tricky html2wt cases (5)
22868 language=zh variant=zh-cn
22870 <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>
22871 <p><meta typeof="mw:LanguageVariant" data-mw-variant='{"add":true,"oneway":[{"f":"A","l":"bo:g;us","t":"B"}]}'/></p>
22872 <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>
22873 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"twoway":[{"l":"bo:g;us","t":"xyz"},{"l":"zh-cn","t":"abc"}]}'></span></p>
22876 -{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
22878 -{H|A=><nowiki>bo:g;us</nowiki>:B}-
22880 -{A|zh-tw:xyz; zh-cn:<nowiki>0;zh-tw:bar</nowiki>}-
22882 -{<nowiki>bo:g;us</nowiki>:xyz; zh-cn:abc}-
22885 !! html/php+disabled
22886 <p>foobat;xyz=>zh-cn:abc
22890 </p><p>a:b=>c 0;zh-tw:bar
22895 T179579: Nowiki and lc interaction
22902 -{123<nowiki>|</nowiki>456}-
22904 <p><span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"&lt;/nowiki>123"}}' data-parsoid='{"fl":[],"src":"-{</nowiki>123}-"}'></span></p>
22906 <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>
22910 T2529: Uncovered bullet
22920 T2529: Uncovered bullet in a deeply nested list
22922 *******Foo {{bullet}}
22924 <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>
22930 T2529: Uncovered table already at line-start
22953 T2529: Uncovered bullet in parser function result
22955 *Foo {{lc:{{bullet}} }}
22963 T7678: Double-parsed template argument
22965 {{lc:{{{1}}}|hello}}
22972 T7678: Double-parsed template invocation
22974 {{lc:{{paramtest {{!}} param = hello }} }}
22976 <p>{{paramtest | param = hello }}
22981 Case insensitivity of parser functions for non-ASCII characters (T10143)
22984 title=[[Main Page]]
22986 {{PRVNÍVELKÉ:ěščř}}
22987 {{prvnívelké:ěščř}}
23007 Morwen/13: Unclosed link followed by heading
23014 <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>
23019 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
23026 <h1><span class="mw-headline" id="heading">heading</span></h1>
23031 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
23038 <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>
23053 Paragraphs inside divs (no extra line breaks)
23065 Paragraphs inside divs (extra line break on open)
23080 Paragraphs inside divs (extra line break on close)
23095 Paragraphs inside divs (extra line break on open and close)
23111 # doBlockLevels screws up this output and Remex cleans up as much as it can.
23112 # Parsoid seems to do a better job here since its p-wrapper is probably smarter.
23114 Nesting tags, paragraphs on lines which begin with <div>
23116 <div></div><strong>A
23119 <div></div><p><strong>A
23120 </strong></p><strong></strong><p><strong>B</strong>
23129 # T8200: <blockquote> should behave like <div> with respect to line breaks
23131 T8200: paragraphs inside blockquotes (no extra line breaks)
23133 <blockquote>Line one
23135 Line two</blockquote>
23137 <blockquote>Line one
23138 Line two</blockquote>
23141 <blockquote><p>Line one
23142 Line two</p></blockquote>
23146 T8200: paragraphs inside blockquotes (extra line break on open)
23151 Line two</blockquote>
23156 Line two</blockquote>
23162 Line two</p></blockquote>
23165 # Parsoid's output is broken on this because of Tidy-compatibility cruft
23167 T8200: paragraphs inside blockquotes (extra line break on close)
23169 <blockquote>Line one
23174 <blockquote>Line one
23180 <blockquote><p>Line one
23187 T8200: paragraphs inside blockquotes (extra line break on open and close)
23203 # FIXME: Why does/should the blockquote+div combo suppress p-wrapping here?
23205 Paragraphs inside blockquotes/divs (no extra line breaks)
23207 <blockquote><div>Line one
23209 Line two</div></blockquote>
23211 <blockquote><div>Line one
23212 Line two</div></blockquote>
23217 Paragraphs inside blockquotes/divs (extra line break on open)
23222 Line two</div></blockquote>
23227 Line two</div></blockquote>
23232 Paragraphs inside blockquotes/divs (extra line break on close)
23234 <blockquote><div>Line one
23237 </div></blockquote>
23239 <blockquote><div>Line one
23242 </div></blockquote>
23247 Paragraphs inside blockquotes/divs (extra line break on open and close)
23253 </div></blockquote>
23259 </div></blockquote>
23264 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
23266 wgLinkHolderBatchSize=0
23272 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
23273 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
23274 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
23279 Free external link invading image caption
23281 [[Image:Foobar.jpg|thumb|http://x|hello]]
23283 <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>
23286 <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid='{"optList":[{"ck":"thumbnail","ak":"thumb"},{"ck":"bogus","ak":"http://x"},{"ck":"caption","ak":"hello"}]}'><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":"Image:Foobar.jpg"}}'/></a><figcaption>hello</figcaption></figure>
23290 T17196: localised external link numbers
23294 [http://en.wikipedia.org/]
23296 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
23299 <p><a rel="mw:ExtLink" class="external autonumber" href="http://en.wikipedia.org/"></a></p>
23303 Multibyte character in padleft
23305 {{padleft:-Hello|7|Æ}}
23310 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:-Hello","function":"padleft"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Æ-Hello</p>
23314 Multibyte character in padright
23316 {{padright:Hello-|7|Æ}}
23321 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:Hello-","function":"padright"},"params":{"1":{"wt":"7"},"2":{"wt":"Æ"}},"i":0}}]}'>Hello-Æ</p>
23325 formatdate parser function
23327 {{#formatdate:2009-03-24}}
23329 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
23334 formatdate parser function, with default format
23336 {{#formatdate:2009-03-24|mdy}}
23338 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
23343 Spacing of numbers in formatted dates
23345 {{#formatdate:January 15}}
23347 <p><span class="mw-formatted-date" title="01-15">January 15</span>
23352 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
23354 language=nl title=[[MediaWiki:Common.css]]
23356 {{#formatdate:2009-03-24|dmy}}
23358 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
23371 Edit comment with link
23375 I like the [[Main Page]] a lot
23377 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
23381 Edit comment with link and link text
23385 I like the [[Main Page|best pages]] a lot
23387 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23391 Edit comment with link and link text with suffix
23395 I like the [[Main Page|best page]]s a lot
23397 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
23401 Edit comment with section link (non-local, eg in history list)
23403 comment title=[[Main Page]]
23405 /* External links */ removed bogus entries
23407 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23411 Edit comment with section link and text before it (non-local, eg in history list)
23413 comment title=[[Main Page]]
23415 pre-comment text /* External links */ removed bogus entries
23417 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>
23421 Edit comment with section link (local, eg in diff view)
23423 comment local title=[[Main Page]]
23425 /* External links */ removed bogus entries
23427 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
23431 Edit comment with subpage link (T16080)
23435 title=[[Subpage test]]
23437 Poked at a [[/subpage]] here...
23439 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
23443 Edit comment with subpage link and link text (T16080)
23447 title=[[Subpage test]]
23449 Poked at a [[/subpage|neat little page]] here...
23451 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
23455 Edit comment with bogus subpage link in non-subpage NS (T16080)
23458 title=[[Subpage test]]
23460 Poked at a [[/subpage]] here...
23462 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
23466 Edit comment with bare anchor link (local, as on diff)
23470 title=[[Main Page]]
23474 <a href="#section">#section</a>
23478 Edit comment with bare anchor link (non-local, as on history)
23481 title=[[Main Page]]
23485 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
23489 Anchor starting with underscore
23495 <p><a href="#_ref">One</a>
23498 <p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
23502 Id starting with underscore
23504 <div id="_ref"></div>
23506 <div id="_ref"></div>
23511 Edit comment with link with more than one pipe (T99346)
23515 [[Main Page|Many|pipes]]
23517 <a href="/wiki/Main_Page" title="Main Page">Many|pipes</a>
23521 Complex edit comment with link with more than one pipe (T99346)
23525 Created page with "<noinclude>[[Category:Requests for permissions/Bot|{{subst:#titleparts:{{subst:PAGENAME}}|1|3}}]]</noinclude> === [[User:MineoBot|]] 8=== {{Request for permissions/links|Mineo..."
23527 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..."
23531 Space normalisation on autocomment (T24784)
23534 title=[[Main Page]]
23536 /* __hello__world__ */
23538 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
23542 percent-encoding and + signs in comments (T28410)
23546 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
23548 <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>
23551 # Parsoid doesn't support this yet: see T75581
23552 # but it *should* omit the 'src' attribute if the image is bad.
23553 # PHP side of tests was disabled in
23554 # mediawiki/core:6bd31e7d95161a6e88fa86df60871051da997c3c
23555 # because of issues in the PHP parserTests infrastructure
23556 # (but the output below is indeed what the PHP side emits)
23558 Bad images - basic functionality
23561 !! html/php+disabled
23563 <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>
23567 Bad images - T18039: text after bad image disappears
23572 !! html/php+disabled
23578 <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>
23583 Verify that displaytitle works (T24501) no displaytitle
23587 wgAllowDisplayTitle=true
23588 wgRestrictDisplayTitle=false
23590 this is not the the title
23593 <p>this is not the the title
23598 Verify that displaytitle works (T24501) RestrictDisplayTitle=false
23603 wgAllowDisplayTitle=true
23604 wgRestrictDisplayTitle=false
23606 this is not the the title
23607 {{DISPLAYTITLE:whatever}}
23610 <p>this is not the the title
23615 Verify that displaytitle works (T24501) RestrictDisplayTitle=true mismatch
23620 wgAllowDisplayTitle=true
23621 wgRestrictDisplayTitle=true
23623 this is not the the title
23624 {{DISPLAYTITLE:whatever}}
23627 <p>this is not the the title
23632 Verify that displaytitle works (T24501) RestrictDisplayTitle=true matching
23637 wgAllowDisplayTitle=true
23638 wgRestrictDisplayTitle=true
23640 this is not the the title
23641 {{DISPLAYTITLE:screen}}
23644 <p>this is not the the title
23649 Verify that displaytitle works (T24501) AllowDisplayTitle=false
23654 wgAllowDisplayTitle=false
23656 this is not the the title
23657 {{DISPLAYTITLE:screen}}
23660 <p>this is not the the title
23661 <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>
23666 Verify that displaytitle works (T24501) AllowDisplayTitle=false no DISPLAYTITLE
23671 wgAllowDisplayTitle=false
23673 this is not the the title
23676 <p>this is not the the title
23681 Verify that displaytitle handles inline CSS styles (T28547) - rejected value
23686 wgAllowDisplayTitle=true
23687 wgRestrictDisplayTitle=true
23689 this is not the the title
23690 {{DISPLAYTITLE:<span style="display: none;">s</span>creen}}
23692 <span style="/* attempt to bypass $wgRestrictDisplayTitle */">s</span>creen
23693 <p>this is not the the title
23698 Verify that displaytitle handles inline CSS styles (T28547) - accepted value
23703 wgAllowDisplayTitle=true
23704 wgRestrictDisplayTitle=true
23706 this is not the the title
23707 {{DISPLAYTITLE:<span style="color: red;">s</span>creen}}
23709 <span style="color: red;">s</span>creen
23710 <p>this is not the the title
23715 Page status indicators: Empty name is invalid
23719 <indicator name=" "></indicator>
23720 <indicator></indicator>
23722 <p><span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23723 <span class="error"><strong>Error:</strong> Page status indicators' <code>name</code> attribute must not be empty.</span>
23728 Page status indicators: Weird syntaxes that are okay
23732 <indicator name="empty" />
23733 <indicator name="name"></indicator>
23742 Page status indicators: Torture test
23746 <indicator name="01">hello world</indicator>
23747 <indicator name="02">[[Main Page]]</indicator>
23748 <indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
23749 <indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
23750 <indicator name="05">*foo
23752 <indicator name="06"><nowiki>foo</nowiki></indicator>
23753 <indicator name="07"> Preformatted</indicator>
23754 <indicator name="08"><div>Broken tag</indicator>
23755 <indicator name="09">{| class=wikitable
23758 <indicator name="10">Two
23760 paragraphs</indicator>
23763 02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
23764 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" />
23765 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>
23766 05=<ul><li>foo</li>
23770 07=<pre>Preformatted
23772 08=<div>Broken tag</div>
23774 09=<table class="wikitable">
23791 preload: check <noinclude> and <includeonly>
23795 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
23801 preload: check <onlyinclude>
23805 Goodbye <onlyinclude>Hello world</onlyinclude>
23811 preload: can pass tags through if we want to
23815 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
23817 <includeonly>Hello world</includeonly>
23821 preload: check that it doesn't try to do tricks
23825 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23827 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
23831 Play a bit with r67090 and T5158
23833 <div style="width:50% !important"> </div>
23834 <div style="width:50% !important"> </div>
23835 <div style="width:50% !important"> </div>
23836 <div style="border : solid;"> </div>
23838 <div style="width:50% !important"> </div>
23839 <div style="width:50% !important"> </div>
23840 <div style="width:50% !important"> </div>
23841 <div style="border : solid;"> </div>
23844 <div style="width:50% !important" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23845 <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>
23846 <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>
23847 <div style="border : solid;" data-parsoid='{"stx":"html"}'><span typeof="mw:Entity" data-parsoid='{"srcContent":" "}'> </span></div>
23852 HTML5 data attributes
23854 <span data-foo="bar">Baz</span>
23855 <p data-abc-def_hij="">Quuz</p>
23857 <p><span data-foo="bar">Baz</span>
23859 <p data-abc-def_hij="">Quuz</p>
23862 <p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
23863 <p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
23867 Strip reserved data attributes
23869 <div data-mw="foo" data-parsoid="bar" data-mw-someext="baz" data-ok="fred" data-ooui="xyzzy" data-bad:ns="ns">d</div>
23871 <div data-ok="fred">d</div>
23874 <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>
23878 percent-encoding and + signs in internal links (T28410)
23880 [[User:+%]] [[Page+title%]]
23881 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
23882 [[%]] [[+]] [[File:%+abc%39|foo|[[bar]]]]
23883 [[%33%45]] [[%33%45+]]
23885 <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>
23886 <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>
23887 <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>
23888 <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>
23891 <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>
23892 <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>
23893 <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>
23894 <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>
23898 Special characters in embedded file links (T29679)
23900 [[File:Contains & ampersand.jpg]]
23901 [[File:Does not exist.jpg|Title with & ampersand]]
23903 <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>
23904 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
23907 <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>
23908 <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>
23912 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
23914 Text's been normalized?
23916 <p>Text's been normalized?
23921 T21052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
23923 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
23925 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
23930 T21052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
23932 [http://www.example.org/ ideograms]
23934 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
23939 T21052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
23941 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
23943 <p><img src="http://www.example.org/pic.png" alt="pic.png"/> <-- U+3000 (vim: ^Vu3000)
23967 T33098 Template which includes system messages which includes the template
23971 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23972 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
23977 T33490 Turkish: ucfirst 'blah'
23988 T33490 Turkish: ucfirst 'ix'
23999 T33490 Turkish: lcfirst 'BLAH'
24010 T33490 Turkish: ucfırst (with a dotless i)
24016 <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>
24021 T33490 ucfırst (with a dotless i) with English language
24027 <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>
24031 # Note that Parsoid doesn't emit an explicit TOC.
24032 # Note also that the html2wt direction tends to emit an extra newline
24033 # between the __TOC__ magicword and the first heading unless *both*
24034 # the <meta> and the <h2> have a data-parsoid attribute set (even if
24038 T28375: TOC with italics
24040 title=[[Main Page]]
24043 ==''Lost'' episodes==
24045 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24047 <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>
24051 <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>
24054 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24055 <h2 id="Lost_episodes" data-parsoid='{}'><i>Lost</i> episodes</h2>
24059 T28375: TOC with bold
24061 title=[[Main Page]]
24064 =='''should be bold''' then normal text==
24066 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24068 <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>
24072 <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>
24075 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24076 <h2 id="should_be_bold_then_normal_text" data-parsoid='{}'><b>should be bold</b> then normal text</h2>
24080 T35845: Headings become cursive in TOC when they contain an image
24082 title=[[Main Page]]
24085 ==Image [[Image:foobar.jpg]]==
24087 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24089 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
24093 <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>
24096 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24097 <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>
24101 T35845 (2): Headings become bold in TOC when they contain a blockquote
24103 title=[[Main Page]]
24106 ==<blockquote>Quote</blockquote>==
24108 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24110 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24114 <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>
24117 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24119 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
24123 <h2><span class="mw-headline" id="Quote"><blockquote><p>Quote</p></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>
24125 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24126 <h2 id="Quote" data-parsoid='{}'><blockquote>Quote</blockquote></h2>
24130 Unclosed tags in TOC
24132 wgFragmentMode=[ 'html5', 'legacy' ]
24134 title=[[Main Page]]
24138 <small>Hanc marginis exiguitas non caperet.</small>
24141 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24143 <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>
24147 <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>
24148 <p><small>Hanc marginis exiguitas non caperet.</small>
24152 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24153 <h2 id="Proof:_2_<_3" data-parsoid='{}'><span id="Proof:_2_.3C_3" typeof="mw:FallbackId"></span>Proof: 2 < 3</h2>
24154 <p><small>Hanc marginis exiguitas non caperet.</small>
24159 Multiple tags in TOC
24162 ==<i>Foo</i> <b>Bar</b>==
24164 ==<i>Foo</i> <blockquote>Bar</blockquote>==
24166 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24168 <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>
24169 <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>
24173 <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>
24174 <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>
24177 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24179 <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>
24180 <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>
24184 <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>
24185 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote><p>Bar</p></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>
24187 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24188 <h2 id="Foo_Bar" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <b data-parsoid='{"stx":"html"}'>Bar</b></h2>
24190 <h2 id="Foo_Bar_2" data-parsoid='{}'><i data-parsoid='{"stx":"html"}'>Foo</i> <blockquote>Bar</blockquote></h2>
24193 # Don't expect Parsoid to roundtrip this until the php parser comes closer to
24194 # html5 tag parsing.
24196 Tags with parameters in TOC
24201 ==<sup class="in-h2">Hello</sup>==
24203 ==<sup class="a > b">Evilbye</sup>==
24205 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24207 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
24208 <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>
24212 <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>
24213 <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>
24216 <meta property="mw:PageProp/toc" />
24217 <h2 id="Hello"><sup class="in-h2" data-parsoid='{"stx":"html"}'>Hello</sup></h2>
24219 <h2 id='b">Evilbye'><span id="b.22.3EEvilbye" typeof="mw:FallbackId"></span><sup class="a " data-parsoid='{"stx":"html"}'> b">Evilbye</sup></h2>
24223 span tags with directionality in TOC
24226 ==<span dir="ltr">C++</span>==
24228 ==<span dir="rtl">זבנג!</span>==
24230 ==<span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span>==
24232 ==<span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span>==
24234 ==<span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span>==
24236 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24238 <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>
24239 <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>
24240 <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>
24241 <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>
24242 <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>
24246 <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>
24247 <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>
24248 <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>
24249 <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>
24250 <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>
24253 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24254 <h2 id="C++" data-parsoid='{}'><span id="C.2B.2B" typeof="mw:FallbackId"></span><span dir="ltr">C++</span></h2>
24255 <h2 id="זבנג!"><span id=".D7.96.D7.91.D7.A0.D7.92.21" typeof="mw:FallbackId"></span><span dir="rtl">זבנג!</span></h2>
24256 <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>
24257 <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>
24258 <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>
24262 T74884: bdi element in ToC
24265 ==<bdi>test</bdi>==
24267 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24269 <li class="toclevel-1 tocsection-1"><a href="#test"><span class="tocnumber">1</span> <span class="toctext"><bdi>test</bdi></span></a></li>
24273 <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>
24276 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24277 <h2 id="test" data-parsoid='{}'><bdi>test</bdi></h2>
24281 T35715: s/strike element in ToC
24284 ==<s>test</s> test <strike>test</strike>==
24286 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24288 <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>
24292 <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>
24295 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24296 <h2 id="test_test_test" data-parsoid='{}'><s>test</s> test <strike>test</strike></h2>
24300 Empty <p> tag in TOC, removed by Sanitizer (T92892)
24305 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
24307 <li class="toclevel-1 tocsection-1"><a href="#x"><span class="tocnumber">1</span> <span class="toctext">x</span></a></li>
24311 <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>
24314 <meta property="mw:PageProp/toc" data-parsoid='{}'/>
24315 <h2 id="x" data-parsoid='{}'>x</h2>
24321 == {{int:headline_sample}} ==
24325 T34057: Title needed when expanding <h> nodes.
24327 title=[[Main Page]]
24331 <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>
24336 Strip marker in urlencode
24338 {{urlencode:x<nowiki/>y}}
24339 {{urlencode:x<nowiki/>y|wiki}}
24340 {{urlencode:x<nowiki/>y|path}}
24341 {{urlencode:x<pre id="one">two</pre>y}}
24369 Strip marker in formatNum
24371 {{formatnum:1<nowiki/>2}}
24372 {{formatnum:1<nowiki/>2|R}}
24380 Check noCommafy in formatNum
24384 {{formatnum:123456.78}}
24385 {{formatnum:123456.78|NOSEP}}
24393 Wrong option for formatNum (T58199)
24395 {{formatnum:1,234.56|Random}}
24396 {{formatnum:1,234.56|EVERYTHING}}
24397 {{formatnum:1234.56|any argument that has the string 'NOSEP'}}
24406 Strip marker in grammar
24410 {{grammar:elative|foo<nowiki/>bar}}
24417 Strip marker in padleft
24419 {{padleft:|2|x<nowiki/>y}}
24426 Strip marker in padright
24428 {{padright:|2|x<nowiki/>y}}
24435 Strip marker in anchorencode
24437 {{anchorencode:x<nowiki/>y}}
24442 <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>
24446 nowiki inside link inside heading (T20295)
24448 ==[[foo|x<nowiki>y</nowiki>z]]==
24450 <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>
24455 new support for bdi element (T33817)
24457 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24459 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
24464 Ignore pipe between table row attributes
24468 |- id=foo | style='color: red'
24476 <tr id="foo" style="color: red">
24483 Language parser function
24492 Padleft and padright (default 0-padding)
24501 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"5"}},"i":0}}]}'>00xyz</span>
24502 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"5"}},"i":0}}]}'>xyz00</span></p>
24506 Padleft and padright (partial fill)
24508 {{padleft:xyz|6|ab}}
24509 {{padright:xyz|6|ab}}
24515 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:xyz","function":"padleft"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>abaxyz</span>
24516 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:xyz","function":"padright"},"params":{"1":{"wt":"6"},"2":{"wt":"ab"}},"i":0}}]}'>xyzaba</span></p>
24520 Padleft and padright as substr
24522 {{padleft:|3|abcde}}
24523 {{padright:|3|abcde}}
24529 <p><span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padleft:","function":"padleft"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span>
24530 <span typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"padright:","function":"padright"},"params":{"1":{"wt":"3"},"2":{"wt":"abcde"}},"i":0}}]}'>abc</span></p>
24534 Special parser function
24536 {{#special:RandomPage}}
24537 {{#special:BaDtItLe}}
24538 {{#special:Foobar}}
24547 T36939 - Case insensitive link parsing ([HttP://])
24549 [HttP://MediaWiki.Org/]
24551 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
24554 <p><a rel="mw:ExtLink" class="external autonumber" href="HttP://MediaWiki.Org/"></a></p>
24558 T36939 - Case insensitive link parsing ([HttP:// title])
24560 [HttP://MediaWiki.Org/ MediaWiki]
24562 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
24567 T36939 - Case insensitive link parsing (HttP://)
24569 HttP://MediaWiki.Org/
24571 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
24574 <p><a rel="mw:ExtLink" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a></p>
24592 <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>
24593 <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>
24594 <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>
24595 <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>
24596 <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>
24602 ### Parsoid-specific tests
24603 ### Parsoid-PHP parser incompatibilities
24606 1. SOL-sensitive wikitext tokens as template-args
24608 parsoid=wt2html,wt2wt
24614 <span about="#mwt1" typeof="mw:Transclusion">
24615 </span><ul about="#mwt1"><li>a</li>
24617 <span about="#mwt2" typeof="mw:Transclusion">
24618 </span><ol about="#mwt2"><li>a</li>
24620 <span about="#mwt3" typeof="mw:Transclusion">
24621 </span><dl about="#mwt3"><dd>a</dd>
24625 #### -----------------------------------------------------------------
24626 #### Parsoid-specific functionality tests
24627 #### -----------------------------------------------------------------
24629 # T65642/T68749: Formatting elt fixup around images is cleaned up.
24630 # We know wt2wt will fail, but we expect selser to pass.
24631 # Due to the nature of our testing, wt2wt and selser tests will enter the
24632 # blacklist and we'll catch selser regressions based on changes to the
24633 # blacklist entries for selser tests.
24635 1. Bad treebuilder fixup of formatting elt is cleaned up
24637 parsoid=wt2html,wt2wt
24642 [[Image:Foobar.jpg|right|Test]]
24649 <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>
24656 2. Bad treebuilder fixup of formatting elt is cleaned up
24658 parsoid=wt2html,wt2wt
24660 '''foo[[File:Foobar.jpg|thumb|caption]]bar'''
24662 <small>[[Image:Foobar.jpg|right|300px]]</small>
24666 <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>
24668 <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>
24672 3. Bad treebuilder fixup of formatting elt is cleaned up
24674 parsoid=wt2html,wt2wt
24676 <small>'''foo[[File:Foobar.jpg|thumb|caption]]bar'''</small>
24678 <p><small><b>foo</b></small></p>
24679 <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>
24680 <p><small><b>bar</b></small></p>
24684 4. Bad treebuilder fixup of formatting elt is cleaned up: formatting tags around captionless images are ignored
24686 parsoid=wt2html,wt2wt
24688 '''<small>[[Image:Foobar.jpg|right|300px]]</small>'''
24690 <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>
24693 #### ----------------------------------------------------------------
24694 #### Parsoid-only testing of Parsoid's impl of LST
24695 #### Not implemented yet, see
24696 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
24697 #### ----------------------------------------------------------------
24699 ## We still need to support serializing the older format while content is stored.
24701 LST Sections: Backwards compatibility
24704 "suppressErrors": true,
24705 "modes": ["html2wt"]
24708 <section begin="2011-05-16" />
24709 <section end="2014-04-10 (MW 1.23wmf22)" />
24711 <p><meta typeof="mw:Extension/LabeledSectionTransclusion/begin" content="2011-05-16"/>
24712 <meta typeof="mw:Extension/LabeledSectionTransclusion/end" content="2014-04-10 (MW 1.23wmf22)"/></p>
24716 LST Sections: Newfangled approach
24718 <section begin="2011-05-16" />
24719 <section end="2014-04-10 (MW 1.23wmf22)" />
24721 <p><span typeof="mw:Extension/section" about="#mwt4" data-mw='{"name":"section","attrs":{"begin":"2011-05-16"},"body":null}'>
24723 <span typeof="mw:Extension/section" about="#mwt6" data-mw='{"name":"section","attrs":{"end":"2014-04-10 (MW 1.23wmf22)"},"body":null}'>
24727 #--------- Test stripping of empty nodes in template content ----------
24730 Empty LI and TR nodes should be stripped from template content
24735 <ul about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyLITest","href":"./Template:EmptyLITest"},"params":{},"i":0}}]}'>
24739 <table about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRTest","href":"./Template:EmptyTRTest"},"params":{},"i":0}}]}'>
24752 Empty LI and TR nodes should not be stripped from top-level content
24765 <li class='mw-empty-elt'></li>
24770 <tr class='mw-empty-elt'></tr>
24779 Empty TR nodes should not be stripped if they have any attributes set
24781 {{EmptyTRWithHTMLAttrTest}}
24783 <table about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"EmptyTRWithHTMLAttrTest","href":"./Template:EmptyTRWithHTMLAttrTest"},"params":{},"i":0}}]}'>
24784 <tr align='center'></tr>
24785 <tr><td>foo</td></tr>
24786 <tr align='center'></tr>
24787 <tr><td>bar</td></tr>
24791 #### ----------------------------------------------------------------
24792 #### The following section of tests are primarily to test
24793 #### wikitext escaping capabilities of Parsoid. Given that
24794 #### escaping can be done any number of ways, the wikitext (input)
24795 #### is always adjusted to reflect how Parsoid adds nowiki
24798 #### We are marking several tests as parsoid-only since the
24799 #### HTML in the result section is different from what the
24800 #### PHP parser generates for it.
24801 #### ----------------------------------------------------------------
24804 #### --------------- Headings ---------------
24806 #### 1. Nested inside html <h1>=foo=</h1>
24807 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
24808 #### 3. Nested inside html with wikitext split by html tags
24809 #### 4. No escape needed
24810 #### 5. Empty headings <h1></h1>
24811 #### 6. Heading chars in SOL context
24812 #### ----------------------------------------
24814 Headings: 0. Unnested
24824 <p>=foo<i>a</i>=</p>
24826 <nowiki>=foo=</nowiki>
24828 <nowiki> </nowiki>=foo=
24830 <nowiki>=foo=</nowiki>
24832 =foo''a''<nowiki>=</nowiki>
24835 # New headings and existing headings are handled differently
24837 Headings: 1. Nested inside html
24845 <h1 data-parsoid=''>=foo=</h1>
24846 <h2 data-parsoid=''>=foo=</h2>
24847 <h3 data-parsoid=''>=foo=</h3>
24848 <h4 data-parsoid=''>=foo=</h4>
24849 <h5 data-parsoid=''>=foo=</h5>
24850 <h6 data-parsoid=''>=foo=</h6>
24858 =<nowiki>=foo=</nowiki>=
24859 ==<nowiki>=foo=</nowiki>==
24860 ===<nowiki>=foo=</nowiki>===
24861 ====<nowiki>=foo=</nowiki>====
24862 =====<nowiki>=foo=</nowiki>=====
24863 ======<nowiki>=foo=</nowiki>======
24868 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
24877 <nowiki>*</nowiki>bar
24883 <nowiki>=bar=</nowiki>
24887 Headings: 3. Nested inside html with wikitext split by html tags
24891 <h1>=<b>bold</b>foo=</h1>
24893 = ='''bold'''foo= =
24897 Headings: 4a. No escaping needed (testing just h1 and h2)
24908 <h1><i>=</i>foo=</h1>
24928 Headings: 4b. No escaping needed (inside p-tags)
24945 Headings: 4c. Short headings (1)
24952 <nowiki>===</nowiki>
24958 # in the html2wt direction we emit '= = =' or '=<nowiki>=</nowiki>='
24960 Headings: 4d. Short headings (2)
24962 parsoid=wt2html,html2html
24973 <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>
24974 <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>
24975 <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>
24980 <h1 id="="><span id=".3D" typeof="mw:FallbackId"></span>=</h1>
24981 <h1 id="=="><span id=".3D.3D" typeof="mw:FallbackId"></span>==</h1>
24982 <h2 id="=_2"><span id=".3D_2" typeof="mw:FallbackId"></span>=</h2>
24986 Headings: 5. Empty headings
24990 <h1 data-parsoid='{}'></h1>
24992 <h2 data-parsoid='{}'></h2>
24994 <h3 data-parsoid='{}'></h3>
24996 <h4 data-parsoid='{}'></h4>
24998 <h5 data-parsoid='{}'></h5>
25000 <h6 data-parsoid='{}'></h6>
25010 =====<nowiki/>=====
25012 ======<nowiki/>======
25016 Headings: 6a. Heading chars in SOL context (with trailing spaces)
25026 <nowiki>=a=</nowiki>
25028 <nowiki>=a=</nowiki>
25030 <nowiki>=a=</nowiki>
25034 Headings: 6b. Heading chars in SOL context (with trailing newlines)
25047 <nowiki>=a=</nowiki>
25050 <nowiki>=a=</nowiki>
25053 <nowiki>=a=</nowiki>
25058 Headings: 6c. Heading chars in SOL context (leading newline break)
25066 <nowiki>=b=</nowiki>
25070 Headings: 6d. Heading chars in SOL context (with interspersed comments)
25074 <!--c0--><p>=a=</p>
25076 <!--c1--><p>=a=</p> <!--c2--> <!--c3-->
25078 <!--c0--><nowiki>=a=</nowiki>
25080 <!--c1--><nowiki>=a=</nowiki> <!--c2--> <!--c3-->
25084 Headings: 6d. Heading chars in SOL context (No escaping needed)
25094 Headings: 7. Insert a newline between new content and headings
25100 <h2 data-parsoid='{}'>A</h2>
25101 <p data-parsoid='{}'>a</p>
25112 Headings: Used as horizontal rule
25114 wgFragmentMode=[ 'html5', 'legacy' ]
25120 <h6><span id=".3D.3D.3D"></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=1" title="Edit section: ===">edit</a><span class="mw-editsection-bracket">]</span></span></h6>
25123 <h6 id="==="><span id=".3D.3D.3D" typeof="mw:FallbackId"></span>===</h6>
25126 #### --------------- Lists ---------------
25127 #### 0. Outside nests (*foo, etc.)
25128 #### 1. Nested inside html <ul><li>*foo</li></ul>
25129 #### 2. Inside definition lists
25130 #### 3. Only bullets at start should be escaped
25131 #### 4. No escapes needed
25132 #### 5. No unnecessary escapes
25133 #### 6. Escape bullets in SOL position
25134 #### 7. Escape bullets in a multi-line context
25135 #### ----------------------------------------
25138 Lists: 0. Outside nests
25148 <nowiki>*</nowiki>foo
25150 <nowiki>#</nowiki>foo
25152 <nowiki>;</nowiki>Foo<nowiki>:</nowiki>bar
25155 ## Making these next 3 tests Parsoid-only since they are html2wt tests
25156 ## to test wikitext escaping, and insignificant whitespace diffs
25157 ## cause PHP parser tests to barf
25159 Lists: 1. Nested inside html (No unnecessary escapes)
25168 <li data-parsoid='{}'>*foo</li>
25169 <li data-parsoid='{}'>#foo</li>
25170 <li data-parsoid='{}'>:foo</li>
25171 <li data-parsoid='{}'>;foo</li>
25179 <li data-parsoid='{}'>*foo</li>
25180 <li data-parsoid='{}'>#foo</li>
25181 <li data-parsoid='{}'>:foo</li>
25182 <li data-parsoid='{}'>;foo</li>
25189 *<nowiki>*foo</nowiki>
25190 *<nowiki>#foo</nowiki>
25191 *<nowiki>:foo</nowiki>
25192 *<nowiki>;foo</nowiki>
25198 #<nowiki>*foo</nowiki>
25199 #<nowiki>#foo</nowiki>
25200 #<nowiki>:foo</nowiki>
25201 #<nowiki>;foo</nowiki>
25205 Lists: 2. Inside definition lists
25209 <dl><dt>;foo</dt></dl>
25210 <dl><dt>:foo</dt></dl>
25213 <dl><dd>:foo</dd></dl>
25217 ; <nowiki>:foo</nowiki>
25219 ; <nowiki>:foo</nowiki>
25226 Lists: 3. Only bullets at start of text in wikitext-generated HTML should be escaped
25232 <li data-parsoid='{}'>*foo<i>it</i>*bar</li>
25236 *<nowiki>*foo</nowiki>''it''*bar
25240 Lists: 4. No escapes needed
25253 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>: bar
25257 <li><a rel="mw:WikiLink" href="Foo" title="Foo">Foo</a>*bar
25271 Lists: 5. No unnecessary escapes
25275 <ul><li> bar <span>[[foo]]</span></li></ul>
25276 <ul><li> =bar <span>[[foo]]</span></li></ul>
25277 <ul><li> [[bar <span>[[foo]]</span></li></ul>
25278 <ul><li> ]]bar <span>[[foo]]</span></li></ul>
25279 <ul><li> =bar <span>foo]]</span>=</li></ul>
25280 <ul><li> <s></s>: a</li></ul>
25281 <ul><li> <i>* foo</i></li></ul>
25284 * bar <span><nowiki>[[foo]]</nowiki></span>
25286 * =bar <span><nowiki>[[foo]]</nowiki></span>
25288 * [[bar <span><nowiki>[[foo]]</nowiki></span>
25290 * ]]bar <span><nowiki>[[foo]]</nowiki></span>
25292 * =bar <span>foo]]</span>=
25300 Lists: 6. Escape bullets in SOL position
25304 <p><!--cmt-->*foo</p>
25306 <!--cmt--><nowiki>*</nowiki>foo
25310 Lists: 7. Escape bullets in a multi-line context
25319 <nowiki>*</nowiki>b
25323 Lists: 8. Escape colons only if not present in tags
25327 <dl><dt>a:b<i>c:d</i></dt></dl>
25329 ; <nowiki>a:b</nowiki>''c:d''
25332 #### --------------- HRs ---------------
25333 #### 1. Single line
25334 #### -----------------------------------
25337 HRs: 1. Single line
25345 ----<nowiki>----</nowiki>
25350 #### --------------- Tables ---------------
25351 #### 1a. Simple example
25352 #### 1b. No escaping needed (!foo)
25353 #### 1c. No escaping needed (|foo)
25354 #### 1d. No escaping needed (|}foo)
25356 #### 2a. Nested in td (<td>foo|bar</td>)
25357 #### 2b. Nested in td (<td>foo||bar</td>)
25358 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
25360 #### 3a. Nested in th (<th>foo!bar</th>)
25361 #### 3b. Nested in th (<th>foo!!bar</th>)
25362 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
25366 #### 4c. No escaping needed
25367 #### --------------------------------------
25370 Tables: 1a. Simple example
25378 <nowiki>{|</nowiki>
25383 Tables: 1b. No escaping needed
25394 Tables: 1c. No escaping needed
25405 Tables: 1d. No escaping needed
25416 Tables: 2a. Nested in td
25421 <td>foo|bar</td></tr>
25422 <tr><td>x<div>a|b</div></td>
25426 |<nowiki>foo|bar</nowiki>
25428 |x<div><nowiki>a|b</nowiki></div>
25436 <td>x<div>a|b</div>
25437 </td></tr></tbody></table>
25441 Tables: 2b. Nested in td
25447 <td>a<i>b||c</i></td>
25448 <td>a<i><div>b||c</div></i></td>
25449 </tr></tbody></table>
25452 |<nowiki>foo||bar</nowiki>
25453 |a''<nowiki>b||c</nowiki>''
25454 |a''<div><nowiki>b||c</nowiki></div>''
25463 <td>a<i><div>b||c</div></i>
25469 Tables: 2c. Nested in td -- no escaping needed
25485 Tables: 3a. Nested in th
25501 Tables: 3b. Nested in th
25506 <tr><th>foo!!bar</th>
25507 <th><i>foo|bar</i></th>
25508 <th><i>foo!!bar</i></th>
25509 <th><i><span>foo!!bar</span></i></th>
25510 </tr></tbody></table>
25513 !<nowiki>foo!!bar</nowiki>
25514 !''<nowiki>foo|bar</nowiki>''
25515 !''<nowiki>foo!!bar</nowiki>''
25516 !''<span><nowiki>foo!!bar</nowiki></span>''
25525 <th><i>foo!!bar</i>
25527 <th><i><span>foo!!bar</span></i>
25533 Tables: 3c. Nested in th
25538 <tr><th>foo||bar</th>
25539 <th><span typeof="mw:Nowiki">foo||bar</span></th>
25540 </tr></tbody></table>
25543 !<nowiki>foo||bar</nowiki>
25544 !<nowiki>foo||bar</nowiki>
25557 Tables: 4a. Escape -
25573 |<nowiki>-bar</nowiki>
25578 Tables: 4b. Escape +
25594 |<nowiki>+bar</nowiki>
25599 Tables: 4c. No escaping needed
25604 <tr><td>foo-bar</td><td>foo+bar</td></tr>
25605 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
25611 <div>a|b</div></td>
25656 Tables: 4d. No escaping needed
25661 <tbody><tr><td><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>-bar</td>
25662 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>+1</td>
25663 <td data-parsoid='{"startTagSrc":"|","attrSepSrc":"|"}'>-2</td></tr>
25674 <td><a href="/wiki/Foo" title="Foo">Foo</a>-bar
25684 T97430: Don't emit empty nowiki pairs around marker meta tags
25688 <p>*This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25689 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.</p>
25691 <nowiki>*</nowiki>This is a long sentence here that will make the nowiki algo split up the nowikis into multiple pairs
25692 |** Make this another long long long sentence forcing the nowiki algo to split up the nowikis.
25696 Unclosed xmlish element in table line shouldn't eat end delimiters
25701 <tbody><tr><td> <foo</td>
25702 <td> bar></td></tr>
25719 #### --------------- Links ----------------
25720 #### 1. Quote marks in link text
25721 #### 2. Wikilinks: Escapes needed
25722 #### 3. Wikilinks: No escapes needed
25723 #### 4. Extlinks: Escapes needed
25724 #### 5. Extlinks: No escapes needed
25725 #### --------------------------------------
25727 Links 1. WikiLinks: No escapes needed
25731 <p><a rel="mw:WikiLink" href="Foo" title="Foo">Foo<i>boo</i></a>
25732 <a rel="mw:WikiLink" href="Foo" title="Foo">[Foobar]</a>
25733 <a rel="mw:WikiLink" href="Foo" title="Foo">x [Foobar] x</a></p>
25737 [[Foo|x [Foobar] x]]
25739 <p><a href="/wiki/Foo" title="Foo">Foo<i>boo</i></a>
25740 <a href="/wiki/Foo" title="Foo">[Foobar]</a>
25741 <a href="/wiki/Foo" title="Foo">x [Foobar] x</a>
25746 Links 2. WikiLinks: Escapes needed
25750 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
25751 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
25752 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
25753 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
25754 <a href="Foo" rel="mw:WikiLink">|Bar</a>
25755 <a href="Foo" rel="mw:WikiLink">]]bar</a>
25756 <a href="Foo" rel="mw:WikiLink">[[bar</a>
25757 <a href="Foo" rel="mw:WikiLink">x [[ y</a>
25758 <a href="Foo" rel="mw:WikiLink">x ]] y</a>
25759 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
25761 [[Foo|<nowiki>Foobar]</nowiki>]]
25762 [[Foo|x <nowiki>[http://google.com g]</nowiki> x]]
25763 [[Foo|<nowiki>[[Bar]]</nowiki>]]
25764 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
25765 [[Foo|<nowiki>|Bar</nowiki>]]
25766 [[Foo|<nowiki>]]bar</nowiki>]]
25767 [[Foo|<nowiki>[[bar</nowiki>]]
25768 [[Foo|<nowiki>x [[ y</nowiki>]]
25769 [[Foo|<nowiki>x ]] y</nowiki>]]
25770 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
25772 <p><a href="/wiki/Foo" title="Foo">Foobar]</a>
25773 <a href="/wiki/Foo" title="Foo">x [http://google.com g] x</a>
25774 <a href="/wiki/Foo" title="Foo">[[Bar]]</a>
25775 <a href="/wiki/Foo" title="Foo">x [[Bar]] x</a>
25776 <a href="/wiki/Foo" title="Foo">|Bar</a>
25777 <a href="/wiki/Foo" title="Foo">]]bar</a>
25778 <a href="/wiki/Foo" title="Foo">[[bar</a>
25779 <a href="/wiki/Foo" title="Foo">x [[ y</a>
25780 <a href="/wiki/Foo" title="Foo">x ]] y</a>
25781 <a href="/wiki/Foo" title="Foo">x ]] y [[ z</a>
25786 Links 3. WikiLinks: No escapes needed
25790 <p><a rel="mw:WikiLink" href="Foo">[Foobar</a>
25791 <a rel="mw:WikiLink" href="Foo" title="Foo">foo|bar</a></p>
25796 <p><a href="/wiki/Foo" title="Foo">[Foobar</a>
25797 <a href="/wiki/Foo" title="Foo">foo|bar</a>
25802 Links 4. ExtLinks: Escapes needed
25806 <p><a rel="mw:ExtLink" href="http://google.com">[google]</a>
25807 <a rel="mw:ExtLink" href="http://google.com">google]</a>
25808 <a rel="mw:ExtLink" href="http://google.com">goog] le</a></p>
25809 <p>[http://google.com]</p>
25810 <p>[http://google.com google]</p>
25811 <p>[<a rel="mw:ExtLink" href="http://google.com">http://google.com</a>]</p>
25812 <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>
25814 [http://google.com <nowiki>[google]</nowiki>]
25815 [http://google.com <nowiki>google]</nowiki>]
25816 [http://google.com <nowiki>goog] le</nowiki>]
25818 <nowiki>[http://google.com]</nowiki>
25820 <nowiki>[http://google.com google]</nowiki>
25822 [http://google.com<nowiki>]</nowiki>
25824 [{{echo|http://google.com}}<nowiki>]</nowiki>
25826 <p><a rel="nofollow" class="external text" href="http://google.com">[google]</a>
25827 <a rel="nofollow" class="external text" href="http://google.com">google]</a>
25828 <a rel="nofollow" class="external text" href="http://google.com">goog] le</a>
25829 </p><p>[http://google.com]
25830 </p><p>[http://google.com google]
25831 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25832 </p><p>[<a rel="nofollow" class="external free" href="http://google.com">http://google.com</a>]
25837 Links 5. ExtLinks: No escapes needed
25841 <p><a rel="mw:ExtLink" href="http://google.com">[google</a></p>
25842 <p>[<a ref="mw:ExtLink" href="http://google.com"></a>]</p>
25844 [http://google.com [google]
25846 [[http://google.com]]
25848 <p><a rel="nofollow" class="external text" href="http://google.com">[google</a>
25849 </p><p>[<a rel="nofollow" class="external autonumber" href="http://google.com">[1]</a>]
25854 Links 6. Add <nowiki/>s between text-nodes and url-links when required (T66300)
25858 <p>x<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>y
25859 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>?x
25860 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>&x
25861 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>'x
25862 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,x
25863 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.x
25864 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25865 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>:x
25866 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>;x
25867 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>!x
25868 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>=x
25869 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>(x)
25870 <a rel="mw:ExtLink" href="http://example.com(x" data-parsoid='{"stx":"url"}'>http://example.com(x</a>)
25873 x<nowiki/>http://example.com<nowiki/>y
25874 http://example.com<nowiki/>?x
25875 http://example.com<nowiki/>&x
25876 http://example.com<nowiki/>'x
25877 http://example.com<nowiki/>,x
25878 http://example.com<nowiki/>.x
25879 http://example.com<nowiki/>;x
25880 http://example.com<nowiki/>:x
25881 http://example.com<nowiki/>;x
25882 http://example.com<nowiki/>!x
25883 http://example.com<nowiki/>=x
25884 http://example.com<nowiki/>(x)
25885 http://example.com(x<nowiki/>)
25889 Links 7a. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25894 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>
25896 "<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>"
25897 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>)
25898 (<a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>) foo
25899 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>,
25900 <a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>, foo
25906 "http://example.com"
25907 (http://example.com)
25908 (http://example.com) foo
25909 http://example.com,
25910 http://example.com, foo
25913 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
25915 "<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>"
25916 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>)
25917 (<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>) foo
25918 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>,
25919 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>, foo
25924 Links 7b. Don't add spurious <nowiki/>s between text-nodes and url-links (T66300)
25928 <p><a rel="mw:ExtLink" href="http://example.com" data-parsoid='{"stx":"url"}'>http://example.com</a>.,;:!?\
25929 -<a rel="mw:ExtLink" href="http://example.com">http://example.com</a>:</p>
25931 http://example.com.,;:!?\
25932 -http://example.com:
25934 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>.,;:!?\
25935 -<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>:
25940 Links 8. Add <nowiki/>s between text-nodes and RFC-links when required (T66300)
25944 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>4
25945 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y
25946 X<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>y</p>
25950 X<nowiki/>RFC 123<nowiki/>y
25954 Links 9. Don't add spurious <nowiki/>s between text-nodes and RFC-links (T66300)
25958 <p><a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>?foo
25959 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>&foo
25960 -<a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>RFC 123</a>-
25967 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>?foo
25968 <a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>&foo
25969 -<a class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc123">RFC 123</a>-
25974 Links 10. Add <nowiki/>s between text-nodes and PMID-links when required (T66300)
25978 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>4
25979 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25980 X<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>y
25984 X<nowiki/>PMID 123<nowiki/>y
25988 Links 11. Don't add spurious <nowiki/>s between text-nodes and PMID-links (T66300)
25992 <p><a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>?foo
25993 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>&foo
25994 -<a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink" data-parsoid='{"stx":"magiclink"}'>PMID 123</a>-
26001 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>?foo
26002 <a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>&foo
26003 -<a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract">PMID 123</a>-
26008 Links 12. Add <nowiki/>s between text-nodes and ISBN-links when required (T66300)
26012 <p><a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>1
26013 <a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>x
26014 a<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>b
26017 ISBN 1234567890<nowiki/>1
26018 ISBN 1234567890<nowiki/>x
26019 a<nowiki/>ISBN 1234567890<nowiki/>b
26023 Links 13. Don't add spurious <nowiki/>s between text-nodes and ISBN-links (T66300)
26027 <p>-<a href="./Special:BookSources/1234567890" rel="mw:WikiLink" data-parsoid='{"stx":"magiclink"}'>ISBN 1234567890</a>'s
26031 <p>-<a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>'s
26036 Links 14. Protect link-like plain text. (Parsoid bug T78425)
26040 <p>this is not a link: http://example.com
26043 this is not a link: <nowiki>http://example.com</nowiki>
26047 Links 15. Link trails can't become link prefixes.
26052 <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>
26054 [[Söfnuður]]-[[00]]
26056 <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>
26060 #### --------------- Quotes ---------------
26061 #### 1. Quotes inside <b> and <i>
26062 #### 2. Link fragments separated by <i> and <b> tags
26063 #### 3. Link fragments inside <i> and <b>
26064 #### 4. No escaping needed
26065 #### --------------------------------------
26067 1a. Quotes inside <b> and <i>
26078 <b>foo'<i>bar'</i>baz</b>
26087 <i>fools'<span> errand</span></i>
26088 <i><span>fool</span>'s errand</i>
26089 '<i>foo</i> bar '<i>baz</i>
26090 a|!*#-:;+-~[]{}b'<i>x</i>
26094 ''<nowiki>''foo''</nowiki>''
26095 ''<nowiki>'''foo'''</nowiki>''
26097 '''<nowiki/>'foo''''
26098 '''<nowiki>''foo''</nowiki>'''
26099 '''<nowiki>'''foo'''</nowiki>'''
26100 '''foo'<nowiki/>''bar'<nowiki/>''baz'''
26101 '''foo'''<nowiki/>'s
26107 '''foo'''<nowiki/>'
26108 ''''foo'''<nowiki/>'
26109 ''fools'<span> errand</span>''
26110 ''<span>fool</span>'s errand''
26111 '<nowiki/>''foo'' bar '''baz''
26112 a|!*#-:;+-~[]{}b'''x''
26116 1b. Quotes inside <b> and <i> with other tags on same line
26120 '<i>a</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26121 <i>a'</i> foo <i><a rel="mw:WikiLink" href="Bar" title="Bar">bar</a></i>
26122 <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>
26123 <a rel="mw:WikiLink" href="Foo" title="Foo">foo</a> x'<i><a href="Bar" rel="mw:WikiLink" title="Bar">bar</a></i>
26124 '<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>
26125 '<i>foo</i> <div title="name">test</div>
26126 '<i>foo</i> and <br data-parsoid='{"stx":"html","noClose":true}'/> bar
26127 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
26128 <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>
26131 '''a'' foo ''[[bar]]''
26132 ''a''' foo ''[[bar]]''
26133 ''a''' foo '''{{echo|[[bar]]}}'''
26134 [[foo]] x'''[[bar]]''
26135 '''foo'' <ref>test</ref>
26136 '''foo'' <div title="name">test</div>
26137 '''foo'' and <br> bar
26142 2. Link fragments separated by <i> and <b> tags
26146 <p>[[<i>foo</i>hello]]</p>
26147 <p>[[<b>foo</b>hello]]</p>
26149 [[''foo''<nowiki>hello]]</nowiki>
26151 [['''foo'''<nowiki>hello]]</nowiki>
26154 # FIXME: Escaping one or both of [[ and ]] is also acceptable --
26155 # this is one of the shortcomings of this format
26157 3. Link fragments inside <i> and <b>
26161 <p><i>[[foo</i>]]</p>
26162 <p><b>[[foo</b>]]</p>
26164 ''[[foo''<nowiki>]]</nowiki>
26166 '''[[foo'''<nowiki>]]</nowiki>
26170 4. No escaping needed
26174 <p>'<span><i>bar</i></span>'
26175 '<span><b>bar</b></span>'
26179 '<span>''bar''</span>'
26180 '<span>'''bar'''</span>'
26184 #### ----------- Paragraphs ---------------
26185 #### 1. No unnecessary escapes
26186 #### --------------------------------------
26189 1. No unnecessary escapes
26193 <p>bar <span>[[foo]]</span>
26194 </p><p>=bar <span>[[foo]]</span>
26195 </p><p>[[bar <span>[[foo]]</span>
26196 </p><p>]]bar <span>[[foo]]</span>
26197 </p><p>=bar <span>foo]]</span>=
26200 bar <span><nowiki>[[foo]]</nowiki></span>
26202 =bar <span><nowiki>[[foo]]</nowiki></span>
26204 [[bar <span><nowiki>[[foo]]</nowiki></span>
26206 ]]bar <span><nowiki>[[foo]]</nowiki></span>
26208 =bar <span>foo]]</span><nowiki>=</nowiki>
26211 #### ----------------------- PRE --------------------------
26212 #### 1. Leading whitespace in SOL context should be escaped
26213 #### ------------------------------------------------------
26215 1. Leading whitespace in SOL context should be escaped
26238 <nowiki> </nowiki>a
26240 <nowiki> </nowiki> a
26244 <nowiki> </nowiki> a
26246 <nowiki> </nowiki>a
26249 <nowiki> </nowiki>b
26272 2. Leading whitespace in non-indent-pre contexts should not be escaped
26276 <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>
26277 <ol class="mw-references references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
26278 <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>
26288 3. Leading whitespace in indent-pre suppressing contexts should not be escaped
26307 4. Leading whitespace in indent-pre suppressing contexts should not be escaped
26311 <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>
26313 [[File:Foobar.jpg|thumb|caption]]
26317 5. Nowiki escaping should account for indent-pres
26327 T95794: nowiki escaping should account for leading space at start-of-line in an indent-pre block
26340 #### --------------- Behavior Switches --------------------
26343 1. Valid behavior switches should be escaped
26350 <nowiki>__TOC__</nowiki>
26351 ''<nowiki>__TOC__</nowiki>''
26355 2. Invalid behavior switches should not be escaped
26366 # We use indent-pre as an indirect way to test for sol-transparent behavior.
26368 Behavior switches should be SOL-transparent
26372 <meta property="mw:PageProp/toc" />
26374 <!-- this one's bogus -->
26377 <pre data-parsoid='{}'><meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/> foo</pre>
26379 <meta property="mw:PageProp/toc" data-parsoid='{"src":"__TOC__","magicSrc":"__TOC__"}'/><pre data-parsoid='{}'>bar</pre>
26383 <!-- this one's bogus -->
26392 #### --------------- HTML tags ---------------
26395 #### 3. multi-line html tag
26396 #### 4. extension tags
26397 #### -----------------------------------------
26403 <a href="http://google.com">google</a>
26405 <a href="http://google.com">google</a>
26413 <ul><li> <div>foo</div></li>
26414 <li> <div style="color:red">foo</div></li>
26415 <li> <td></li></ul>
26418 * <nowiki><div>foo</div></nowiki>
26419 * <nowiki><div style="color:red">foo</div></nowiki>
26420 * <nowiki><td></nowiki>
26424 3. multi-line html tag
26443 <p><ref>foo</ref>
26444 </p><p><ref>bar
26445 </p><p>baz</ref>
26448 <nowiki><ref>foo</ref></nowiki>
26450 <nowiki><ref>bar</nowiki>
26452 baz<nowiki></ref></nowiki>
26455 #### --------------- Others ---------------
26461 <p><nowiki>foo</nowiki>
26464 <nowiki>foo</nowiki>
26467 ## The quote-char in the input is necessary for triggering the bug
26469 (T54035) Nowiki-escaping should not get tripped by " :" in text
26478 #----------- End of wikitext escaping tests --------------
26482 Tag-like HTML structures are passed through as text
26504 </p><p>1<d e>f
26509 HTML tag with necessary entities in attributes
26511 <span title="&amp;">foo</span>
26513 <p><span title="&amp;">foo</span>
26518 HTML tag with 'unnecessary' entity encoding in attributes
26520 <span title="&">foo</span>
26522 <p><span title="&">foo</span>
26527 HTML tag with broken attribute value quoting
26529 parsoid=wt2html,html2html
26531 <span title="Hello world>Foo</span>
26533 <p><span title="Hello world">Foo</span>
26536 <p><span title="Hello world">Foo</span></p>
26540 Self-closed tag with broken attribute value quoting
26542 parsoid=wt2html,html2html
26544 <div title="Hello world />Foo
26546 <div title="Hello world"></div><p>Foo
26549 <div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
26553 Table with broken attribute value quoting
26555 parsoid=wt2html,html2html
26558 | title="Hello world|Foo
26563 <td title="Hello world">Foo
26569 <td title="Hello world">Foo
26575 Table with broken attribute value quoting on consecutive lines
26577 parsoid=wt2html,html2html
26580 | title="Hello world|Foo
26581 | style="color:red|Bar
26586 <td title="Hello world">Foo
26588 <td style="color:red">Bar
26594 <td title="Hello world">Foo
26595 </td><td style="color: red">Bar
26596 </td></tr></tbody></table>
26601 Accept empty td cell attribute
26604 | align="center" |foo|| |
26609 <td align="center">foo</td>
26616 Non-empty attributes in th-cells
26619 !Foo!! style="color: red" |Bar
26625 <th style="color: red">Bar
26631 Accept empty attributes in th-cells
26646 Empty table rows go away
26667 ### Parsoid-centric tests for testing RTing of inter-element separators
26668 ### Edge cases not tested by existing parser tests and specific to
26669 ### Parsoid-specific serialization strategies.
26673 RT-ed inter-element separators should be valid separators
26685 <tbody><tr class='mw-empty-elt' data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
26689 # Parsoid-only test of a DOM pass
26691 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
26703 <tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'><small data-parsoid='{"stx":"html","autoInsertedEnd":true}'>foo
26704 <p>bar</p></small></td></tr>
26708 <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>
26712 # Note that the "style" attribute is really a template parameter here.
26713 # The = would have to be {{=}} if you wanted the literal.
26715 Empty TD followed by TD with tpl-generated attribute
26720 |{{echo|style='color:red'}}|foo
26734 Indented table with an empty td
26752 ## We have some newline diffs RT-ing this edge case
26753 ## and it is not important enough -- we seem to be emitting
26754 ## at most 2 newlines after a </tr> and this is unrelated to
26755 ## the issue from T85627 that this is testing.
26757 Indented table with blank lines in between (T85627)
26776 Indented block & table
26790 <div data-parsoid='{"stx":"html"}'>foo</div>
26792 <tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'>foo</td></tr>
26797 Indent and comment before table row
26812 <!--hi--><tbody><tr data-parsoid='{"startTagSrc":"|-","autoInsertedEnd":true}'>
26813 <td data-parsoid='{"autoInsertedEnd":true}'> there</td></tr>
26817 # Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext
26819 Empty TR followed by a template-generated TR
26825 {{echo|<tr><td>foo</td></tr>}}
26830 <tr class='mw-empty-elt'></tr>
26831 <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}}]}'>
26836 ## PHP and parsoid output differ for this, and since this is primarily
26837 ## for testing Parsoid's serializer, marking this Parsoid only
26839 Empty TR followed by mixed-ws-comment line should RT correctly
26852 <tr class='mw-empty-elt'></tr>
26855 <!--c--> </tr><!--d-->
26861 Multi-line image caption generated by templates with/without trailing newlines
26863 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
26864 [[File:Foobar.jpg|thumb|300x300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
26866 <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>
26867 <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>
26871 New element inserted (without intervening newlines) after an old sol-transparent node should serialize correctly
26875 <meta typeof="mw:Includes/IncludeOnly" data-parsoid='{"src":"<includeonly>foo</includeonly>"}'/><meta typeof="mw:Includes/IncludeOnly/End" data-parsoid='{"src":""}'/><p>new para</p>
26877 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{}'/><h1>new heading</h1>
26879 <includeonly>foo</includeonly>
26887 ## PHP emits broken html for this, and since this is primarily
26888 ## a Parsoid serializer test, marking this Parsoid only
26890 Improperly nested inline or quotes tags with whitespace in between
26892 <span> <s>x</span> </s>
26895 <p><span> <s>x</s></span><s> </s>
26896 <b> <i>x</i></b><i> </i>
26901 Encapsulate protected attributes from wt
26903 <div typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true">foo</div>
26905 {| typeof="mw:placeholder stuff" data-mw="whoo" data-parsoid="weird" data-parsoid-other="no" about="time" rel="mw:true"
26909 <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>
26911 <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">
26912 <tbody><tr><td data-parsoid='{"autoInsertedEnd":true}'> ok</td></tr>
26916 ## Currently the p-wrapper is fragile in how it adds / removes transformations.
26917 ## Having nested or stray pre tags results in the attempt to add duplicates,
26918 ## causing an assertion fail. This test tries to prevent that situation.
26920 Ensure ParagraphWrapper can deal with stray closing pre tags
26930 1. Ensure fostered text content is wrapped in element nodes
26934 <table>hi</table><table>ho</table>
26943 2. Ensure fostered text content is wrapped in element nodes (traps regressions around fostered marker on the element getting lost)
26945 parsoid=wt2html,wt2wt
26954 <tbody><tr><td> a</td></tr>
26959 Encapsulation properly handles null DSR information from foster box
26961 parsoid=wt2html,wt2wt
26963 {{echo|<table>foo<tr><td>bar</td></tr></table>}}
26965 <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>
26969 1. Encapsulate foster-parented transclusion content
26971 parsoid=wt2wt,wt2html
26973 <table>{{echo|foo<tr><td>bar</td></tr>}}</table>
26975 <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>
26985 2. Encapsulate foster-parented transclusion content
26987 parsoid=wt2wt,wt2html
26989 <table><div>{{echo|foo}}</div><tr><td>bar</td></tr></table>
26991 <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>
27002 3. Encapsulate foster-parented transclusion content
27004 parsoid=wt2wt,wt2html
27006 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27008 <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>"]}">
27021 4. Encapsulate foster-parented transclusion content
27023 parsoid=wt2wt,wt2html
27025 <table><div><p>{{echo|foo</p></div><tr><td>}}bar</td></tr></table>
27027 <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>"]}">
27040 5. Encapsulate foster-parented transclusion content
27042 parsoid=wt2wt,wt2html
27044 <table><tr><td><div><p>{{echo|foo</p></div></td>foo}}</tr></table>
27046 <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>
27061 6. Encapsulate foster-parented transclusion content
27063 parsoid=wt2wt,wt2html
27065 <table><tr><td><div><p>{{echo|foo</p></div></td>foo</tr></table>}}<p>ok</p>
27067 <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>
27083 7. Encapsulate foster-parented transclusion content
27085 parsoid=wt2wt,wt2html
27087 <table>{{echo|<p>foo</p>}}<td>bar</td></table>
27089 <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>
27099 # Note that the wt is broken on purpose: the = should be {{=}} if you
27100 # don't want it to be a template parameter key.
27102 8. Encapsulate foster-parented transclusion content
27104 parsoid=wt2wt,wt2html
27107 }}{|{{echo|style='color:red'}}
27112 <p typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a\n"}},"i":0}}]}'>a</p>
27114 <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>
27125 9. Encapsulate foster-parented transclusion content
27127 parsoid=wt2wt,wt2html
27129 <table>{{echo|hi</table>hello}}
27131 <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>
27135 Table in fosterable position
27146 <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">
27148 <table about="#mwt1" data-parsoid='{"autoInsertedEnd":true}'></table>
27154 # Parsoid only for T66747
27156 Properly encapsulate empty-content transclusions in fosterable positions
27164 <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"}]]}'>
27170 Always encapsulate foster box when template range is expanded to table
27183 T115289: Unclosed table
27185 {{echo|<table>}}<!--c-->[[Category:Two]]
27187 <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>
27191 T115289: Don't migrate newlines out of tables with fostered content
27193 <table><td></td>{{echo|<tr>[[Category:One]]}}<!--c-->[[Category:Two]]
27195 <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>
27199 T73074: More fostering fun
27201 <table><td></td>{{echo|<tr>}}<!--c-->[[Category:Two]]
27203 <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>
27207 Support <object> element with .data attribute
27211 <object data="test.swf"></object>
27213 <object data="test.swf"></object>
27217 Don't block XML namespace declaration
27219 <span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27221 <p><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">MediaWiki</span>
27224 <p><span xmlns:dct="http://purl.org/dc/terms/" data-x-property="dct:title" data-parsoid='{"stx":"html"}'>MediaWiki</span></p>
27227 # -----------------------------------------------------------------
27228 # The following section of tests are primarily to spec requirements
27229 # around Parsoid's serialization (old, new, edited content)
27231 # All these tests are marked Parsoid html2wt and html2html only
27232 # ----------------------------------------------------------------
27235 Ignore rel attribute in a-tags during serialization to url-links
27239 <a href='http://en.wikipedia.org/wiki/Foobar'>http://en.wikipedia.org/wiki/Foobar</a>
27240 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:ExtLink'>http://en.wikipedia.org/wiki/Foobar</a>
27241 <a href='http://en.wikipedia.org/wiki/Foobar' rel='mw:WikiLink'>http://en.wikipedia.org/wiki/Foobar</a>
27243 http://en.wikipedia.org/wiki/Foobar
27244 http://en.wikipedia.org/wiki/Foobar
27245 http://en.wikipedia.org/wiki/Foobar
27248 # 'mi' is a localinterwiki prefix as well as a language
27250 Serialize interwiki links pointing to the current wiki as plain wiki links (T67869)
27254 <p><a rel="mw:ExtLink" href="http://mi.wikipedia.org/wiki/Foo">Foo</a></p>
27260 Parsoid should accept interwiki shortcuts
27264 <p><a rel='mw:WikiLink' href='./fr:Foo'>Foo</a>
27265 <a rel='mw:ExtLink' href='./fr:Foo'>Foo</a>
27266 <a href='./fr:Foo'>Foo</a></p>
27267 <p><a rel='mw:WikiLink' href='fr%3AFoo'>Foo</a>
27268 <a rel='mw:ExtLink' href='fr%3AFoo'>Foo</a>
27269 <a href='fr%3AFoo'>Foo</a></p>
27270 <p><a href='FR%3AFoo'>Foo</a>
27271 <a href='./FR:Foo'>Foo</a></p>
27286 Parsoid should not accept invalid interwiki shortcuts
27290 <p><a rel='mw:WikiLink' href='news:Foo'>Foo</a>
27291 <a rel='mw:ExtLink' href='news:Foo'>Foo</a>
27292 <a href='news:Foo'>Foo</a></p>
27301 New wikilinks should be serialized properly
27305 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{}'>Foo</a>
27306 <a rel="mw:WikiLink" href="./Foo" title="Foo">Foo</a>
27307 <a href="//en.wikipedia.org/wiki/Foo">//en.wikipedia.org/wiki/Foo</a>
27308 <a href="http://en.wikipedia.org/wiki/Foo">http://en.wikipedia.org/wiki/Foo</a>
27309 <a href="//en.wikipedia.org/wiki/Foo_bar">//en.wikipedia.org/wiki/Foo bar</a>
27313 [[:en:Foo|//en.wikipedia.org/wiki/Foo]]
27314 http://en.wikipedia.org/wiki/Foo
27315 [[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
27319 New wiki links (href variations)
27323 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27324 <a rel="mw:WikiLink" href="Foo_bar">Foo_bar</a>
27325 <a rel="mw:WikiLink" href="Foo bar">Foo_bar</a>
27326 <a rel="mw:WikiLink" href="./Toxine_bact%C3%A9rienne">Toxine bactérienne</a>
27331 [[Toxine bactérienne]]
27335 New wiki links (content string variations)
27339 <a rel="mw:WikiLink" href="./Foo_bar">Foo_bar</a>
27340 <a rel="mw:WikiLink" href="./Foo_bar">Foo bar</a>
27341 <a rel="mw:WikiLink" href="./Foo_bar">./Foo_bar</a>
27345 [[Foo_bar|./Foo_bar]]
27349 New category links (href variations)
27353 <link rel="mw:PageProp/Category" href="./Category:Toxine_bactérienne" />
27354 <link rel="mw:PageProp/Category" href="./Category:Toxine_bact%C3%A9rienne" />
27355 <link rel="mw:PageProp/Category" href="Category:Toxine_bact%C3%A9rienne" />
27357 [[Category:Toxine bactérienne]]
27358 [[Category:Toxine bactérienne]]
27359 [[Category:Toxine bactérienne]]
27363 New sol transparent links don't need indent-pre nowiki protection
27368 <link rel="mw:PageProp/redirect" href="./Main_Page">
27369 <!-- this is good --> <link rel="mw:PageProp/Category" href="./Category:Good" />
27370 <!-- this is great --> <link rel="mw:PageProp/Category" href="./Kategorie:Great" />
27372 #WEITERLEITUNG [[Main Page]]
27373 <!-- this is good --> [[Category:Good]]
27374 <!-- this is great --> [[Kategorie:Great]]
27378 New interlanguage links (href variations)
27382 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine bactérienne" />
27383 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bactérienne" />
27384 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Toxine_bact%C3%A9rienne" />
27386 [[es:Toxine bactérienne]]
27387 [[es:Toxine_bactérienne]]
27388 [[es:Toxine_bactérienne]]
27392 Image: Modifying size of an image (1)
27395 "modes": ["wt2wt"],
27397 ["img[height]", "attr", "height", "22"],
27398 ["img[width]", "attr", "width", "200"]
27402 [[Image:Foobar.jpg|230x230px]]
27404 [[Image:Foobar.jpg|200x200px]]
27408 Image: Modifying size of an image (2)
27411 "modes": ["wt2wt"],
27413 ["img[height]", "attr", "height", "100"],
27414 ["img[width]", "attr", "width", "500"]
27418 [[Image:Foobar.jpg|230x230px]]
27420 [[Image:Foobar.jpg|500x500px]]
27423 # Change in size is ignored so long as class='mw-default-size'
27425 Image: Modifying size of an image (3)
27428 "modes": ["wt2wt"],
27430 ["figure[class]", "removeClass", "mw-default-size"],
27431 ["figure img", "attr", "height", "19"],
27432 ["figure img", "attr", "width", "170"]
27436 [[Image:Foobar.jpg|thumb]]
27438 [[Image:Foobar.jpg|thumb|170x170px]]
27442 Image: Modifying alignment of an image (T50665)
27445 "modes": ["wt2wt"],
27447 ["figure[class]", "removeClass", "mw-halign-right"],
27448 ["figure[class]", "addClass", "mw-halign-left"]
27452 [[Image:Foobar.jpg|thumb|caption|right]]
27454 [[Image:Foobar.jpg|thumb|caption|left]]
27458 Image: Modifying mw-default-size of an frameless image (T64805)
27461 "modes": ["wt2wt"],
27463 ["figure.mw-default-size", "removeClass", "mw-default-size"]
27467 [[Image:Foobar.jpg|frameless|right]]
27469 [[Image:Foobar.jpg|frameless|right|220x220px]]
27473 Image: Modifying valign of an image (T51221)
27476 "modes": ["wt2wt"],
27478 ["*[typeof=\"mw:Image\"]", "removeClass", "mw-valign-middle"],
27479 ["*[typeof=\"mw:Image\"]", "addClass", "mw-valign-text-top"]
27483 [[File:Foobar.jpg|20px|middle]]
27485 [[File:Foobar.jpg|20px|text-top]]
27489 Image: Modifying alt attribute of an image (T58400)
27492 "modes": ["wt2wt"],
27494 ["img[alt]", "attr", "alt", "some alternate edited text"]
27498 [[File:Foobar.jpg|thumb|some caption|alt=some alternate text]]
27500 [[File:Foobar.jpg|thumb|some caption|alt=some alternate edited text]]
27504 Image: Modifying caption of an image
27507 "modes": ["wt2wt"],
27509 ["figcaption", "text", "new caption"]
27513 [[Image:Foobar.jpg|thumb|original caption]]
27515 [[Image:Foobar.jpg|thumb|new caption]]
27519 Image: empty alt attribute (T50924)
27523 [[File:Foobar.jpg|thumb|alt=|bar]]
27525 <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>
27529 Image: new attributes should be serialized in wiki's language for RTL languages (T53852)
27535 <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>
27537 [[Imagen:Foobar.jpg|derecha|miniaturadeimagen]]
27541 Image: Block level image should have \n before and after
27544 [[File:Foobar.jpg|right|thumb|150x150px]]
27548 <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>
27553 Image: New block level image should have \n before and after (existing content)
27556 [[File:Foobar.jpg|right|thumb|150x150px]]
27560 <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>
27565 Image: upright option (parsoid)
27567 [[File:Foobar.jpg|thumb|upright|caption]]
27568 [[File:Foobar.jpg|thumb|upright=0.5|caption]]
27569 [[File:Foobar.jpg|thumb|500x500px|upright=0.5|caption]]
27571 <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>
27572 <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>
27573 <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>
27577 Image: upright option is ignored on inline and frame images (parsoid)
27579 [[File:Foobar.jpg|500x500px|upright=0.5|caption]]
27581 <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>
27585 Image: in template parameter with empty parameter
27587 {{echo|[[File:Foobar.jpg|link=]]}}
27589 <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>
27593 Image: from basic HTML (1)
27597 <span typeof="mw:Image">
27598 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27601 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27605 Image: from basic HTML (2)
27609 <img src="./File:Foobar.jpg" width=100 height=100 alt="Alt">
27611 [[File:Foobar.jpg|link=|alt=Alt|100x100px]]
27615 Image: from basic HTML (3)
27619 <a href="Main"><img src="./File:Foobar.jpg" width=100 height=100 alt="Alt"></a>
27621 [[File:Foobar.jpg|link=Main|alt=Alt|100x100px]]
27625 Image: from basic HTML (4)
27629 <img src="./File:Foobar.jpg">
27631 [[File:Foobar.jpg|link=]]
27635 Image: Invalid title as link
27637 [[File:Foobar.jpg|link=<]]
27639 <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>
27642 <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>
27646 Lists: Serialize correctly even when list content is wrapped in p-tags (like VE does)
27651 <li><p>foo</p></li>
27658 Lists: Serialize correctly even when list tags has unneeded whitespace between tags
27662 <ul> <li>foo</li></ul>
27668 Don't strip leading whitespace when handling indent-pre suppressing tags
27673 <tr><td> indented row</td></tr>
27676 <b>This is very bold of you!</b>
27679 indented cell (no pre-wrapping!)
27689 '''This is very bold of you!'''
27693 indented cell (no pre-wrapping!)
27701 Nowiki-wrap leading whitespace when handling indent-pre inducing tags
27723 <nowiki> </nowiki></span>bar2
27726 <nowiki> </nowiki><span>bar</span>
27729 <nowiki> </nowiki><span>foo</span>
27734 Lists: Dont insert newlines in a serialized list item.
27738 <ul><li>a<br>b</li><li>c</li></ul>
27745 1. Headings: Force sol-transparent links and behavior switches to serialize before/after
27748 "modes": ["html2wt"],
27749 "scrubWikitext": false
27752 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27753 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27755 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27756 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27758 <h2 data-parsoid='{}'>howdy<link href="./Category:A5" rel="mw:PageProp/Category" /></h2>
27760 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27762 == hello there [[Category:A1]] ==
27764 == [[Category:A2]] hi pal ==
27766 == <!--foo--> [[Category:A3]] how goes it ==
27768 == it goes well [[Category:A4]] <!--bar--> ==
27770 ==howdy [[Category:A5]]==
27776 2. Headings: Force sol-transparent links and behavior switches to serialize before/after
27779 "modes": ["html2wt"],
27780 "scrubWikitext": true
27783 <h2>hello there<link href="./Category:A1" rel="mw:PageProp/Category" /></h2>
27784 <h2><link href="./Category:A2" rel="mw:PageProp/Category" />hi pal</h2>
27786 <h2><!--foo--> <link href="./Category:A3" rel="mw:PageProp/Category" /> how goes it</h2>
27787 <h2>it goes well <link href="./Category:A4" rel="mw:PageProp/Category" /> <!--bar--></h2>
27789 <h2><meta property="mw:PageProp/toc" /> ok</h2>
27797 <!--foo--> [[Category:A3]]
27802 [[Category:A4]] <!--bar-->
27810 Headings: Don't hoist metas that come from templates
27813 "modes": ["html2wt"],
27814 "scrubWikitext": true
27817 <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>
27819 == {{echo|foo [[Category:Foo]]}} ==
27823 Headings: Category in ref isn't hoisted
27826 "modes": ["html2wt"],
27827 "scrubWikitext": true
27830 <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>
27832 <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>
27835 [[Category:Baz]] </ref> ==
27841 Parsoid: Serialize positional parameters with = in them as named parameter
27845 <p about="#mwt1" typeof="mw:Transclusion"
27846 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}},"i":0}}]}'>foo</p>
27848 <p about="#mwt1" typeof="mw:Transclusion"
27849 data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"f=oo"}, "2":{"wt":"bar"}},"i":0}}]}'>foo</p>
27851 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27852 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27853 <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>
27857 {{echo|1=f=oo|2=bar}}
27859 <!--Orig params with data-parsoid has heuristics for handling = chars-->
27860 <!--FIXME: But maybe the heuristic needs fixing to apply to new params as well-->
27861 {{echo|<nowiki>f=oo</nowiki>|bar}}
27865 Parsoid: Serialize positional parameters with = in extlink as named parameter
27869 <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>
27871 {{echo|1=http://stuff?is=ok}}
27875 Parsoid: Correctly serialize block-node children when they are a combination of text and p-nodes
27879 <div>a<p>b</p></div>
27900 Substrings resembling wikitext in hrefs should not get nowiki escapes
27904 <a rel="mw:WikiLink" href="./Foo''bar''baz">Foo''bar''baz</a>
27910 Enforce single-line context in the serializer
27917 <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">
27918 </span><span about="#mwt1">you</span> </h2>
27920 <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>
27922 <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
27923 there</span></li></ol>
27935 ho </dt><dd data-parsoid='{"stx":"row"}'> hi
27942 </tbody></table></dd></dl>
27946 == hi {{bogus|there
27957 * foo '''bar''' baz
27969 Serialize new placeholder space without spans
27973 <p>foo<span typeof="mw:Placeholder"> </span>: bar</p>
27975 <p>foo<span typeof="mw:DisplaySpace mw:Placeholder" data-parsoid='{"src":" ","isDisplayHack":true}'> </span>: bar</p>
27977 <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>
27983 <ref>foo : bar</ref>ok
27987 #-----------------------
27988 # Tag minimization tests
27989 #-----------------------
27992 1. I/B quote minimization: wikitext-only tags should be combined
27996 <p><i>A</i><i>B</i></p>
27997 <p><b>A</b><b>B</b></p>
27998 <p><i>A</i><b><i>B</i></b></p>
27999 <p><b>A</b><i><b>B</b></i></p>
28000 <p><b>A</b><i><b>B</b><b>C</b></i><b>D</b></p>
28001 <p><i><b>A</b></i><i><b>B</b></i></p>
28002 <p><i><b>A</b></i><b><i>B</i></b></p>
28003 <p><b><i>A</i></b><i><b>B</b></i></p>
28023 2. I/B quote minimization: wikitext and html tags should not be combined
28027 <p><i>A</i><i data-parsoid='{"stx":"html"}'>B</i></p>
28028 <p><i>A</i><b><i data-parsoid='{"stx":"html"}'>B</i></b></p>
28032 ''A''<nowiki/>'''<i>B</i>'''
28036 3. I/B quote minimization: templated content stops minimization
28040 <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>
28041 <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>
28043 ''A''{{echo|''B''}}
28045 ''A''{{echo|'''''B'''''}}
28049 4. I/B quote minimization: new content should be mimimized with adjacent old content
28053 <p><i>A</i><i>B</i></p>
28054 <p><b>A</b><b>B</b></p>
28055 <p><i>A</i><b><i>B</i></b></p>
28065 5a. Merge adjacent quote nodes if they've been edited
28068 "modes": ["wt2wt", "selser"],
28070 ["p", "contents", "remove", ":contains('b')"]
28080 5b. Merge adjacent quote nodes if they've been edited
28083 "modes": ["wt2wt", "selser"],
28089 ''a''<span id="x">b</span>''c''
28095 1. Merge adjacent link nodes as long as at least one element is new
28098 "modes": ["html2wt"],
28099 "scrubWikitext": true
28102 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28103 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28104 <a data-parsoid="{}" rel="mw:WikiLink" href="./Football">Foot</a><a data-parsoid="{}" rel="mw:WikiLink" href="./Football">ball</a>
28108 [[Football|Foot]][[Football|ball]]
28112 2. Merge adjacent link nodes and enable additional normalizations
28115 "modes": ["html2wt"],
28116 "scrubWikitext": true
28119 <a rel="mw:WikiLink" href="./Football"><i>Foot</i></a><a rel="mw:WikiLink" href="./Football"><i>ball</i></a>
28121 [[Football|''Football'']]
28125 3. Don't merge adjacent link nodes if scrubWikitext is false
28128 "modes": ["html2wt"],
28129 "scrubWikitext": false
28132 <a rel="mw:WikiLink" href="./Football">Foot</a><a rel="mw:WikiLink" href="./Football">ball</a>
28134 [[Football|Foot]][[Football|ball]]
28137 #------------------------------
28138 # End of tag minimization tests
28139 #------------------------------
28142 T56262: New entities
28146 <span typeof="mw:Entity"> </span>
28151 ## Note that there is no wikitext output for 'unknownproperty' ##
28152 ## Unknown magic words are silently dropped ##
28159 <meta property='mw:PageProp/toc' />
28160 <meta property='mw:PageProp/notoc' />
28161 <meta property='mw:PageProp/forcetoc' />
28162 <meta property='mw:PageProp/index' />
28163 <meta property='mw:PageProp/noindex' />
28164 <meta property='mw:PageProp/nogallery' />
28165 <meta property='mw:PageProp/noeditsection' />
28166 <meta property='mw:PageProp/notitleconvert' />
28167 <meta property='mw:PageProp/nocontentconvert' />
28168 <meta property='mw:PageProp/unknownproperty' />
28178 __NOCONTENTCONVERT__
28182 Consecutive <pre>s should not get merged
28184 parsoid=html2wt,html2html
28186 <pre>a</pre><pre>b</pre>
28214 Edited ISBN links not serializable as ISBN links should serialize as wikilinks
28218 <a href="./Special:BookSources/1234567890" rel="mw:ExtLink">ISBN 1234567895</a>
28220 [[Special:BookSources/1234567890|ISBN 1234567895]]
28224 Edited RFC links not serializable as RFC links should serialize as extlinks
28228 <a href="https://tools.ietf.org/html/rfc123" rel="mw:ExtLink">New RFC</a>
28230 [https://tools.ietf.org/html/rfc123 New RFC]
28234 Edited PMID links not serializable as PMID links should serialize as extlinks
28238 <a href="//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract" rel="mw:ExtLink">New PMID</a>
28240 [//www.ncbi.nlm.nih.gov/pubmed/123?dopt=Abstract New PMID]
28244 WTS of autolinks with trailing/surrounding context
28248 <p><a href="http://cscott.net">http://cscott.net</a><b>foo</b></p>
28249 <p><a href="http://cscott.net">http://cscott.net</a><b data-parsoid='{"stx":"html"}'>foo</b></p>
28250 <p><b><a href="http://cscott.net">http://cscott.net</a></b></p>
28251 <p><b><a href="http://cscott.net">http://cscott.net</a> </b></p>
28252 <p><b><a href="http://cscott.net">http://cscott.net</a>x</b></p>
28253 <p><a href="http://cscott.net">http://cscott.net</a>x</p>
28255 http://cscott.net'''foo'''
28257 http://cscott.net<b>foo</b>
28259 '''http://cscott.net'''
28261 '''http://cscott.net '''
28263 '''http://cscott.net<nowiki/>x'''
28265 http://cscott.net<nowiki/>x
28269 WTS of autolinks with nowikis (round-trip)
28271 x<nowiki/>http://cscott.net<nowiki/>x
28273 <p>x<a rel="mw:ExtLink" class="external free" href="http://cscott.net">http://cscott.net</a>x</p>
28276 # this is the "easy" test because it leaves in place all the
28277 # data-parsoid information indicating this is an autolink
28279 WTS of autolinks with escapes (editing)
28282 "modes": ["wt2wt"],
28284 [ "span", "remove" ]
28288 x<nowiki/>http://cscott.net<nowiki/>x
28290 x<nowiki/>http://cscott.net<nowiki/>x
28294 WTS of edited autolink-like text (T103364)
28297 "modes": ["wt2wt"],
28299 [ "span[typeof]", "removeAttr", "typeof" ]
28303 Not a link: <nowiki>http://example.com</nowiki>.
28305 Not a link: <span><nowiki>http://example.com</nowiki></span>.
28309 WTS of newly-authored autolink-like text (T103364)
28313 <p>http://example.com is not a link.</p>
28315 <nowiki>http://example.com</nowiki> is not a link.
28319 WTS of autolink-like text after an autolink (T108563)
28323 <p><a rel="mw:ExtLink" href="http://example.com">http://example.com</a> http://example.com is not a link.</p>
28325 http://example.com <nowiki>http://example.com</nowiki> is not a link.
28329 Magic links inside links (not autolinked)
28331 [[Foo|http://example.com]]
28334 [[Foo|ISBN 123456789x]]
28336 [http://foo.com http://example.com]
28337 [http://foo.com RFC 1234]
28338 [http://foo.com PMID 1234]
28339 [http://foo.com ISBN 123456789x]
28341 <p><a href="/wiki/Foo" title="Foo">http://example.com</a>
28342 <a href="/wiki/Foo" title="Foo">RFC 1234</a>
28343 <a href="/wiki/Foo" title="Foo">PMID 1234</a>
28344 <a href="/wiki/Foo" title="Foo">ISBN 123456789x</a>
28345 </p><p><a rel="nofollow" class="external text" href="http://foo.com">http://example.com</a>
28346 <a rel="nofollow" class="external text" href="http://foo.com">RFC 1234</a>
28347 <a rel="nofollow" class="external text" href="http://foo.com">PMID 1234</a>
28348 <a rel="nofollow" class="external text" href="http://foo.com">ISBN 123456789x</a>
28351 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">http://example.com</a>
28352 <a rel="mw:WikiLink" href="./Foo" title="Foo">RFC 1234</a>
28353 <a rel="mw:WikiLink" href="./Foo" title="Foo">PMID 1234</a>
28354 <a rel="mw:WikiLink" href="./Foo" title="Foo">ISBN 123456789x</a></p>
28356 <p><a rel="mw:ExtLink" class="external text" href="http://foo.com">http://example.com</a>
28357 <a rel="mw:ExtLink" class="external text" href="http://foo.com">RFC 1234</a>
28358 <a rel="mw:ExtLink" class="external text" href="http://foo.com">PMID 1234</a>
28359 <a rel="mw:ExtLink" class="external text" href="http://foo.com">ISBN 123456789x</a></p>
28363 Magic links inside image captions (autolinked)
28365 [[File:Foobar.jpg|thumb|http://example.com]]
28366 [[File:Foobar.jpg|thumb|RFC 1234]]
28367 [[File:Foobar.jpg|thumb|PMID 1234]]
28368 [[File:Foobar.jpg|thumb|ISBN 123456789x]]
28370 <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 rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
28371 <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 class="external mw-magiclink-rfc" rel="nofollow" href="https://tools.ietf.org/html/rfc1234">RFC 1234</a></div></div></div>
28372 <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 class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a></div></div></div>
28373 <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/123456789X" class="internal mw-magiclink-isbn">ISBN 123456789x</a></div></div></div>
28375 <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" class="external free" href="http://example.com">http://example.com</a></figcaption></figure>
28376 <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" class="external text">RFC 1234</a></figcaption></figure>
28377 <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" class="external text">PMID 1234</a></figcaption></figure>
28378 <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>
28382 WTS of magic word text (T109371)
28387 <p><a href="http://foo.com" rel="mw:ExtLink">RFC 1234</a></p>
28388 <p><a href="./Foo" rel="mw:WikiLink">RFC 1234</a></p>
28390 <nowiki>RFC 1234</nowiki>
28392 [http://foo.com RFC 1234]
28398 Edited Redirect link should emit a non-piped wikitext link
28402 <link rel="mw:PageProp/redirect" href="Bar" data-parsoid='{"a":{"href":"./Foo"},"sa":{"href":"Foo"}}'>
28408 T75121: Infer extension name from typeOf if data-mw is not present
28410 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28412 <div typeOf="mw:Extension/foo"></div>
28417 # Note that the <p> wrapping isn't present in PHP parser output
28418 # The important thing for this test is that P-wrapping doesn't
28419 # interfere with the <nowiki> protection for leading - in <td>
28420 # (which isn't necessary for <th>).
28422 T88318: p-wrapped dash in table.
28424 parsoid=html2wt,wt2wt
28427 <tr><th><p>-</p></th><th><p>- </p></th></tr>
28428 <tr><td><p>-</p></td><td><p>- </p></td></tr>
28429 <tr><td><small>-</small></td><td><br/><p>-</p></td><td><br/>-</td></tr>
28436 |<nowiki>-</nowiki>
28437 |<nowiki>- </nowiki>
28458 <td><small>-</small>
28467 </td></tr></tbody></table>
28471 T149209: WTS: Handle newlines in table cells properly
28479 </td><td data-parsoid='{"stx":"row"}'>c</td></tr>
28481 </td><td data-parsoid='{"stx":"row", "startTagSrc": "{{!}}{{!}}"}'>y</td></tr>
28487 </th><th data-parsoid='{"stx":"row"}'>c</th></tr>
28489 </th><th data-parsoid='{"stx":"row"}'>y</th></tr>
28511 T149209: Selser: Handle newlines in table cells properly
28514 "modes": ["selser"],
28516 [ "#h1", "html", "a\nb\n" ],
28517 [ "#h2", "html", "a\nb\n" ],
28518 [ "#c1", "html", "a\nb\n" ],
28519 [ "#c2", "html", "<p>a</p>" ],
28520 [ "#c3", "html", "<p>a</p>" ],
28521 [ "#c4", "html", "edit-me<p>a</p>" ]
28526 ! id="h1" |edit-me!!1
28528 ! id="h2" |edit-me||2
28530 | id="c1" |edit-me||3
28532 | id="c2" |edit-me||4
28534 | id="c3" |edit-me||p||q||r
28536 | id="c4" |edit-me||p||q||r
28565 HTML id attribute with Parsoid-like element ids should not be serialized to wikitext
28570 <td id='mwAc'>foo</td>
28571 <td id='serialize-this'>bar</td>
28576 | id="serialize-this" |bar
28581 Parsoid-like element ids should not be serialized to wikitext unless shadowed
28585 <div id="mwAQ" data-parsoid='{"stx":"html","a":{"id":"mwAQ"},"sa":{"id":"hello"}}'>ok</div>
28587 <div id="hello">ok</div>
28594 "modes": ["wt2wt"],
28596 [ "#xyz", "before", "<b>before</b> stuff " ],
28597 [ "#xyz", "after", " stuff <i>after</i>" ],
28598 [ "#xyz", "html", "x <b>y</b> z" ]
28602 <span id="xyz">hello</span>
28604 '''before''' stuff <span id="xyz">x '''y''' z</span> stuff ''after''
28608 Never serialize a-tag as html, regardless of what data-parsoid has to say
28610 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28612 <a rel="mw:WikiLink" href="./Foo" title="Foo" data-parsoid='{"stx":"html"}'>Foo</a>
28617 ## SSS FIXME: This is broken output nevertheless.
28618 ## What might be a reasonable non-broken output for this?
28619 ## This is an edge case unlikely to be seen in production
28620 ## that I am not wasting more time on this right now.
28622 Never serialize a-tag as html, no matter what attributes it has
28624 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
28626 <a bad='true' href='http://boo.org'><img src='http://boohoo.org' /></a>
28628 [http://boo.org http://boohoo.org]
28631 # Misnested is an indication that selser can reuse the source but these have
28632 # shown to sneak through on occasion. See T101768.
28633 # The original wikitext here is: [http://test.com [[one]] two three]
28635 Strip span tags added to mark misnested links
28639 <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>
28641 [http://test.com][[one]] two three
28645 Catch regression when unpacking misnested links
28649 {{echo|hi}}[http://example.com [[ho]]]
28651 <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" class="external autonumber" href="http://example.com"></a><a rel="mw:WikiLink" href="./Ho" title="Ho" data-parsoid='{"misnested":true}'>ho</a></p>
28655 Catch regression when unpacking with trailing content
28657 {{echo|Foo <references/> bar}}
28659 <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>
28663 Use data-parsoid.firstWikitextNode to compute newline constraints for template content
28667 <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|}"]}'>
28679 ## This test verifies the presence and computation of this attribute indirectly
28680 ## by making an edit and ensuring that the serialization is correct (which it would be
28681 ## only if firstWikitextNode is properly set).
28683 data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
28686 "modes": ["wt2wt"],
28688 [ "div#x", "remove" ],
28689 [ "div", "before", "<div>new</div>" ]
28693 <div id="x">foo</div>
28695 {{echo|<div>boo</div>
28703 {{echo|<div>boo</div>
28709 # --------------------------------------------
28710 # Tests spec'ing wikitext serialization norms |
28711 # --------------------------------------------
28714 Serialize multi-line indent-pre starting with wikitext syntax
28728 1. Categories should always be serialized on their own line
28732 foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
28740 2. Categories that are part of templates should not introduce a line break
28742 foo {{echo|<span>bar</span> [[Category:baz]]}} bar
28744 <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>
28747 # Careful while editing these next 2 tests. There are \u200f characters
28748 # before and after the <link> tags in the HTML and following some
28749 # of the categories in wikitext
28750 # Do not remove these characters in edits.
28752 # As part of the serialization, these bidi characters will get stripped.
28754 RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
28757 "modes": ["html2wt"],
28758 "scrubWikitext": true
28761 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />
28762 <link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" /></p>
28765 [[קטגוריה: שיטות משפט]]
28769 RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
28772 "modes": ["html2wt"],
28773 "scrubWikitext": true
28776 <p><link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />y</p>
28783 Lists: Add space after bullets
28790 <li><span> baz</span></li>
28795 * <span> baz</span>
28799 1. Headings: Add space before/after == (T53744)
28806 <h2><span> baz</span></h2>
28814 == <span> baz</span> ==
28818 2. Headings: Add space before/after == even after hoisted content
28821 "modes": ["html2wt"],
28822 "scrubWikitext": true
28825 <h2> <link href="./Category:A2" rel="mw:PageProp/Category" />ok</h2>
28833 1. Headings: suppress newly created empty headings
28836 "modes": ["html2wt"],
28837 "scrubWikitext": true
28845 2. Headings: don't suppress empty headings if scrubWikitext is false
28855 3. Headings: suppress empty headings on edits
28858 "modes": ["selser"],
28859 "scrubWikitext": true,
28865 ==<span id="x">foo</span>==
28870 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
28873 "modes": ["html2wt"],
28874 "scrubWikitext": true
28877 <h2>foo<br/>bar</h2>
28878 <h2>foo <span><br/>bar</span> baz</h2>
28882 == foo <span> bar</span> baz ==
28886 Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
28889 "modes": ["html2wt"],
28890 "scrubWikitext": false
28893 <h2>foo<br/>bar</h2>
28895 == foo<br /> bar ==
28899 1. WT Quote Tags: suppress newly created empty style tags
28902 "modes": ["html2wt"],
28903 "scrubWikitext": true
28911 2. WT Quote Tags: don't suppress empty style tags if scrubWikitext is false
28917 ''<nowiki/>'''''<nowiki/>'''
28921 3. WT Quote Tags: suppress empty style tags on edits
28924 "modes": ["selser"],
28925 "scrubWikitext": true,
28931 '''<span id="x">foo</span>'''
28936 1. Anchors: suppress newly created empty anchors
28939 "modes": ["html2wt"],
28940 "scrubWikitext": true
28943 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28948 2. Anchors: don't suppress empty anchors if scrubWikitext is false
28951 "modes": ["html2wt"],
28952 "scrubWikitext": false
28955 <a rel="mw:WikiLink" href="./Test" title="Test"></a>
28961 3. Anchors: suppress empty anchors on edits
28964 "modes": ["selser"],
28965 "scrubWikitext": true,
28971 [[Test|<span id="x">foo</span>]]
28976 3a. Anchors: do not suppress numbered extlinks
28979 "modes": ["wt2wt"],
28980 "scrubWikitext": true
28985 <a rel="mw:ExtLink" href="http://foo.com"></a>
28989 3b. Anchors: do not suppress numbered extlinks
28992 "modes": ["wt2wt"],
28993 "scrubWikitext": true,
28999 [http://foo.com <span id="x">foo</span>]
29005 Normalizations should be restricted to edited content
29008 "modes": ["selser"],
29009 "scrubWikitext": true,
29011 [ "h1", "before", "<i></i>"]
29025 1. Multiple normalizations (html2wt)
29028 "modes": ["html2wt"],
29029 "scrubWikitext": true
29033 <p><a href='Foo' rel='mw:WikiLink'>foo<i></i>
29034 </a><b><i></i></b>x</p>
29043 2. Multiple normalizations (selser)
29046 "modes": ["selser"],
29047 "scrubWikitext": true,
29049 [ "#x", "after", "<h1><i></i></h1>\n<p> x<b></b></p>"]
29053 <span id="x">foo</span>
29055 <span id="x">foo</span>
29061 1. Indent Pre Nowiki: suppress whitespace at the start of new paragraph
29064 "modes": ["html2wt"],
29065 "scrubWikitext": true
29077 2. Indent Pre Nowiki: don't suppress whitespace at the start of new paragraph if scrubWikitext is false
29084 <nowiki> </nowiki>hi
29086 <nowiki> </nowiki> hello
29090 3. Indent Pre Nowiki: suppress whitespace after newlines in new paragraph or table cell
29093 "modes": ["html2wt"],
29094 "scrubWikitext": true
29103 baz bang</td></tr></table>
29109 bar<span>boo</span></p>
29125 bar<span>boo</span>
29129 4. Indent Pre Nowiki: suppress leading whitespace in edited paragraphs
29132 "modes": ["selser"],
29133 "scrubWikitext": true,
29135 [ "p", "html", " a\n b" ]
29146 1. New links that end in spaces
29149 "modes": ["html2wt"],
29150 "scrubWikitext": false
29153 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29154 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29155 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29157 [[Berlin ]]<nowiki/>is the capital of Germany.
29161 [[Boston ]] is a city.
29165 2. New links that end in spaces
29168 "modes": ["html2wt"],
29169 "scrubWikitext": true
29172 <p><a rel="mw:WikiLink" href="./Berlin" title="Berlin">Berlin </a>is the capital of Germany.</p>
29173 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">Foo </a><b>bar</b></p>
29174 <p><a rel="mw:WikiLink" href="./Boston" title="Boston">Boston </a> is a city.</p>
29176 [[Berlin]] is the capital of Germany.
29180 [[Boston]] is a city.
29184 1. Table cells with escapable prefixes
29187 "modes": ["html2wt"],
29188 "scrubWikitext": false
29192 <tr><td>a</td></tr>
29193 <tr><td>-</td></tr>
29194 <tr><td>+</td></tr>
29200 |<nowiki>-</nowiki>
29202 |<nowiki>+</nowiki>
29207 2. Table cells with escapable prefixes
29210 "modes": ["html2wt"],
29211 "scrubWikitext": true
29215 <tr><td>a</td></tr>
29216 <tr><td>-</td></tr>
29217 <tr><td>+</td></tr>
29230 3a. Table cells with escapable prefixes after edits
29233 "modes": ["selser"],
29234 "scrubWikitext": true,
29236 [ "table tbody tr:first-child td:first-child", "remove"]
29250 3b. Table cells with escapable prefixes after edits
29253 "modes": ["selser"],
29254 "scrubWikitext": true,
29256 [ "table tbody tr:first-child td:first-child", "html", "-" ],
29263 |<span id="x">foo</span>+
29272 # FIXME: This test will fail because
29273 # normalization doesn't realize that the id attribute
29274 # will eliminate the escapable scenario
29276 4a. Table cells without escapable prefixes after edits
29279 "modes": ["selser"],
29280 "scrubWikitext": true,
29282 [ "#x", "html", "-" ]
29295 ## This tests normalizer's ability to discriminate between
29296 ## cells having identical content.
29298 4b. Table cells without escapable prefixes after edits
29301 "modes": ["selser"],
29302 "scrubWikitext": true,
29304 [ "td", "html", "-" ]
29317 ## This tests normalizer's ability to not be tripped by
29318 ## comments (and whitespace)
29320 4c. Table cells without escapable prefixes after edits
29323 "modes": ["selser"],
29324 "scrubWikitext": true,
29326 [ "table tbody tr td:first-child", "remove" ]
29341 ## This tests normalizer's ability to handle HTML cells
29343 4d. Table cells without escapable prefixes after edits
29346 "modes": ["selser"],
29347 "scrubWikitext": true,
29349 [ "td", "html", "-" ]
29354 <tr><td>a</td></tr>
29358 <tr><td>-</td></tr>
29362 ## T111151 Remove font elements without attributes
29364 5a. font tags without attributes should be dropped in scrubWikitext mode
29367 "modes": ["html2wt"],
29368 "scrubWikitext": true
29372 <font><font>bar</font></font>
29373 <font class="x">boo</font>
29377 <font class="x">boo</font>
29381 5b. font tags should not be dropped without scrubWikitext being enabled
29384 "modes": ["html2wt"],
29385 "scrubWikitext": false
29394 Escape nowiki DOM elements
29398 <nowiki><i>foo</i></nowiki>
29400 <nowiki>''foo''</nowiki>
29403 # This is meant to be an interim fix while we go about figuring out
29404 # how to not introduce these trailing <nowiki/>s in the first place.
29406 T115717: Strip trailing <nowiki/>s (without affecting valid uses)
29410 <p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"<nowiki/>"}'/>
29412 <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>
29413 <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>
29426 # ---------------------------------------------------
29427 # End of tests spec'ing wikitext serialization norms |
29428 # ---------------------------------------------------
29432 Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
29440 <td><b>c</b><p>d</p></td>
29459 Anchor without href scenarios
29461 parsoid={ "modes": ["html2wt"], "suppressErrors": true }
29464 <a class="no">dice</a>
29469 <span name="foo"></span>
29473 New transclusion added after a list should be serialized after the list
29477 <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>
29483 # -----------------------------------------------------------------
29484 # End of section for Parsoid-only html2wt tests for serialization
29486 # -----------------------------------------------------------------
29488 # -----------------------------------------------------------------
29489 # The following section of tests are primarily to spec behavior of
29490 # the selective serializer. All these tests have manual selser
29491 # changes. The automated selser changes for all tests handle the
29492 # wide variation of changes, but these tests here capture specs
29493 # deterministically.
29494 # ----------------------------------------------------------------
29498 Selser: New comments should not be lost
29501 "modes": ["selser"],
29503 [ "#a", "after", "<!--c1-->" ],
29504 [ "#b", "before", "<!--c2-->" ]
29508 <span id="a">a</span>
29510 <span id="b">b</span>
29512 <span id="a">a</span><!--c1-->
29514 <!--c2--><span id="b">b</span>
29519 Selser: Check for validity of DSR before using it
29522 "modes": ["selser"],
29524 [ "#a", "before", "<meta property='mw:PageProp/displaytitle' content='foo'>" ]
29528 <span id="a">a</span>
29530 {{DISPLAYTITLE:foo}}
29531 <span id="a">a</span>
29535 1. DOMDiff: Changes to <ref> content should be looked up using id
29538 "modes": ["selser"],
29540 ["#X", "after", "bar"],
29541 ["#Y", "after", "baz"]
29545 X <ref><span id="X">foo</span></ref>
29548 <ref name="a"><span id="Y">foo</span></ref>
29551 X <ref><span id="X">foo</span>bar</ref>
29554 <ref name="a"><span id="Y">foo</span>baz</ref>
29559 2. DOMDiff: Changes to <ref> content should be looked up using id
29562 "modes": ["selser"],
29564 ["#Z", "after", "bar"]
29568 A <ref>foo bar for a</ref>
29569 B <ref group="X" name="b" />
29573 <references group="X">
29574 <ref name="b"><span id="Z">foo</span></ref>
29577 A <ref>foo bar for a</ref>
29578 B <ref group="X" name="b" />
29582 <references group="X">
29583 <ref name="b"><span id="Z">foo</span>bar</ref>
29588 DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388)
29591 "modes": ["selser"],
29593 [ "div:first-child", "text", "bar" ]
29597 <div style="{{1x|color:red;}}%">foo</div>
29599 <div style="{{1x|color:red;}}%">bar</div>
29611 <li class="mw-empty-elt"></li>
29612 <li class="mw-empty-elt"></li>
29619 [[File:Thumb.png|thumb]]
29621 <div class="thumb tright"><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> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Thumb.png" class="internal" title="Enlarge"></a></div></div></div></div>
29623 <figure class="mw-default-size" typeof="mw:Image/Thumb"><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>
29627 unclosed internal link XSS (T137264)
29629 [[#%3Cscript%3Ealert(1)%3C/script%3E|
29631 <p>[[#<script>alert(1)</script>|
29634 <p>[[#%3Cscript%3Ealert(1)%3C/script%3E|</p>
29638 Validating that <style> isn't eaten by tidy (T167349)
29643 <style>.foo::before { content: "<foo>"; }</style>
29644 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29648 <style>.foo::before { content: "<foo>"; }</style>
29649 <style data-mw-foobar="baz">.foo::after { content: "<bar>"; }</style>
29654 Validating that <style> isn't wrapped in a paragraph (T186965)
29658 A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29660 <style>.foo::before { content: "<foo>"; }</style>
29662 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29664 But if it's on a line with other content, let it be wrapped.
29666 <style>.foo::before { content: "<foo>"; }</style> bar
29668 foo <style>.foo::before { content: "<foo>"; }</style>
29670 foo <style>.foo::before { content: "<foo>"; }</style> bar
29672 And the same if we have non-paragraph-breaking whitespace
29675 <style>.foo::before { content: "<foo>"; }</style>
29678 <p>A style tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29680 <style>.foo::before { content: "<foo>"; }</style>
29681 <style>.foo::before { content: "<foo>"; }</style> <link rel="foo" href="bar"/><style>.foo::before { content: "<foo>"; }</style>
29682 <p>But if it's on a line with other content, let it be wrapped.
29683 </p><p><style>.foo::before { content: "<foo>"; }</style> bar
29684 </p><p>foo <style>.foo::before { content: "<foo>"; }</style>
29685 </p><p>foo <style>.foo::before { content: "<foo>"; }</style> bar
29686 </p><p>And the same if we have non-paragraph-breaking whitespace
29688 <style>.foo::before { content: "<foo>"; }</style>
29694 Validating that <link> isn't wrapped in a paragraph (T186965)
29698 A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29700 <link rel="foo" href="bar"/>
29702 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29704 But if it's on a line with other content, let it be wrapped.
29706 <link rel="foo" href="bar"/> bar
29708 foo <link rel="foo" href="bar"/>
29710 foo <link rel="foo" href="bar"/> bar
29712 And the same if we have non-paragraph-breaking whitespace
29715 <link rel="foo" href="bar"/>
29718 <p>A link tag, by itself or with other style/link tags, shouldn't be wrapped in a paragraph
29720 <link rel="foo" href="bar"/>
29721 <link rel="foo" href="bar"/> <style>.foo::before { content: "<foo>"; }</style><link rel="foo" href="bar"/>
29722 <p>But if it's on a line with other content, let it be wrapped.
29723 </p><p><link rel="foo" href="bar"/> bar
29724 </p><p>foo <link rel="foo" href="bar"/>
29725 </p><p>foo <link rel="foo" href="bar"/> bar
29726 </p><p>And the same if we have non-paragraph-breaking whitespace
29728 <link rel="foo" href="bar"/>
29734 Decoding of HTML entities in headings and links for IDs and link fragments (T103714)
29736 wgFragmentMode=[ 'html5', 'legacy' ]
29738 ==A&B&C&amp;D&amp;amp;E==
29739 [[#A&B&C&amp;D&amp;amp;E]]
29741 <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>
29742 <p><a href="#A&B&C&amp;D&amp;amp;E">#A&B&C&amp;D&amp;amp;E</a>
29745 <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>
29746 <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>
29750 Decoding of HTML entities in headings and links for IDs and link fragments (T103714) (legacy)
29752 wgFragmentMode=[ 'legacy' ]
29754 ==A&B&C&amp;D&amp;amp;E==
29755 [[#A&B&C&amp;D&amp;amp;E]]
29757 <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>
29758 <p><a href="#A.26B.26C.26amp.3BD.26amp.3Bamp.3BE">#A&B&C&amp;D&amp;amp;E</a>
29763 Decoding of HTML entities in embedded HTML tags
29765 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29767 <table class="1&2&3&amp;4&amp;amp;5"><tr><td>x</td></tr></table>
29770 <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>
29774 Decoding of HTML entities in indicator names for IDs (T104196)
29776 parsoid=wt2html,html2html
29779 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29781 1&2&3&4&amp;5=Indicator
29784 <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>
29787 # this version of the test strips out the ambiguity so Parsoid rts cleanly
29789 Decoding of HTML entities in indicator names for IDs (unambiguous) (T104196)
29793 <indicator name="1&2&3&amp;4&amp;amp;5">Indicator</indicator>
29795 1&2&3&4&amp;5=Indicator
29798 <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>
29801 # This fragment mode is what Parsoid supports.
29803 HTML5 ids: fallback to legacy
29805 wgFragmentMode=[ 'html5', 'legacy' ]
29817 ==Hey < # " > % : '==
29818 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29820 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29822 <!-- These two links should produce identical HTML -->
29823 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29826 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29828 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29829 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29830 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29831 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29832 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29833 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29837 <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>
29838 <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>
29839 <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>
29840 <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>
29841 <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>
29842 <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>
29843 <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>
29844 </p><p>💩 <span id="💩"></span>
29845 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29848 <h2 id="Foo_bar">Foo bar</h2>
29850 <h2 id="foo_Bar_2">foo Bar</h2>
29852 <h2 id="Тест"><span id=".D0.A2.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>Тест</h2>
29854 <h2 id="Тест_2"><span id=".D0.A2.D0.B5.D1.81.D1.82_2" typeof="mw:FallbackId"></span>Тест</h2>
29856 <h2 id="тест"><span id=".D1.82.D0.B5.D1.81.D1.82" typeof="mw:FallbackId"></span>тест</h2>
29858 <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>
29859 <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>
29861 <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\":[178,197,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"anchorencode:💩\",\"function\":\"anchorencode\"},\"params\":{},\"i\":0}}]}'>💩</span>"}]]}'></span></p>
29863 <!-- These two links should produce identical HTML -->
29864 <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>
29867 # Parsoid doesn't support this mode
29869 HTML5 ids: legacy with a fallback to modern
29871 wgFragmentMode=[ 'legacy', 'html5' ]
29883 ==Hey < # " > % : '==
29884 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29886 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29888 <!-- These two links should produce identical HTML -->
29889 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29892 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29894 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29895 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29896 <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>
29897 <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>
29898 <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>
29899 <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>
29903 <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>
29904 <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>
29905 <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>
29906 <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>
29907 <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>
29908 <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>
29909 <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>
29910 </p><p>.F0.9F.92.A9 <span id=".F0.9F.92.A9"></span>
29911 </p><p><a href="#.E5.95.A4.E9.85.92">#啤酒</a> <a href="#.E5.95.A4.E9.85.92">#啤酒</a>
29915 # Parsoid doesn't support this mode.
29917 HTML5 ids: no legacy
29919 wgFragmentMode=[ 'html5' ]
29931 ==Hey < # " > % : '==
29932 [[#Foo bar]] [[#foo Bar]] [[#Тест]] [[#тест]] [[#Hey < # " > % : ']]
29934 {{anchorencode:💩}} <span id="{{anchorencode:💩}}"></span>
29936 <!-- These two links should produce identical HTML -->
29937 [[#啤酒]] [[#%E5%95%A4%E9%85%92]]
29940 <div id="toc" class="toc"><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2></div>
29942 <li class="toclevel-1 tocsection-1"><a href="#Foo_bar"><span class="tocnumber">1</span> <span class="toctext">Foo bar</span></a></li>
29943 <li class="toclevel-1 tocsection-2"><a href="#foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext">foo Bar</span></a></li>
29944 <li class="toclevel-1 tocsection-3"><a href="#Тест"><span class="tocnumber">3</span> <span class="toctext">Тест</span></a></li>
29945 <li class="toclevel-1 tocsection-4"><a href="#Тест_2"><span class="tocnumber">4</span> <span class="toctext">Тест</span></a></li>
29946 <li class="toclevel-1 tocsection-5"><a href="#тест"><span class="tocnumber">5</span> <span class="toctext">тест</span></a></li>
29947 <li class="toclevel-1 tocsection-6"><a href="#Hey_<_#_"_>_%_:_'"><span class="tocnumber">6</span> <span class="toctext">Hey < # " > % : '</span></a></li>
29951 <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>
29952 <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>
29953 <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>
29954 <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>
29955 <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>
29956 <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>
29957 <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>
29958 </p><p>💩 <span id="💩"></span>
29959 </p><p><a href="#啤酒">#啤酒</a> <a href="#啤酒">#啤酒</a>
29964 T90902: Normalize weird characters in section IDs
29966 wgFragmentMode=[ 'html5', 'legacy' ]
29972 <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>
29973 <p><a href="#Foo_bar">#Foo bar</a>
29976 <h2 id="Foo_bar"> Foo<span typeof="mw:Entity" data-parsoid='{"src":"&nbsp;","srcContent":" "}'> </span>bar </h2>
29977 <p><a rel="mw:WikiLink" href="./Main_Page#Foo_bar" data-parsoid='{"stx":"simple","a":{"href":"./Main_Page#Foo_bar"},"sa":{"href":"#Foo&nbsp;bar"}}'>#Foo bar</a></p>
29981 T51672: Test for brackets in attributes of elements in external link texts
29983 [http://example.com/ link <span title="title with [brackets]">span</span>]
29984 [http://example.com/ link <span title="title with [brackets]">span</span>]
29987 <p><a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
29988 <a rel="nofollow" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
29991 <p><a rel="mw:ExtLink" class="external text" href="http://example.com/">link <span title="title with [brackets]">span</span></a>
29992 <a rel="mw:ExtLink" class="external text" 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>
29996 T72875: Test for brackets in attributes of elements in internal link texts
29998 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
29999 [[Foo|link <span title="title with [[double brackets]]">span</span>]]
30002 <p><a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30003 <a href="/wiki/Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30006 <p><a rel="mw:WikiLink" href="./Foo" title="Foo">link <span title="title with [[double brackets]]">span</span></a>
30007 <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>
30011 T179544: {{anchorencode:}} output should be always usable in links
30013 wgFragmentMode=[ 'html5' ]
30015 <span id="{{anchorencode:[foo]}}"></span>[[#{{anchorencode:[foo]}}]]
30017 <p><span id="[foo]"></span><a href="#[foo]">#[foo]</a>
30020 <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>
30023 ## ------------------------------
30024 ## Parsoid section-wrapping tests
30025 ## ------------------------------
30027 Section wrapping for well-nested sections (no leading content)
30030 "wrapSections": true
30051 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30054 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30057 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30060 </section><section data-mw-section-id="4"><h2 id="2.2">2.2</h2>
30063 <section data-mw-section-id="5"><h3 id="2.2.1">2.2.1</h3>
30066 </section></section></section><section data-mw-section-id="6"><h1 id="3">3</h1>
30073 Section wrapping for well-nested sections (with leading content)
30076 "wrapSections": true
30081 Para 2 with a <div>nested in it</div>
30094 <section data-mw-section-id="0"><p>Para 1.</p>
30096 <p>Para 2 with a </p><div>nested in it</div>
30100 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30103 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30106 <section data-mw-section-id="3"><h2 id="2.1">2.1</h2>
30109 </section></section>
30113 Section wrapping with template-generated sections (good nesting 1)
30116 "wrapSections": true
30133 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30136 <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">
30137 </span><p about="#mwt1">b</p>
30138 </section><section data-mw-section-id="3"><h2 id="1.2">1.2</h2>
30141 </section></section><section data-mw-section-id="4"><h1 id="2">2</h1>
30145 # In this example, the template scope is mildly expanded to incorporate the
30146 # trailing newline after the transclusion since that is part of section 1.1.1
30148 Section wrapping with template-generated sections (good nesting 2)
30151 "wrapSections": true,
30152 "modes": ["wt2html", "wt2wt"]
30167 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30170 <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">
30171 </span><p about="#mwt1">b</p><span about="#mwt1">
30172 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.1.1">1.1.1</h3><span about="#mwt1">
30173 </span><p about="#mwt1">d</p><span about="#mwt1">
30174 </span></section></section></section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="2">2</h1>
30178 # In this example, the template scope is mildly expanded to incorporate the
30179 # trailing newline after the transclusion since that is part of section 1.2.1
30181 Section wrapping with template-generated sections (good nesting 3)
30184 "wrapSections": true,
30185 "modes": ["wt2html", "wt2wt"]
30203 <section data-mw-section-id="0"></section><section data-mw-section-id="1" data-parsoid="{}"><h1 id="1"> 1 </h1>
30206 <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">
30207 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.1">1.1</h2><span about="#mwt1">
30208 </span><p about="#mwt1">b</p><span about="#mwt1">
30209 </span></section><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="1.2">1.2</h2><span about="#mwt1">
30210 </span><p about="#mwt1">c</p><span about="#mwt1">
30211 </span><section data-mw-section-id="-1" about="#mwt1"><h3 about="#mwt1" id="1.2.1">1.2.1</h3><span about="#mwt1">
30212 </span><p about="#mwt1">d</p><span about="#mwt1">
30213 </span></section></section></section><section data-mw-section-id="5"><h1 id="2">2</h1>
30217 # Because of section-wrapping and template-wrapping interactions,
30218 # the scope of the template is expanded so that the template markup
30219 # is valid in the presence of <section> tags.
30220 # This exercises the s1 is null scenario in the wrapSections code
30222 Section wrapping with template-generated sections (bad nesting 1)
30225 "wrapSections": true
30239 <section data-mw-section-id="-1"></section><section data-mw-section-id="-2"><div data-parsoid='{"stx":"html"}'>
30242 <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"]}'>
30243 </span><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="1">1</h1><span about="#mwt1">
30244 </span><p about="#mwt1">b
30245 </p><span about="#mwt1">
30247 </span><p about="#mwt1">c</p><span about="#mwt1">
30248 </span></section></div></section>
30251 # Because of section-wrapping and template-wrapping interactions,
30252 # the scope of the template is expanded so that the template markup
30253 # is valid in the presence of <section> tags.
30254 # This exercises the s1 is ancestor of s2 scenario in the wrapSections code
30256 Section wrapping with template-generated sections (bad nesting 2)
30259 "wrapSections": true
30277 <section data-mw-section-id="0"></section><section data-mw-section-id="1"><h1 id="1">1</h1>
30280 </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">
30281 </span><p about="#mwt1">b</p><span about="#mwt1">
30282 </span><section data-mw-section-id="-1" about="#mwt1"><h2 about="#mwt1" id="2.1">2.1</h2><span about="#mwt1">
30283 </span><p about="#mwt1">c</p><span about="#mwt1">
30285 </span><p about="#mwt1">d</p><span about="#mwt1">
30287 </span></section></section><section data-mw-section-id="4"><h1 id="3">3</h1>
30291 # Because of section-wrapping and template-wrapping interactions,
30292 # additional template wrappers are added to <section> tags
30293 # so that template wrapping semantics are valid whether section
30294 # tags are retained or stripped. But, the template scope can expand
30295 # greatly when accounting for section tags.
30296 # This exercises the s1 and s2 are in different subtrees scenario
30298 Section wrapping with template-generated sections (bad nesting 3)
30301 "wrapSections": true,
30302 "modes": ["wt2html", "wt2wt"]
30320 <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>
30323 <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">
30324 </span><p about="#mwt1">b</p><span about="#mwt1">
30325 </span></section></section><section data-mw-section-id="-1" about="#mwt1"><h1 about="#mwt1" id="2">2</h1><span about="#mwt1">
30326 </span><p about="#mwt1">c</p>
30329 </section><section data-mw-section-id="4" data-parsoid="{}"><h1 id="3">3</h1>
30334 Section wrapping with uneditable lead section + div wrapping multiple sections
30337 "wrapSections": true
30342 <div style="border:1px solid red;">
30359 <section data-mw-section-id="-1"><p>foo</p>
30361 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30362 <section data-mw-section-id="1"><h1 id="1">1</h1>
30365 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30368 </section></section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30372 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30375 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30377 </section></section>
30381 Section wrapping with editable lead section + div overlapping multiple sections
30384 "wrapSections": true
30391 <div style="border:1px solid red;">
30408 <section data-mw-section-id="0"><p>foo</p>
30410 </section><section data-mw-section-id="-1"><h1 id="1">1</h1>
30412 </section><section data-mw-section-id="-2"><div style="border:1px solid red;">
30415 <section data-mw-section-id="2"><h2 id="1.1">1.1</h2>
30418 </section><section data-mw-section-id="-1"><h1 id="2">2</h1>
30423 </section><section data-mw-section-id="4"><h1 id="3">3</h1>
30426 <section data-mw-section-id="5"><h2 id="3.1">3.1</h2>
30428 </section></section>
30432 HTML header tags should not be wrapped in section tags
30435 "wrapSections": true
30448 <section data-mw-section-id="0"><p>foo</p>
30450 <h1 id="a" data-parsoid='{"stx":"html"}'>a</h1>
30452 </section><section data-mw-section-id="1"><h1 id="b">b</h1>
30454 <h1 id="c" data-parsoid='{"stx":"html"}'>c</h1>
30456 </section><section data-mw-section-id="2"><h1 id="d">d</h1></section>
30460 Lead section containing only whitespace and comments.
30463 "wrapSections": true
30467 <!-- this is a comment, presumably significant to editors -->
30474 <section data-mw-section-id="0" data-parsoid="{}">
30475 <!-- this is a comment, presumably significant to editors -->
30476 </section><section data-mw-section-id="1"><h1 id="1">1</h1>
30479 </section><section data-mw-section-id="2"><h1 id="2">2</h1>
30484 Pseudo-sections emitted by templates should have id -2
30487 "wrapSections": true
30497 <section data-mw-section-id="-1"><p>foo</p>
30498 </section><section data-mw-section-id="-2"><div about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"stx":"html","pi":[[{"k":"1"}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<div>\n==a==\n==b==\n</div>\n"}},"i":0}}]}'>
30499 <section data-mw-section-id="-1"><h2 id="a">a</h2>
30500 </section><section data-mw-section-id="-1"><h2 id="b">b</h2>
30501 </section></div><span about="#mwt1">
30505 ##########################################################################
30506 Tests demonstrating white-space insensitivity in input wikitext
30507 for wikitext headings, wikitext list items, and wikitext table captions,
30508 headings, and cells. HTML versions of the same should preserve whitespace.
30509 ##########################################################################
30511 Trim whitespace in wikitext headings, list items, table captions, headings, and cells
30514 == <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> ==
30515 * <!--c1--> <!--c2--> List item <!--c3--> <!--c4-->
30516 ; <!--term to define--> term : <!--term's definition--> definition
30518 |+ <!--c1--> <!--c2--> Table Caption <!--c3--> <!--c4-->
30520 ! <!--c1--> <!--c2--> Table Heading 1 <!--c3--> <!--c4--> !! Table Heading 2 <!--c5-->
30522 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30524 | class="foo" || <!--c1--> <!--c2--> Table Cell 3 <!--c3--> <!--c4-->
30526 | <!--c1--> testing [[one|two]] <!--c2--> | <!--c3--> some content
30529 | <!--c1--> <!--c2--> Table Cell 1 <!--c3--> <!--c4--> || Table Cell 2 <!--c5-->
30532 <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>
30533 <ul><li>List item</li></ul>
30534 <dl><dt>term </dt>
30535 <dd>definition</dd></dl>
30537 <caption>Table Caption
30540 <th>Table Heading 1</th>
30541 <th>Table Heading 2
30544 <td>Table Cell 1</td>
30548 <td>class="foo"</td>
30552 <td>testing <a href="/index.php?title=One&action=edit&redlink=1" class="new" title="One (page does not exist)">two</a> | some content
30553 </td></tr></tbody></table>
30556 <td>Table Cell 1</td>
30558 </td></tr></tbody></table> foo</dd></dl>
30561 # Looks like <caption> is not accepted in HTML
30563 Do not trim whitespace in HTML headings, list items, table captions, headings, and cells
30566 <h2> <!--c1--> <!--c2--> Heading <!--c3--> <!--c4--> <h2>
30567 <ul><li> <!--c1--> <!--c2--> List item <!--c3--> <!--c4--> </li></ul>
30569 <tr><th> <!--c1--> <!--c2--> Table Heading <!--c3--> <!--c4--> <th></tr>
30570 <tr><td> <!--c1--> <!--c2--> Table Cell <!--c3--> <!--c4--> <th></tr>
30573 <h2> Heading </h2><h2>
30574 <ul><li> List item </li></ul>
30576 <tbody><tr><th> Table Heading </th><th></th></tr>
30577 <tr><td> Table Cell </td><th></th></tr>
30583 Do not trim whitespace in links and quotes
30585 foo '' <!--c1--> italic <!--c2--> '' and ''' <!--c3--> bold <!--c4--> '''
30586 [[Foo| some text ]]
30588 <p>foo <i> italic </i> and <b> bold </b>
30589 <a href="/wiki/Foo" title="Foo"> some text </a>