1 # MediaWiki Parser test cases
2 # Some taken from http://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 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # title=[[XXX]] run test using article title XXX
20 # disabled do not run test
22 # For testing purposes, temporary articles can created:
23 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
24 # where '/' denotes a newline.
26 # This is the standard article assumed to exist.
46 This is a simple paragraph.
48 <p>This is a simple paragraph.
68 * plain''italic''plain
69 * plain''italic''plain''italic''plain
70 * plain'''bold'''plain
71 * plain'''bold'''plain'''bold'''plain
72 * plain''italic''plain'''bold'''plain
73 * plain'''bold'''plain''italic''plain
74 * plain''italic'''bold-italic'''italic''plain
75 * plain'''bold''bold-italic''bold'''plain
76 * plain'''''bold-italic'''italic''plain
77 * plain'''''bold-italic''bold'''plain
78 * plain''italic'''bold-italic'''''plain
79 * plain'''bold''bold-italic'''''plain
80 * plain l'''italic''plain
83 </li><li> plain<i>italic</i>plain
84 </li><li> plain<i>italic</i>plain<i>italic</i>plain
85 </li><li> plain<b>bold</b>plain
86 </li><li> plain<b>bold</b>plain<b>bold</b>plain
87 </li><li> plain<i>italic</i>plain<b>bold</b>plain
88 </li><li> plain<b>bold</b>plain<i>italic</i>plain
89 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
90 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
91 </li><li> plain<i><b>bold-italic</b>italic</i>plain
92 </li><li> plain<b><i>bold-italic</i>bold</b>plain
93 </li><li> plain<i>italic<b>bold-italic</b></i>plain
94 </li><li> plain<b>bold<i>bold-italic</i></b>plain
95 </li><li> plain l'<i>italic</i>plain
101 ### <nowiki> test cases
105 <nowiki> unordered list
107 <nowiki>* This is not an unordered list item.</nowiki>
109 <p>* This is not an unordered list item.
116 <nowiki>Lorem ipsum dolor
137 :There is not nowiki.
138 :There is <nowiki>nowiki</nowiki>.
140 #There is not nowiki.
141 #There is <nowiki>nowiki</nowiki>.
143 *There is not nowiki.
144 *There is <nowiki>nowiki</nowiki>.
146 <dl><dd>There is not nowiki.
147 </dd><dd>There is nowiki.
149 <ol><li>There is not nowiki.
150 </li><li>There is nowiki.
152 <ul><li>There is not nowiki.
153 </li><li>There is nowiki.
159 ### comment test cases
164 <!-- comment 1 --> asdf
200 asdf<!-- comment 1 -->jkl
210 <!-- foo --> b <!-- bar -->
222 ### Preformatted text
231 And a [[Main Page|link]]
237 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
249 <dl><dt> name </dt><dd> Definition
259 <dl><dd> Indented text
265 Definition list with no space
269 <dl><dt>name</dt><dd>Definition
275 Definition list with URL link
277 ; http://example.com/ : definition
279 <dl><dt> <a href="http://example.com/" class='external free' title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
285 Definition list with bracketed URL link
287 ;[http://www.google.com/ Google]:Number one search engine
289 <dl><dt><a href="http://www.google.com/" class='external text' title="http://www.google.com/" rel="nofollow">Google</a></dt><dd>Number one search engine
295 Definition list with wikilink containing colon
297 ; [[Wikipedia:FAQ]]: The least-read page on Wikipedia
299 <dl><dt> <a href="/index.php?title=Wikipedia:FAQ&action=edit" class="new" title="Wikipedia:FAQ">Wikipedia:FAQ</a></dt><dd> The least-read page on Wikipedia
304 # At Brion's and JeLuF's insistence... :)
306 Definition list with wikilink containing colon
308 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
310 <dl><dt> <a href="news:alt.wikipedia.rox" class='external free' title="news:alt.wikipedia.rox" rel="nofollow">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
316 Malformed definition list with colon
318 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
320 <dl><dt> <a href="news:alt.wikipedia.rox" class='external free' title="news:alt.wikipedia.rox" rel="nofollow">news:alt.wikipedia.rox</a> — don't crash or enter an infinite loop
326 Definition lists: colon in external link text
328 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
330 <dl><dt> <a href="http://www.wikipedia2.org/" class='external text' title="http://www.wikipedia2.org/" rel="nofollow">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up
340 External links: non-bracketed
342 Non-bracketed: http://example.com
344 <p>Non-bracketed: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
349 External links: numbered
351 Numbered: [http://example.com]
353 <p>Numbered: <a href="http://example.com" class='external autonumber' title="http://example.com" rel="nofollow">[1]</a>
358 External links: specified text
360 Specified text: [http://example.com link]
362 <p>Specified text: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>
367 External links: trail
369 Trail (not sure if this is meant to work): [http://example.com link]s
371 <p>Trail (not sure if this is meant to work): <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>s
376 External links: dollar sign in URL
378 http://example.com/1$2345
380 <p><a href="http://example.com/1$2345" class='external free' title="http://example.com/1$2345" rel="nofollow">http://example.com/1$2345</a>
385 External links: dollar sign in URL (named)
387 [http://example.com/1$2345]
389 <p><a href="http://example.com/1$2345" class='external autonumber' title="http://example.com/1$2345" rel="nofollow">[1]</a>
396 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
398 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
403 External image from https
405 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
407 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
412 Link to non-http image, no img tag
414 Link to non-http image, no img tag: ftp://example.com/test.jpg
416 <p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class='external free' title="ftp://example.com/test.jpg" rel="nofollow">ftp://example.com/test.jpg</a>
421 External links: terminating separator
423 Terminating separator: http://example.com/thing,
425 <p>Terminating separator: <a href="http://example.com/thing" class='external free' title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
430 External links: intervening separator
432 Intervening separator: http://example.com/1,2,3
434 <p>Intervening separator: <a href="http://example.com/1,2,3" class='external free' title="http://example.com/1,2,3" rel="nofollow">http://example.com/1,2,3</a>
439 External links: old bug with URL in query
441 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
443 <p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class='external text' title="http://example.com/thing?url=http://example.com" rel="nofollow">link</a>
448 External links: old URL-in-URL bug, mixed protocols
450 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
452 <p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class='external text' title="ftp://example.com?url=http://example.com" rel="nofollow">link</a>
457 External links: URL in text
459 URL in text: [http://example.com http://example.com]
461 <p>URL in text: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
466 External links: Clickable images
468 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
470 <p>ja-style clickable images: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a>
475 External links: raw ampersand
477 Old & use: http://x&y
479 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
484 External links: encoded ampersand
486 Old & use: http://x&y
488 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
493 External links: [raw ampersand]
495 Old & use: [http://x&y]
497 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
502 External links: [encoded ampersand]
504 Old & use: [http://x&y]
506 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
511 External links: www.jpeg.org (bug 554)
515 <p><a href="http://www.jpeg.org" class='external free' title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
520 External links: URL within URL (original bug 2)
522 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
524 <p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class='external autonumber' title="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" rel="nofollow">[1]</a>
529 BUG 361: URL inside bracketed URL
531 [http://www.example.com/foo http://www.example.com/bar]
533 <p><a href="http://www.example.com/foo" class='external text' title="http://www.example.com/foo" rel="nofollow">http://www.example.com/bar</a>
538 BUG 361: URL within URL, not bracketed
540 http://www.example.com/foo?=http://www.example.com/bar
542 <p><a href="http://www.example.com/foo?=http://www.example.com/bar" class='external free' title="http://www.example.com/foo?=http://www.example.com/bar" rel="nofollow">http://www.example.com/foo?=http://www.example.com/bar</a>
547 BUG 289: ">"-token in URL-tail
549 http://www.example.com/<hello>
551 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
556 BUG 289: literal ">"-token in URL-tail
558 http://www.example.com/<b>html</b>
560 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><b>html</b>
565 BUG 289: ">"-token in bracketed URL
567 [http://www.example.com/<hello> stuff]
569 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
574 BUG 289: literal ">"-token in bracketed URL
576 [http://www.example.com/<b>html</b> stuff]
578 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
583 BUG 289: literal double quote at end of URL
585 http://www.example.com/"hello"
587 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
592 BUG 289: literal double quote in bracketed URL
594 [http://www.example.com/"hello" stuff]
596 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
601 External links: invalid character
603 [http://www.example.com
\0 test]
605 <p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a>
\0 test]
616 Normal text. '''Bold text.''' Normal text. ''Italic text.''
618 Normal text. '''''Bold italic text.''''' Normal text.
620 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
621 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
627 Unclosed and unmatched quotes
629 '''''Bold italic text '''with bold deactivated''' in between.'''''
631 '''''Bold italic text ''with italic deactivated'' in between.'''''
635 ..spanning two paragraphs (should not work).'''
637 '''Bold tag left open
639 ''Italic tag left open
643 <!-- Unmatching number of opening, closing tags: -->
644 '''This year''''s election ''should'' beat '''last year''''s.
646 ''Tom'''s car is bigger than ''Susan'''s.
648 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
649 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
650 </p><p><b>Bold text..</b>
651 </p><p>..spanning two paragraphs (should not work).<b></b>
652 </p><p><b>Bold tag left open</b>
653 </p><p><i>Italic tag left open</i>
655 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
656 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
663 ### content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
687 {| border="1" cellpadding="2"
688 |+Multiplication table
690 ! × !! 1 !! 2 !! 3
708 <table border="1" cellpadding="2">
709 <caption>Multiplication table
712 <th> × </th><th> 1 </th><th> 2 </th><th> 3
716 </th><td> 1 </td><td> 2 </td><td> 3
720 </th><td> 2 </td><td> 4 </td><td> 6
724 </th><td> 3 </td><td> 6 </td><td> 9
728 </th><td> 4 </td><td> 8 </td><td> 12
732 </th><td> 5 </td><td> 10 </td><td> 15
740 {| align=right border=1
742 |rowspan=2| Cell 2, row 1 (and 2)
749 <table align="right" border="1">
752 </td><td rowspan="2"> Cell 2, row 1 (and 2)
753 </td><td> Cell 3, row 1
757 </td><td> Cell 3, row 2
768 {| bgcolor=#ABCDEF border=2
773 |the original table again
780 <table bgcolor="#ABCDEF" border="2">
787 </td><td>the original table again
793 Invalid attributes in table cell (bug 1830)
812 Plain link, capitalized
816 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
821 Plain link, uncapitalized
825 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
832 [[Main Page|The Main Page]]
834 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
843 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
850 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
852 <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>
859 [[Main Page]]xxx, [[Main Page]]XXX
861 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
875 Piped link with 3 brackets
877 [[[main page|the main page]]]
879 <p>[[[main page|the main page]]]
886 [[Talk:Parser testing]], [[Meta:Disclaimers]]
888 <p><a href="/index.php?title=Talk:Parser_testing&action=edit" class="new" title="Talk:Parser testing">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">Meta:Disclaimers</a>
893 Piped link to namespace
895 [[Meta:Disclaimers|The disclaimers]]
897 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
904 [[Usually caused by a typo (oops}]]
906 <p>[[Usually caused by a typo (oops}]]
911 Link containing % (not as a hex sequence)
915 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
920 Link containing % as a single hex sequence interpreted to char
924 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
929 Link containing % as a double hex sequence interpreted to hex sequence
933 <p>[[7%2525 Solution]]
940 [[http://www.example.org]]
942 <p>[<a href="http://www.example.org" class='external autonumber' title="http://www.example.org" rel="nofollow">[1]</a>]
946 # I'm fairly sure the expected result here is wrong.
947 # We want these to be URL links, not pseudo-pages with URLs for titles....
948 # However the current output is also pretty screwy.
951 # I'm changing it to match the current output--it arguably makes more
952 # sense in the light of the test above. Old expected result was:
953 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.org&action=edit" class="new" title="Http://www.example.org">an example URL</a>
955 # But I think this test is bordering on "garbage in, garbage out" anyway.
960 Piped link to URL: [[http://www.example.org|an example URL]]
962 <p>Piped link to URL: [<a href="http://www.example.org|an" class='external text' title="http://www.example.org|an" rel="nofollow">example URL</a>]
967 BUG 2: [[page|http://url/]] should link to page, not http://url/
969 [[Main Page|http://url/]]
971 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
976 BUG 337: Escaped self-links should be bold
980 [[Bug462]] [[Bug462]]
982 <p><strong>Bug462</strong> <strong>Bug462</strong>
987 Self-link to section should not be bold
991 [[Main Page#section]]
993 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
998 <nowiki> inside a link
1000 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1002 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1007 ### Interwiki links (see maintenance/interwiki.sql)
1011 Inline interwiki link
1013 [[MeatBall:SoftSecurity]]
1015 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class='extiw' title="MeatBall:SoftSecurity">MeatBall:SoftSecurity</a>
1020 Interwiki link encoding conversion (bug 1636)
1022 *[[Wikipedia:ro:Olteniţa]]
1023 *[[Wikipedia:ro:Olteniţa]]
1025 <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>
1026 </li><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class='extiw' title="Wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a>
1045 ### Block-level elements
1068 <ol><li>Numbered list
1085 ***#Number on level 4
1087 **#Number on level 3
1088 **#Number on level 3
1093 <ol><li> with numbers
1095 <ul><li> and bullets
1097 <ol><li> and numbers
1099 </li><li>bullets again
1100 <ul><li>bullet level 2
1101 <ul><li>bullet level 3
1102 <ol><li>Number on level 4
1105 </li><li>bullet level 2
1106 <ol><li>Number on level 3
1107 </li><li>Number on level 3
1110 <ol><li>number level 2
1133 Magic links: internal link to RFC
1137 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1146 <p><a href='http://www.faqs.org/rfcs/rfc822.html' class='external' title="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a>
1151 Magic links: ISBN (bug 1937 unresolved)
1155 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1160 Magic links: PMID incorrectly converts space to underscore
1164 <p><a href='http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=1234' class='external' title="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=1234">PMID 1234</a>
1173 Nonexistant template
1175 {{thistemplatedoesnotexist}}
1177 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1184 This is a test template
1192 <p>This is a test template
1197 Template with explicit namespace
1201 <p>This is a test template
1209 This is a test template with parameter {{{param}}}
1215 {{paramtest|param=foo}}
1217 <p>This is a test template with parameter foo
1222 Template:paramtestnum
1228 Template unnamed parameter
1230 {{paramtestnum|Main Page|the main page}}
1232 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
1237 BUG 553: link with two variables in a piped link
1240 |[[{{{1}}}|{{{2}}}]]
1245 <td>[[{{{1}}}|{{{2}}}]]
1251 Magic variable as template parameter
1253 {{paramtest|param={{SITENAME}}}}
1255 <p>This is a test template with parameter MediaWiki
1262 [[{{{param}}}|link]]
1266 Template parameter as link source
1268 {{linktest|param=Main Page}}
1270 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
1278 including another template, {{paramtest|param={{{arg}}}}}
1282 Template passing argument to another template
1284 {{paramtest2|arg='hmm'}}
1286 <p>including another template, This is a test template with parameter 'hmm'
1297 Template as link source
1301 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1319 Template infinite loop
1323 <p>{{loop1}}<!-- WARNING: template loop detected -->
1328 Template from main namespace
1347 BUG 529: Template with table, not included at beginning of line
1364 BUG 523: Template shouldn't eat newline (or add an extra one before table)
1382 BUG 41: Template parameters shown as broken links
1394 ''None'' of '''this''' should be
1396 but rather passed unmodified
1400 # hmm, fix this or just deprecate msgnw and document its behavior?
1406 {{msgnw:MSGNW test}}
1408 <p>''None'' of '''this''' should be
1410 but rather passed unmodified
1418 {{int:newmessages|lots of money}}
1420 <p>You have lots of money.
1425 ### Pre-save transform tests
1428 pre-save transform: subst:
1434 This is a test template
1438 pre-save transform: normal template
1448 pre-save transform: nonexistant template
1452 {{thistemplatedoesnotexist}}
1454 {{thistemplatedoesnotexist}}
1459 pre-save transform: subst magic variables
1468 # This is bug 89, which I fixed. -- wtm
1470 pre-save transform: subst: templates with parameters
1474 {{subst:paramtest|param="something else"}}
1476 This is a test template with parameter "something else"
1483 <nowiki>'''not wiki'''</nowiki>
1487 pre-save transform: nowiki in subst (bug 1188)
1491 {{subst:nowikitest}}
1493 <nowiki>'''not wiki'''</nowiki>
1498 Template:commenttest
1500 This template has <!-- a comment --> in it.
1504 pre-save transform: comment in subst (bug 1936)
1508 {{subst:commenttest}}
1510 This template has <!-- a comment --> in it.
1517 <span onmouseover="alert('crap')">Oh no</span>
1521 (confirming safety of fix for subst bug 1936)
1523 {{Template:dangerous}}
1525 <p><span>Oh no</span>
1531 ### Message transform tests
1534 message transform: magic variables
1544 message transform: should not transform wiki markup
1559 [[Image:foobar.jpg]]
1561 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a>
1568 [[Image:foobar.jpg|right]]
1570 <div class="floatright"><span><a href="/wiki/Image:Foobar.jpg" class="image" title=""><img src="/images/3/3a/Foobar.jpg" alt="" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div>
1577 [[Image:foobar.jpg|right|Caption text]]
1579 <div class="floatright"><span><a href="/wiki/Image:Foobar.jpg" class="image" title="Caption text"><img src="/images/3/3a/Foobar.jpg" alt="Caption text" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div>
1584 Image with frame and link
1586 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
1588 <div class="thumb tleft"><div style="width:1943px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="This is a test image Main Page"><img src="/images/3/3a/Foobar.jpg" alt="This is a test image Main Page" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" >This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
1597 <p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
1602 Frameless image caption with a free URL
1604 [[Image:foobar.jpg|http://example.com]]
1606 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="http://example.com"><img src="/images/3/3a/Foobar.jpg" alt="http://example.com" longdesc="/wiki/Image:Foobar.jpg" /></a>
1611 Thumbnail image caption with a free URL
1613 [[Image:foobar.jpg|thumb|http://example.com]]
1615 <div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="http://example.com"><img src="/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="http://example.com" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a></div></div></div>
1619 # Pending resolution to bug 368
1621 BUG 648: Frameless image caption with a link
1623 [[Image:foobar.jpg|text with a [[link]] in it]]
1625 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a link in it"><img src="/images/3/3a/Foobar.jpg" alt="text with a link in it" longdesc="/wiki/Image:Foobar.jpg" /></a>
1630 Escape HTML special chars in image alt text
1632 [[Image:foobar.jpg|& < > "]]
1634 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="& < > ""><img src="/images/3/3a/Foobar.jpg" alt="& < > "" longdesc="/wiki/Image:Foobar.jpg" /></a>
1639 BUG 499: Alt text should have Ӓ, not &1234;
1641 [[Image:foobar.jpg|♀]]
1643 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="♀"><img src="/images/3/3a/Foobar.jpg" alt="♀" longdesc="/wiki/Image:Foobar.jpg" /></a>
1648 Broken image caption with link
1650 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
1652 <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.
1657 Image caption containing another image
1659 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
1661 <div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="This is a caption with another Image:Icon.png inside it!"><img src="/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="This is a caption with another Image:Icon.png inside it!" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div>This is a caption with another <a href="/index.php?title=Special:Upload&wpDestFile=Icon.png" class="new" title="Image:Icon.png">Image:Icon.png</a> inside it!</div></div></div>
1666 Image caption containing a newline
1668 [[Image:Foobar.jpg|This
1671 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="This *is some text"><img src="/images/3/3a/Foobar.jpg" alt="This *is some text" longdesc="/wiki/Image:Foobar.jpg" /></a>
1681 Subpage test/subpage
1689 subpage title=[[Subpage test]]
1693 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
1698 Subpage noslash link
1700 subpage title=[[Subpage test]]
1704 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
1713 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
1718 BUG 561: {{/Subpage}}
1720 subpage title=[[Page]]
1724 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
1732 Category:MediaWiki User's Guide
1740 [[:Category:MediaWiki User's Guide]]
1742 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
1751 [[Category: MediaWiki User's Guide]]
1753 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
1757 ### Inter-language links
1760 Inter-language links
1766 [[zh:食品]]
1768 es:Alimento fr:Nourriture zh:食品
1775 Basic section headings
1777 title=[[Parser test script]]
1784 ===Smaller headline===
1787 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2>
1790 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=2" title="Parser test script">edit</a>]</div><a name="Headline_2"></a><h2>Headline 2</h2>
1793 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=3" title="Parser test script">edit</a>]</div><a name="Smaller_headline"></a><h3>Smaller headline</h3>
1799 Section headings with TOC
1801 title=[[Parser test script]]
1804 === Subheadline 1 ===
1805 ===== Skipping a level =====
1806 ====== Skipping a level ======
1810 ===Another headline===
1813 <div id='toctitle'><h2>Table of contents</h2></div>
1815 <li class='toclevel-1'><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
1817 <li class='toclevel-2'><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
1819 <li class='toclevel-3'><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
1821 <li class='toclevel-4'><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
1828 <li class='toclevel-1'><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
1830 <li class='toclevel-2'><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
1835 <script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script><div class='visualClear'></div>
1836 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2>
1837 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=2" title="Parser test script">edit</a>]</div><a name="Subheadline_1"></a><h3> Subheadline 1 </h3>
1838 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=3" title="Parser test script">edit</a>]</div><a name="Skipping_a_level"></a><h5> Skipping a level </h5>
1839 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=4" title="Parser test script">edit</a>]</div><a name="Skipping_a_level_2"></a><h6> Skipping a level </h6>
1840 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=5" title="Parser test script">edit</a>]</div><a name="Headline_2"></a><h2> Headline 2 </h2>
1843 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=6" title="Parser test script">edit</a>]</div><a name="Another_headline"></a><h3>Another headline</h3>
1848 Resolving duplicate section names
1850 title=[[Parser test script]]
1855 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Foo_bar"></a><h2> Foo bar </h2>
1856 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=2" title="Parser test script">edit</a>]</div><a name="Foo_bar_2"></a><h2>Foo bar</h2>
1868 Template with sections, __NOTOC__
1870 title=[[Parser test script]]
1877 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Section_0"></a><h2>Section 0</h2>
1878 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</div><a name="Section_1"></a><h3>Section 1</h3>
1879 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</div><a name="Section_2"></a><h2>Section 2</h2>
1880 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=2" title="Parser test script">edit</a>]</div><a name="Section_4"></a><h2>Section 4</h2>
1885 __NOEDITSECTION__ keyword
1891 <a name="Section_1"></a><h2>Section 1</h2>
1892 <a name="Section_2"></a><h2>Section 2</h2>
1897 Link inside a section heading
1899 title=[[Parser test script]]
1901 ==Section with a [[Main Page|link]] in it==
1903 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Section_with_a_link_in_it"></a><h2>Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</h2>
1909 Bug 1219 URL next to image (good)
1911 http://example.com [[Image:foobar.jpg]]
1913 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a> <a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a>
1918 Bug 1219 URL next to image (broken)
1920 http://example.com[[Image:foobar.jpg]]
1922 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" longdesc="/wiki/Image:Foobar.jpg" /></a>
1927 Bug 1186 news: in the middle of text
1929 http://en.wikinews.org/wiki/Wikinews:Workplace
1931 <p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class='external free' title="http://en.wikinews.org/wiki/Wikinews:Workplace" rel="nofollow">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
1937 Namespaced link must have a title
1946 Namespaced link must have a title (bad fragment version)
1948 [[Project:#fragment]]
1950 <p>[[Project:#fragment]]
1956 div with no attributes
1958 <div>HTML rocks</div>
1960 <div>HTML rocks</div>
1965 div with double-quoted attribute
1967 <div id="rock">HTML rocks</div>
1969 <div id="rock">HTML rocks</div>
1974 div with single-quoted attribute
1976 <div id='rock'>HTML rocks</div>
1978 <div id="rock">HTML rocks</div>
1983 div with unquoted attribute
1985 <div id=rock>HTML rocks</div>
1987 <div id="rock">HTML rocks</div>
1992 div with illegal double attributes
1994 <div align="center" align="right">HTML rocks</div>
1996 <div align="center">HTML rocks</div>
2003 <DIV ALIGN="center">HTML ROCKS</DIV>
2005 <div align="center">HTML ROCKS</div>
2011 text with amp in the middle of nowhere
2015 <p>Remember AT&T?
2020 text with character entity: eacute
2022 I always thought é was a cute letter.
2024 <p>I always thought é was a cute letter.
2029 text with undefined character entity: xacute
2031 I always thought &xacute; was a cute letter.
2033 <p>I always thought &xacute; was a cute letter.
2041 [[Media:Foobar.jpg]]
2043 <p><a href="/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Media:Foobar.jpg</a>
2048 Media link with text
2050 [[Media:Foobar.jpg|A neat file to look at]]
2052 <p><a href="/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">A neat file to look at</a>
2056 # FIXME: this is still bad HTML tag nesting
2058 Media link with nasty text
2060 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
2062 <p><a href="/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Safe Link<div style="display:none">" onmouseover="alert(document.cookie) onfoo="</div></a>
2068 Character reference normalization in link text (bug 1938)
2070 [[Main Page|this&that]]
2072 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>