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
6 # The syntax should be fairly self-explanatory.
8 # Currently supported test options:
9 # One of the following three:
11 # (default) generate HTML output
12 # pst apply pre-save transform
13 # msg apply message transform
15 # Plus any combination of these:
17 # cat add category links
18 # ill add inter-language links
19 # subpage enable subpages (disabled by default)
20 # title=[[XXX]] run test using article title XXX
21 # disabled do not run test
23 # For testing purposes, temporary articles can created:
24 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
25 # where '/' denotes a newline.
27 # This is the standard article assumed to exist.
47 This is a simple paragraph.
49 <p>This is a simple paragraph.
69 * plain''italic''plain
70 * plain''italic''plain''italic''plain
71 * plain'''bold'''plain
72 * plain'''bold'''plain'''bold'''plain
73 * plain''italic''plain'''bold'''plain
74 * plain'''bold'''plain''italic''plain
75 * plain''italic'''bold-italic'''italic''plain
76 * plain'''bold''bold-italic''bold'''plain
77 * plain'''''bold-italic'''italic''plain
78 * plain'''''bold-italic''bold'''plain
79 * plain''italic'''bold-italic'''''plain
80 * plain'''bold''bold-italic'''''plain
81 * plain l'''italic''plain
84 </li><li> plain<i>italic</i>plain
85 </li><li> plain<i>italic</i>plain<i>italic</i>plain
86 </li><li> plain<b>bold</b>plain
87 </li><li> plain<b>bold</b>plain<b>bold</b>plain
88 </li><li> plain<i>italic</i>plain<b>bold</b>plain
89 </li><li> plain<b>bold</b>plain<i>italic</i>plain
90 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
91 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
92 </li><li> plain<i><b>bold-italic</b>italic</i>plain
93 </li><li> plain<b><i>bold-italic</i>bold</b>plain
94 </li><li> plain<i>italic<b>bold-italic</b></i>plain
95 </li><li> plain<b>bold<i>bold-italic</i></b>plain
96 </li><li> plain l'<i>italic</i>plain
102 ### <nowiki> test cases
106 <nowiki> unordered list
108 <nowiki>* This is not an unordered list item.</nowiki>
110 <p>* This is not an unordered list item.
117 <nowiki>Lorem ipsum dolor
138 :There is not nowiki.
139 :There is <nowiki>nowiki</nowiki>.
141 #There is not nowiki.
142 #There is <nowiki>nowiki</nowiki>.
144 *There is not nowiki.
145 *There is <nowiki>nowiki</nowiki>.
147 <dl><dd>There is not nowiki.
148 </dd><dd>There is nowiki.
150 <ol><li>There is not nowiki.
151 </li><li>There is nowiki.
153 <ul><li>There is not nowiki.
154 </li><li>There is nowiki.
160 ### comment test cases
165 <!-- comment 1 --> asdf
201 asdf<!-- comment 1 -->jkl
211 <!-- foo --> b <!-- bar -->
223 ### Preformatted text
232 And a [[Main Page|link]]
238 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
250 <dl><dt> name </dt><dd> Definition
260 <dl><dd> Indented text
266 Definition list with no space
270 <dl><dt>name</dt><dd>Definition
276 Definition list with URL link
278 ; http://example.com/ : definition
280 <dl><dt> <a href="http://example.com/" class='external'>http://example.com/</a> </dt><dd> definition
286 Definition list with bracketed URL link
288 ;[http://www.google.com/ Google]:Number one search engine
290 <dl><dt><a href="http://www.google.com/" class='external' title="http://www.google.com/">Google</a><span class='urlexpansion'> (<i>http://www.google.com/</i>)</span></dt><dd>Number one search engine
296 Definition list with wikilink containing colon
298 ; [[Wikipedia:FAQ]]: The least-read page on Wikipedia
300 <dl><dt> <a href="http://en.wikipedia.org/wiki/FAQ" class='extiw'>Wikipedia:FAQ</a></dt><dd> The least-read page on Wikipedia
305 # At Brion's and JeLuF's insistence... :)
307 Definition list with wikilink containing colon
309 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
311 <dl><dt> <a href="news:alt.wikipedia.rox" class='external'>news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
317 Malformed definition list with colon
319 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
321 <dl><dt> <a href="news:alt.wikipedia.rox" class='external'>news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop
327 Definition lists: colon in external link text
329 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
331 <dl><dt> <a href="http://www.wikipedia2.org/" class='external' title="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a><span class='urlexpansion'> (<i>http://www.wikipedia2.org/</i>)</span></dt><dd> OK, I made that up
341 External links: non-bracketed
343 Non-bracketed: http://example.com
345 <p>Non-bracketed: <a href="http://example.com" class='external'>http://example.com</a>
350 External links: numbered
352 Numbered: [http://example.com]
354 <p>Numbered: <a href="http://example.com" class='external' title="http://example.com">[1]</a><span class='urlexpansion'> (<i>http://example.com</i>)</span>
359 External links: specified text
361 Specified text: [http://example.com link]
363 <p>Specified text: <a href="http://example.com" class='external' title="http://example.com">link</a><span class='urlexpansion'> (<i>http://example.com</i>)</span>
368 External links: trail
370 Trail (not sure if this is meant to work): [http://example.com link]s
372 <p>Trail (not sure if this is meant to work): <a href="http://example.com" class='external' title="http://example.com">link</a>s<span class='urlexpansion'> (<i>http://example.com</i>)</span>
377 External links: dollar sign in URL
379 http://example.com/1$2345
381 <p><a href="http://example.com/1$2345" class='external'>http://example.com/1$2345</a>
386 External links: dollar sign in URL (named)
388 [http://example.com/1$2345]
390 <p><a href="http://example.com/1$2345" class='external' title="http://example.com/1$2345">[1]</a><span class='urlexpansion'> (<i>http://example.com/1$2345</i>)</span>
397 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
399 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
404 External image from https
406 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
408 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
413 Link to non-http image, no img tag
415 Link to non-http image, no img tag: ftp://example.com/test.jpg
417 <p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class='external'>ftp://example.com/test.jpg</a>
422 External links: terminating separator
424 Terminating separator: http://example.com/thing,
426 <p>Terminating separator: <a href="http://example.com/thing" class='external'>http://example.com/thing</a>,
431 External links: intervening separator
433 Intervening separator: http://example.com/1,2,3
435 <p>Intervening separator: <a href="http://example.com/1,2,3" class='external'>http://example.com/1,2,3</a>
440 External links: old bug with URL in query
442 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
444 <p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class='external' title="http://example.com/thing?url=http://example.com">link</a><span class='urlexpansion'> (<i>http://example.com/thing?url=http://example.com</i>)</span>
449 External links: old URL-in-URL bug, mixed protocols
451 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
453 <p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class='external' title="ftp://example.com?url=http://example.com">link</a><span class='urlexpansion'> (<i>ftp://example.com?url=http://example.com</i>)</span>
458 External links: URL in text
460 URL in text: [http://example.com http://example.com]
462 <p>URL in text: <a href="http://example.com" class='external'>http://example.com</a>
467 External links: Clickable images
469 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
471 <p>ja-style clickable images: <a href="http://example.com" class='external' title="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a><span class='urlexpansion'> (<i>http://example.com</i>)</span>
476 External links: raw ampersand
478 Old & use: http://x&y
480 <p>Old & use: <a href="http://x&y" class='external'>http://x&y</a>
485 External links: www.jpeg.org (bug 554)
489 <p><a href="http://www.jpeg.org" class='external'>http://www.jpeg.org</a>
494 External links: URL within URL (original bug 2)
496 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
498 <p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class='external' title="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a><span class='urlexpansion'> (<i>http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp</i>)</span>
503 BUG 361: URL inside bracketed URL
505 [http://www.example.com/foo http://www.example.com/bar]
507 <p><a href="http://www.example.com/foo" class='external' title="http://www.example.com/foo">http://www.example.com/bar</a><span class='urlexpansion'> (<i>http://www.example.com/foo</i>)</span>
512 BUG 289: ">"-token in URL-tail
514 http://www.example.com/<hello>
516 <p><a href="http://www.example.com/" class='external'>http://www.example.com/</a><hello>
521 BUG 289: literal ">"-token in URL-tail
523 http://www.example.com/<b>html</b>
525 <p><a href="http://www.example.com/" class='external'>http://www.example.com/</a><b >html</b >
530 BUG 289: ">"-token in bracketed URL
532 [http://www.example.com/<hello> stuff]
534 <p><a href="http://www.example.com/" class='external' title="http://www.example.com/"><hello> stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span>
539 BUG 289: literal ">"-token in bracketed URL
541 [http://www.example.com/<b>html</b> stuff]
543 <p><a href="http://www.example.com/" class='external' title="http://www.example.com/"><b >html</b > stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span>
548 BUG 289: literal double quote at end of URL
550 http://www.example.com/"hello"
552 <p><a href="http://www.example.com/" class='external'>http://www.example.com/</a>"hello"
557 BUG 289: literal double quote in bracketed URL
559 [http://www.example.com/"hello" stuff]
561 <p><a href="http://www.example.com/" class='external' title="http://www.example.com/">"hello" stuff</a><span class='urlexpansion'> (<i>http://www.example.com/</i>)</span>
566 External links: invalid character
568 [http://www.example.com
\0 test]
570 <p>[<a href="http://www.example.com" class='external'>http://www.example.com</a>
\0 test]
581 Normal text. '''Bold text.''' Normal text. ''Italic text.''
583 Normal text. '''''Bold italic text.''''' Normal text.
585 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
586 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
592 Unclosed and unmatched quotes
594 '''''Bold italic text '''with bold deactivated''' in between.'''''
596 '''''Bold italic text ''with italic deactivated'' in between.'''''
600 ..spanning two paragraphs (should not work).'''
602 '''Bold tag left open
604 ''Italic tag left open
608 <!-- Unmatching number of opening, closing tags: -->
609 '''This year''''s election ''should'' beat '''last year''''s.
611 ''Tom'''s car is bigger than ''Susan'''s.
613 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
614 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
615 </p><p><b>Bold text..</b>
616 </p><p>..spanning two paragraphs (should not work).<b></b>
617 </p><p><b>Bold tag left open</b>
618 </p><p><i>Italic tag left open</i>
620 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
621 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
628 ### content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
652 {| border="1" cellpadding="2"
653 |+Multiplication table
655 ! × !! 1 !! 2 !! 3
673 <table border="1" cellpadding="2">
674 <caption>Multiplication table
677 <th> × </th><th> 1 </th><th> 2 </th><th> 3
681 </th><td> 1 </td><td> 2 </td><td> 3
685 </th><td> 2 </td><td> 4 </td><td> 6
689 </th><td> 3 </td><td> 6 </td><td> 9
693 </th><td> 4 </td><td> 8 </td><td> 12
697 </th><td> 5 </td><td> 10 </td><td> 15
705 {| align=right border=1
707 |rowspan=2| Cell 2, row 1 (and 2)
714 <table align=right border=1>
717 </td><td rowspan=2> Cell 2, row 1 (and 2)
718 </td><td> Cell 3, row 1
722 </td><td> Cell 3, row 2
733 {| bgcolor=#ABCDEF border=2
738 |the original table again
745 <table bgcolor=#ABCDEF border=2>
752 </td><td>the original table again
761 Plain link, capitalized
765 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
770 Plain link, uncapitalized
774 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
781 [[Main Page|The Main Page]]
783 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
792 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
799 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
801 <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>
808 [[Main Page]]xxx, [[Main Page]]XXX
810 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
824 Piped link with 3 brackets
826 [[[main page|the main page]]]
828 <p>[[[main page|the main page]]]
835 [[Talk:Parser testing]], [[Meta:Disclaimers]]
837 <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>
842 Piped link to namespace
844 [[Meta:Disclaimers|The disclaimers]]
846 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
853 [[Usually caused by a typo (oops}]]
855 <p>[[Usually caused by a typo (oops}]]
860 Link containing % (not as a hex sequence)
864 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
869 Link containing % as a single hex sequence interpreted to char
873 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
878 Link containing % as a double hex sequence interpreted to hex sequence
882 <p>[[7%2525 Solution]]
889 [[http://www.example.org]]
891 <p>[<a href="http://www.example.org" class='external' title="http://www.example.org">[1]</a><span class='urlexpansion'> (<i>http://www.example.org</i>)</span>]
895 # I'm fairly sure the expected result here is wrong.
896 # We want these to be URL links, not pseudo-pages with URLs for titles....
897 # However the current output is also pretty screwy.
900 # I'm changing it to match the current output--it arguably makes more
901 # sense in the light of the test above. Old expected result was:
902 #<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>
904 # But I think this test is bordering on "garbage in, garbage out" anyway.
909 Piped link to URL: [[http://www.example.org|an example URL]]
911 <p>Piped link to URL: [<a href="http://www.example.org|an" class='external' title="http://www.example.org|an">example URL</a><span class='urlexpansion'> (<i>http://www.example.org|an</i>)</span>]
916 BUG 2: [[page|http://url/]] should link to page, not http://url/
918 [[Main Page|http://url/]]
920 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
925 BUG 337: Escaped self-links should be bold
929 [[Bug462]] [[Bug462]]
931 <p><strong>Bug462</strong> <strong>Bug462</strong>
936 Self-link to section should not be bold
940 [[Main Page#section]]
942 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
947 <nowiki> inside a link
949 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
951 <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>
960 Inline interwiki link
962 [[MeatBall:SoftSecurity]]
964 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class='extiw'>MeatBall:SoftSecurity</a>
982 ### Block-level elements
1005 <ol><li>Numbered list
1022 ***#Number on level 4
1024 **#Number on level 3
1025 **#Number on level 3
1030 <ol><li> with numbers
1032 <ul><li> and bullets
1034 <ol><li> and numbers
1036 </li><li>bullets again
1037 <ul><li>bullet level 2
1038 <ul><li>bullet level 3
1039 <ol><li>Number on level 4
1042 </li><li>bullet level 2
1043 <ol><li>Number on level 3
1044 </li><li>Number on level 3
1047 <ol><li>number level 2
1070 Magic links: internal link to RFC
1074 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1083 <p><a href='http://www.faqs.org/rfcs/rfc822.html' class='external' title="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a>
1092 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1101 Nonexistant template
1103 {{thistemplatedoesnotexist}}
1105 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1112 This is a test template
1120 <p>This is a test template
1125 Template with explicit namespace
1129 <p>This is a test template
1137 This is a test template with parameter {{{param}}}
1143 {{paramtest|param=foo}}
1145 <p>This is a test template with parameter foo
1150 Template:paramtestnum
1156 Template unnamed parameter
1158 {{paramtestnum|Main Page|the main page}}
1160 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
1165 BUG 553: link with two variables in a piped link
1168 |[[{{{1}}}|{{{2}}}]]
1173 <td>[[{{{1}}}|{{{2}}}]]
1179 Magic variable as template parameter
1181 {{paramtest|param={{SITENAME}}}}
1183 <p>This is a test template with parameter MediaWiki
1190 [[{{{param}}}|link]]
1194 Template parameter as link source
1196 {{linktest|param=Main Page}}
1198 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
1206 including another template, {{paramtest|param={{{arg}}}}}
1210 Template passing argument to another template
1212 {{paramtest2|arg='hmm'}}
1214 <p>including another template, This is a test template with parameter 'hmm'
1225 Template as link source
1229 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1247 Template infinite loop
1251 <p>{{loop2}}<!-- WARNING: template loop detected -->
1256 Template from main namespace
1275 BUG 529: Template with table, not included at beginning of line
1292 BUG 523: Template shouldn't eat newline (or add an extra one before table)
1310 BUG 41: Template parameters shown as broken links
1322 ''None'' of '''this''' should be
1324 but rather passed unmodified
1328 # hmm, fix this or just deprecate msgnw and document its behavior?
1334 {{msgnw:MSGNW test}}
1336 <p>''None'' of '''this''' should be
1338 but rather passed unmodified
1346 {{int:newmessages|lots of money}}
1348 <p>You have lots of money.
1353 ### Pre-save transform tests
1356 pre-save transform: subst:
1362 This is a test template
1366 pre-save transform: normal template
1376 pre-save transform: nonexistant template
1380 {{thistemplatedoesnotexist}}
1382 {{thistemplatedoesnotexist}}
1387 pre-save transform: subst magic variables
1396 # This is bug 89, which I fixed. -- wtm
1398 pre-save transform: subst: templates with parameters
1402 {{subst:paramtest|param="something else"}}
1404 This is a test template with parameter "something else"
1408 ### Message transform tests
1411 message transform: magic variables
1421 message transform: should not transform wiki markup
1436 [[Image:foobar.jpg]]
1438 <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>
1445 [[Image:foobar.jpg|right]]
1447 <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>
1454 [[Image:foobar.jpg|right|Caption text]]
1456 <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>
1461 Image with frame and link
1463 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
1465 <div class="thumb tleft"><div style="width:202px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="This is a test image "><img src="/images/3/3a/Foobar.jpg" alt="This is a test image " width="200" height="200" 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>
1474 <p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
1479 Frameless image caption with a free URL
1481 [[Image:foobar.jpg|http://example.com]]
1483 <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>
1488 Thumbnail image caption with a free URL
1490 [[Image:foobar.jpg|thumb|http://example.com]]
1492 <div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="http://example.com"><img src="/images/3/3a/Foobar.jpg" alt="http://example.com" width="180" height="180" 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'>http://example.com</a></div></div></div>
1496 # Pending resolution to bug 368
1498 BUG 648: Frameless image caption with a link
1500 [[Image:foobar.jpg|text with a [[link]] in it]]
1502 <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>
1507 Escape HTML special chars in image alt text
1509 [[Image:foobar.jpg|& < > "]]
1511 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="& < > ""><img src="/images/3/3a/Foobar.jpg" alt="& < > "" longdesc="/wiki/Image:Foobar.jpg" /></a>
1516 BUG 499: Alt text should have Ӓ, not &1234;
1518 [[Image:foobar.jpg|♀]]
1520 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="♀"><img src="/images/3/3a/Foobar.jpg" alt="♀" longdesc="/wiki/Image:Foobar.jpg" /></a>
1525 Broken image caption with link
1527 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
1529 <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.
1534 Image caption containing another image
1536 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
1538 <div class="thumb tright"><div style="width:182px;"><b>Missing image</b><br /><i>Foobar.jpg</i> <div class="thumbcaption" >This is a caption with another <a href="/wiki/Image:Icon.png" class="image" title="image"><img src="/images/9/96/Icon.png" alt="image" longdesc="/wiki/Image:Icon.png" /></a> inside it!</div></div></div>
1546 Subpage test/subpage
1554 subpage title=[[Subpage test]]
1558 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
1563 Subpage noslash link
1565 subpage title=[[Subpage test]]
1569 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
1578 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
1583 BUG 561: {{/Subpage}}
1585 subpage title=[[Page]]
1589 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
1597 Category:MediaWiki User's Guide
1605 [[:Category:MediaWiki User's Guide]]
1607 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
1616 [[Category: MediaWiki User's Guide]]
1618 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
1622 ### Inter-language links
1625 Inter-language links
1631 [[zh:食品]]
1633 es:Alimento fr:Nourriture zh:食品
1640 Basic section headings
1642 title=[[Parser test script]]
1649 ===Smaller headline===
1652 <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>
1655 <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>
1658 <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>
1664 Section headings with TOC
1666 title=[[Parser test script]]
1669 === Subheadline 1 ===
1670 ===== Skipping a level =====
1671 ====== Skipping a level ======
1675 ===Another headline===
1677 <table border="0" id="toc"><tr id="toctitle"><td align="center">
1678 <b>Table of contents</b> <script type="text/javascript">showTocToggle("show","hide")</script></td></tr><tr id="tocinside"><td>
1679 <div class="tocline"><a href="#Headline_1">1 Headline 1</a><br /></div>
1680 <div class="tocindent">
1681 <p><a href="#Subheadline_1">1.1 Subheadline 1</a><br />
1683 <div class="tocindent">
1684 <div class="tocindent">
1685 <p><a href="#Skipping_a_level">1.1.1 Skipping a level</a><br />
1687 <div class="tocindent">
1688 <p><a href="#Skipping_a_level_2">1.1.1.1 Skipping a level</a><br />
1694 <div class="tocline"><a href="#Headline_2">2 Headline 2</a><br /></div>
1695 <div class="tocindent">
1696 <p><a href="#Another_headline">2.1 Another headline</a><br />
1700 <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>
1701 <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>
1702 <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>
1703 <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>
1704 <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>
1707 <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>
1712 Resolving duplicate section names
1714 title=[[Parser test script]]
1719 <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>
1720 <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>
1732 Template with sections, __NOTOC__
1734 title=[[Parser test script]]
1741 <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>
1742 <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>
1743 <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>
1744 <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>
1749 __NOEDITSECTION__ keyword
1755 <a name="Section_1"></a><h2>Section 1</h2>
1756 <a name="Section_2"></a><h2>Section 2</h2>
1761 Link inside a section heading
1763 title=[[Parser test script]]
1765 ==Section with a [[Main Page|link]] in it==
1767 <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>