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.
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 ; [[Help:FAQ]]: The least-read page on Wikipedia
299 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit" class="new" title="Help:FAQ">Help: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]
352 Numbered: [http://example.net]
353 Numbered: [http://example.org]
355 <p>Numbered: <a href="http://example.com" class='external autonumber' title="http://example.com" rel="nofollow">[1]</a>
356 Numbered: <a href="http://example.net" class='external autonumber' title="http://example.net" rel="nofollow">[2]</a>
357 Numbered: <a href="http://example.org" class='external autonumber' title="http://example.org" rel="nofollow">[3]</a>
362 External links: specified text
364 Specified text: [http://example.com link]
366 <p>Specified text: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>
371 External links: trail
373 Linktrails should not work for external links: [http://example.com link]s
375 <p>Linktrails should not work for external links: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>s
380 External links: dollar sign in URL
382 http://example.com/1$2345
384 <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>
389 External links: dollar sign in URL (named)
391 [http://example.com/1$2345]
393 <p><a href="http://example.com/1$2345" class='external autonumber' title="http://example.com/1$2345" rel="nofollow">[1]</a>
400 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
402 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
407 External image from https
409 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
411 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
416 Link to non-http image, no img tag
418 Link to non-http image, no img tag: ftp://example.com/test.jpg
420 <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>
425 External links: terminating separator
427 Terminating separator: http://example.com/thing,
429 <p>Terminating separator: <a href="http://example.com/thing" class='external free' title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
434 External links: intervening separator
436 Intervening separator: http://example.com/1,2,3
438 <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>
443 External links: old bug with URL in query
445 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
447 <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>
452 External links: old URL-in-URL bug, mixed protocols
454 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
456 <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>
461 External links: URL in text
463 URL in text: [http://example.com http://example.com]
465 <p>URL in text: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
470 External links: Clickable images
472 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
474 <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>
479 External links: raw ampersand
481 Old & use: http://x&y
483 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
488 External links: encoded ampersand
490 Old & use: http://x&y
492 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
497 External links: [raw ampersand]
499 Old & use: [http://x&y]
501 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
506 External links: [encoded ampersand]
508 Old & use: [http://x&y]
510 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
515 External links: www.jpeg.org (bug 554)
519 <p><a href="http://www.jpeg.org" class='external free' title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
524 External links: URL within URL (original bug 2)
526 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
528 <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>
533 BUG 361: URL inside bracketed URL
535 [http://www.example.com/foo http://www.example.com/bar]
537 <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>
542 BUG 361: URL within URL, not bracketed
544 http://www.example.com/foo?=http://www.example.com/bar
546 <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>
551 BUG 289: ">"-token in URL-tail
553 http://www.example.com/<hello>
555 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
560 BUG 289: literal ">"-token in URL-tail
562 http://www.example.com/<b>html</b>
564 <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>
569 BUG 289: ">"-token in bracketed URL
571 [http://www.example.com/<hello> stuff]
573 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
578 BUG 289: literal ">"-token in bracketed URL
580 [http://www.example.com/<b>html</b> stuff]
582 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
587 BUG 289: literal double quote at end of URL
589 http://www.example.com/"hello"
591 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
596 BUG 289: literal double quote in bracketed URL
598 [http://www.example.com/"hello" stuff]
600 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
605 External links: invalid character
607 [http://www.example.com
\0 test]
609 <p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a>
\0 test]
614 BUG 787: Links with one slash after the url protocol are invalid
618 [http:/example.com title]
622 [http:/example.com title]
633 Normal text. '''Bold text.''' Normal text. ''Italic text.''
635 Normal text. '''''Bold italic text.''''' Normal text.
637 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
638 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
644 Unclosed and unmatched quotes
646 '''''Bold italic text '''with bold deactivated''' in between.'''''
648 '''''Bold italic text ''with italic deactivated'' in between.'''''
652 ..spanning two paragraphs (should not work).'''
654 '''Bold tag left open
656 ''Italic tag left open
660 <!-- Unmatching number of opening, closing tags: -->
661 '''This year''''s election ''should'' beat '''last year''''s.
663 ''Tom'''s car is bigger than ''Susan'''s.
665 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
666 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
667 </p><p><b>Bold text..</b>
668 </p><p>..spanning two paragraphs (should not work).<b></b>
669 </p><p><b>Bold tag left open</b>
670 </p><p><i>Italic tag left open</i>
672 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
673 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
680 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
683 # This should not produce <table></table> as <table><tr><td></td></tr></table>
684 # is the bare minimun required by the spec, see:
685 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
687 A table with no data.
693 # A table with nothing but a caption is invalid XHTML, we might want to render
694 # this as <p>caption</p>
696 A table with nothing but a caption
732 {| border="1" cellpadding="2"
733 |+Multiplication table
735 ! × !! 1 !! 2 !! 3
753 <table border="1" cellpadding="2">
754 <caption>Multiplication table
757 <th> × </th><th> 1 </th><th> 2 </th><th> 3
761 </th><td> 1 </td><td> 2 </td><td> 3
765 </th><td> 2 </td><td> 4 </td><td> 6
769 </th><td> 3 </td><td> 6 </td><td> 9
773 </th><td> 4 </td><td> 8 </td><td> 12
777 </th><td> 5 </td><td> 10 </td><td> 15
785 {| align=right border=1
787 |rowspan=2| Cell 2, row 1 (and 2)
794 <table align="right" border="1">
797 </td><td rowspan="2"> Cell 2, row 1 (and 2)
798 </td><td> Cell 3, row 1
802 </td><td> Cell 3, row 2
813 {| bgcolor=#ABCDEF border=2
818 |the original table again
825 <table bgcolor="#ABCDEF" border="2">
832 </td><td>the original table again
838 Invalid attributes in table cell (bug 1830)
856 Plain link, capitalized
860 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
865 Plain link, uncapitalized
869 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
876 [[Main Page|The Main Page]]
878 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
887 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
894 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
896 <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>
903 [[Main Page]]xxx, [[Main Page]]XXX
905 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
919 Piped link with 3 brackets
921 [[[main page|the main page]]]
923 <p>[[[main page|the main page]]]
928 Link with multiple pipes
930 [[Main Page|The|Main|Page]]
932 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
939 [[Talk:Parser testing]], [[Meta:Disclaimers]]
941 <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>
946 Piped link to namespace
948 [[Meta:Disclaimers|The disclaimers]]
950 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
957 [[Usually caused by a typo (oops}]]
959 <p>[[Usually caused by a typo (oops}]]
964 Link containing % (not as a hex sequence)
968 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
973 Link containing % as a single hex sequence interpreted to char
977 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
982 Link containing % as a double hex sequence interpreted to hex sequence
986 <p>[[7%2525 Solution]]
993 [[http://www.example.org]]
995 <p>[<a href="http://www.example.org" class='external autonumber' title="http://www.example.org" rel="nofollow">[1]</a>]
999 # I'm fairly sure the expected result here is wrong.
1000 # We want these to be URL links, not pseudo-pages with URLs for titles....
1001 # However the current output is also pretty screwy.
1004 # I'm changing it to match the current output--it arguably makes more
1005 # sense in the light of the test above. Old expected result was:
1006 #<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>
1008 # But I think this test is bordering on "garbage in, garbage out" anyway.
1013 Piped link to URL: [[http://www.example.org|an example URL]]
1015 <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>]
1020 BUG 2: [[page|http://url/]] should link to page, not http://url/
1022 [[Main Page|http://url/]]
1024 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1029 BUG 337: Escaped self-links should be bold
1033 [[Bug462]] [[Bug462]]
1035 <p><strong>Bug462</strong> <strong>Bug462</strong>
1040 Self-link to section should not be bold
1044 [[Main Page#section]]
1046 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1051 <nowiki> inside a link
1053 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1055 <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>
1060 ### Interwiki links (see maintenance/interwiki.sql)
1064 Inline interwiki link
1066 [[MeatBall:SoftSecurity]]
1068 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class='extiw' title="MeatBall:SoftSecurity">MeatBall:SoftSecurity</a>
1073 Inline interwiki link with empty title (bug 2372)
1077 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class='extiw' title="MeatBall:">MeatBall:</a>
1082 Interwiki link encoding conversion (bug 1636)
1084 *[[Wikipedia:ro:Olteniţa]]
1085 *[[Wikipedia:ro:Olteniţa]]
1087 <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>
1088 </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>
1094 Interwiki link with fragment (bug 2130)
1096 [[MeatBall:SoftSecurity#foo]]
1098 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class='extiw' title="MeatBall:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1116 Incorrecly removing closing slashes from correctly formed XHTML
1118 <br style="clear:both;" />
1120 <p><br style="clear:both;" />
1125 Failing to transform badly formed HTML into correct XHTML
1131 <p><br style="clear:left;" />
1132 <br style="clear:right;" />
1133 <br style="clear:both;" />
1138 Horizontal ruler (should it add that extra space?)
1151 ### Block-level elements
1174 <ol><li>Numbered list
1191 ***#Number on level 4
1193 **#Number on level 3
1194 **#Number on level 3
1199 <ol><li> with numbers
1201 <ul><li> and bullets
1203 <ol><li> and numbers
1205 </li><li>bullets again
1206 <ul><li>bullet level 2
1207 <ul><li>bullet level 3
1208 <ol><li>Number on level 4
1211 </li><li>bullet level 2
1212 <ol><li>Number on level 3
1213 </li><li>Number on level 3
1216 <ol><li>number level 2
1224 List items are not parsed correctly following a <pre> block (bug 785)
1230 <ul><li> <pre>foo</pre>
1231 </li><li> <pre>bar</pre>
1253 Magic links: internal link to RFC
1257 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1266 <p><a href='http://www.faqs.org/rfcs/rfc822.html' class='external' title="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a>
1271 Magic links: ISBN (bug 1937)
1275 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1280 Magic links: PMID incorrectly converts space to underscore
1284 <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>
1293 Nonexistant template
1295 {{thistemplatedoesnotexist}}
1297 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1304 This is a test template
1312 <p>This is a test template
1317 Template with explicit namespace
1321 <p>This is a test template
1329 This is a test template with parameter {{{param}}}
1335 {{paramtest|param=foo}}
1337 <p>This is a test template with parameter foo
1342 Template:paramtestnum
1348 Template unnamed parameter
1350 {{paramtestnum|Main Page|the main page}}
1352 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
1357 BUG 553: link with two variables in a piped link
1360 |[[{{{1}}}|{{{2}}}]]
1365 <td>[[{{{1}}}|{{{2}}}]]
1371 Magic variable as template parameter
1373 {{paramtest|param={{SITENAME}}}}
1375 <p>This is a test template with parameter MediaWiki
1382 [[{{{param}}}|link]]
1386 Template parameter as link source
1388 {{linktest|param=Main Page}}
1390 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
1398 including another template, {{paramtest|param={{{arg}}}}}
1402 Template passing argument to another template
1404 {{paramtest2|arg='hmm'}}
1406 <p>including another template, This is a test template with parameter 'hmm'
1417 Template as link source
1421 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1439 Template infinite loop
1443 <p>{{loop1}}<!-- WARNING: template loop detected -->
1448 Template from main namespace
1467 BUG 529: Template with table, not included at beginning of line
1484 BUG 523: Template shouldn't eat newline (or add an extra one before table)
1502 BUG 41: Template parameters shown as broken links
1514 ''None'' of '''this''' should be
1516 but rather passed unmodified
1520 # hmm, fix this or just deprecate msgnw and document its behavior?
1526 {{msgnw:MSGNW test}}
1528 <p>''None'' of '''this''' should be
1530 but rather passed unmodified
1538 {{int:newmessages|lots of money}}
1540 <p>You have lots of money.
1545 ### Pre-save transform tests
1548 pre-save transform: subst:
1554 This is a test template
1558 pre-save transform: normal template
1568 pre-save transform: nonexistant template
1572 {{thistemplatedoesnotexist}}
1574 {{thistemplatedoesnotexist}}
1579 pre-save transform: subst magic variables
1588 # This is bug 89, which I fixed. -- wtm
1590 pre-save transform: subst: templates with parameters
1594 {{subst:paramtest|param="something else"}}
1596 This is a test template with parameter "something else"
1603 <nowiki>'''not wiki'''</nowiki>
1607 pre-save transform: nowiki in subst (bug 1188)
1611 {{subst:nowikitest}}
1613 <nowiki>'''not wiki'''</nowiki>
1618 Template:commenttest
1620 This template has <!-- a comment --> in it.
1624 pre-save transform: comment in subst (bug 1936)
1628 {{subst:commenttest}}
1630 This template has <!-- a comment --> in it.
1637 <span onmouseover="alert('crap')">Oh no</span>
1641 (confirming safety of fix for subst bug 1936)
1643 {{Template:dangerous}}
1645 <p><span>Oh no</span>
1651 ### Message transform tests
1654 message transform: magic variables
1664 message transform: should not transform wiki markup
1679 [[Image:foobar.jpg]]
1681 <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>
1688 [[Image:foobar.jpg|right]]
1690 <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>
1697 [[Image:foobar.jpg|right|Caption text]]
1699 <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>
1704 Image with frame and link
1706 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
1708 <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>
1717 <p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
1722 Frameless image caption with a free URL
1724 [[Image:foobar.jpg|http://example.com]]
1726 <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>
1731 Thumbnail image caption with a free URL
1733 [[Image:foobar.jpg|thumb|http://example.com]]
1735 <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>
1740 BUG 1887: A ISBN with a thumbnail
1742 [[Image:foobar.jpg|thumb|ISBN 12354]]
1744 <div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="ISBN 12354"><img src="/images/3/3a/Foobar.jpg" alt="ISBN 12354" longdesc="/wiki/Image:Foobar.jpg" height="180" width="180"></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="index.php?title=Special:Booksources&isbn=12354" class="internal">ISBN 12354</a></div></div></div>
1748 BUG 1887: A <math> with a thumbnail
1750 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
1752 <div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="2+2"><img src="/images/3/3a/Foobar.jpg" alt="2+2" longdesc="/wiki/Image:Foobar.jpg" height="180" width="180"></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><math>2+2<math></div></div></div>
1755 # Pending resolution to bug 368
1757 BUG 648: Frameless image caption with a link
1759 [[Image:foobar.jpg|text with a [[link]] in it]]
1761 <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>
1766 BUG 648: Frameless image caption with a link (suffix)
1768 [[Image:foobar.jpg|text with a [[link]]foo in it]]
1770 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a linkfoo in it"><img src="/images/3/3a/Foobar.jpg" alt="text with a linkfoo in it" longdesc="/wiki/Image:Foobar.jpg" /></a>
1775 BUG 648: Frameless image caption with an interwiki link
1777 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
1779 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img src="/images/3/3a/Foobar.jpg" alt="text with a MeatBall:Link in it" longdesc="/wiki/Image:Foobar.jpg" /></a>
1784 BUG 648: Frameless image caption with a piped interwiki link
1786 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
1788 <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>
1793 Escape HTML special chars in image alt text
1795 [[Image:foobar.jpg|& < > "]]
1797 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="& < > ""><img src="/images/3/3a/Foobar.jpg" alt="& < > "" longdesc="/wiki/Image:Foobar.jpg" /></a>
1802 BUG 499: Alt text should have Ӓ, not &1234;
1804 [[Image:foobar.jpg|♀]]
1806 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="♀"><img src="/images/3/3a/Foobar.jpg" alt="♀" longdesc="/wiki/Image:Foobar.jpg" /></a>
1811 Broken image caption with link
1813 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
1815 <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.
1820 Image caption containing another image
1822 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
1824 <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>
1829 Image caption containing a newline
1831 [[Image:Foobar.jpg|This
1834 <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>
1844 Subpage test/subpage
1852 subpage title=[[Subpage test]]
1856 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
1861 Subpage noslash link
1863 subpage title=[[Subpage test]]
1867 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
1876 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
1881 BUG 561: {{/Subpage}}
1883 subpage title=[[Page]]
1887 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
1895 Category:MediaWiki User's Guide
1903 [[:Category:MediaWiki User's Guide]]
1905 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
1914 [[Category: MediaWiki User's Guide]]
1916 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
1920 ### Inter-language links
1923 Inter-language links
1929 [[zh:食品]]
1931 es:Alimento fr:Nourriture zh:食品
1938 Basic section headings
1940 title=[[Parser test script]]
1947 ===Smaller headline===
1950 <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>
1953 <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>
1956 <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>
1962 Section headings with TOC
1964 title=[[Parser test script]]
1967 === Subheadline 1 ===
1968 ===== Skipping a level =====
1969 ====== Skipping a level ======
1973 ===Another headline===
1975 <table id='toc' class='toc'><tr><td><div id='toctitle'><h2>Table of contents</h2></div>
1977 <li class='toclevel-1'><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
1979 <li class='toclevel-2'><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
1981 <li class='toclevel-3'><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
1983 <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>
1990 <li class='toclevel-1'><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
1992 <li class='toclevel-2'><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
1997 <script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
1998 <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>
1999 <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>
2000 <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>
2001 <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>
2002 <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>
2005 <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>
2009 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
2011 Handling of sections up to level 6 and beyond
2014 == Level 2 Heading==
2015 === Level 3 Heading===
2016 ==== Level 4 Heading====
2017 ===== Level 5 Heading=====
2018 ====== Level 6 Heading======
2019 ======= Level 7 Heading=======
2020 ======== Level 8 Heading========
2021 ========= Level 9 Heading=========
2022 ========== Level 10 Heading==========
2024 <table id='toc' class='toc'><tr><td><div id='toctitle'><h2>Table of contents</h2></div>
2026 <li class='toclevel-1'><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
2028 <li class='toclevel-2'><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
2030 <li class='toclevel-3'><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
2032 <li class='toclevel-4'><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a>
2034 <li class='toclevel-5'><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a>
2036 <li class='toclevel-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>
2037 <li class='toclevel-6'><a href="#.3D_Level_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">= Level 7 Heading=</span></a></li>
2038 <li class='toclevel-6'><a href="#.3D.3D_Level_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">== Level 8 Heading==</span></a></li>
2039 <li class='toclevel-6'><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">=== Level 9 Heading===</span></a></li>
2040 <li class='toclevel-6'><a href="#.3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.5</span> <span class="toctext">==== Level 10 Heading====</span></a></li>
2053 <p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2055 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Parser test">edit</a>]</div><a name="Level_1_Heading"></a><h1> Level 1 Heading</h1>
2056 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Parser test">edit</a>]</div><a name="Level_2_Heading"></a><h2> Level 2 Heading</h2>
2057 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Parser test">edit</a>]</div><a name="Level_3_Heading"></a><h3> Level 3 Heading</h3>
2058 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Parser test">edit</a>]</div><a name="Level_4_Heading"></a><h4> Level 4 Heading</h4>
2059 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Parser test">edit</a>]</div><a name="Level_5_Heading"></a><h5> Level 5 Heading</h5>
2060 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Parser test">edit</a>]</div><a name="Level_6_Heading"></a><h6> Level 6 Heading</h6>
2061 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=7" title="Parser test">edit</a>]</div><a name=".3D_Level_7_Heading.3D"></a><h6>= Level 7 Heading=</h6>
2062 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=8" title="Parser test">edit</a>]</div><a name=".3D.3D_Level_8_Heading.3D.3D"></a><h6>== Level 8 Heading==</h6>
2063 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=9" title="Parser test">edit</a>]</div><a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><h6>=== Level 9 Heading===</h6>
2064 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=10" title="Parser test">edit</a>]</div><a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><h6>==== Level 10 Heading====</h6>
2069 Resolving duplicate section names
2071 title=[[Parser test script]]
2076 <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>
2077 <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>
2089 Template with sections, __NOTOC__
2091 title=[[Parser test script]]
2098 <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>
2099 <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>
2100 <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>
2101 <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>
2106 __NOEDITSECTION__ keyword
2112 <a name="Section_1"></a><h2>Section 1</h2>
2113 <a name="Section_2"></a><h2>Section 2</h2>
2118 Link inside a section heading
2120 title=[[Parser test script]]
2122 ==Section with a [[Main Page|link]] in it==
2124 <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>
2130 Bug 1219 URL next to image (good)
2132 http://example.com [[Image:foobar.jpg]]
2134 <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>
2139 Bug 1219 URL next to image (broken)
2141 http://example.com[[Image:foobar.jpg]]
2143 <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>
2148 Bug 1186 news: in the middle of text
2150 http://en.wikinews.org/wiki/Wikinews:Workplace
2152 <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>
2158 Namespaced link must have a title
2167 Namespaced link must have a title (bad fragment version)
2169 [[Project:#fragment]]
2171 <p>[[Project:#fragment]]
2177 div with no attributes
2179 <div>HTML rocks</div>
2181 <div>HTML rocks</div>
2186 div with double-quoted attribute
2188 <div id="rock">HTML rocks</div>
2190 <div id="rock">HTML rocks</div>
2195 div with single-quoted attribute
2197 <div id='rock'>HTML rocks</div>
2199 <div id="rock">HTML rocks</div>
2204 div with unquoted attribute
2206 <div id=rock>HTML rocks</div>
2208 <div id="rock">HTML rocks</div>
2213 div with illegal double attributes
2215 <div align="center" align="right">HTML rocks</div>
2217 <div align="center">HTML rocks</div>
2224 <DIV ALIGN="center">HTML ROCKS</DIV>
2226 <div align="center">HTML ROCKS</div>
2232 text with amp in the middle of nowhere
2236 <p>Remember AT&T?
2241 text with character entity: eacute
2243 I always thought é was a cute letter.
2245 <p>I always thought é was a cute letter.
2250 text with undefined character entity: xacute
2252 I always thought &xacute; was a cute letter.
2254 <p>I always thought &xacute; was a cute letter.
2266 [[Media:Foobar.jpg]]
2268 <p><a href="/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Media:Foobar.jpg</a>
2273 Media link with text
2275 [[Media:Foobar.jpg|A neat file to look at]]
2277 <p><a href="/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">A neat file to look at</a>
2281 # FIXME: this is still bad HTML tag nesting
2283 Media link with nasty text
2285 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
2287 <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>
2292 Media link to nonexistent file (bug 1702)
2294 [[Media:No such.jpg]]
2296 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class='new' title="No such.jpg">Media:No such.jpg</a>
2303 Character reference normalization in link text (bug 1938)
2305 [[Main Page|this&that]]
2307 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
2312 Empty attribute crash test (bug 2067)
2314 <font color="">foo</font>
2316 <p><font color="">foo</font>
2321 Empty attribute crash test single-quotes (bug 2067)
2323 <font color=''>foo</font>
2325 <p><font color="">foo</font>
2330 Attribute test: equals, then nothing
2332 <font color=>foo</font>
2339 Attribute test: unquoted value
2341 <font color=x>foo</font>
2343 <p><font color="x">foo</font>
2348 Attribute test: unquoted but illegal value (hash)
2350 <font color=#x>foo</font>
2352 <p><font color="#x">foo</font>
2357 Attribute test: no value
2359 <font color>foo</font>
2361 <p><font color="color">foo</font>
2366 Bug 2095: link with three closing brackets
2370 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
2375 Bug 2095: link with pipe and three closing brackets
2379 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
2389 Template:Dangerous attribute
2391 " onmouseover="alert(document.cookie)
2395 Template:Dangerous style attribute
2397 border-size: expression(alert(document.cookie))
2403 <div style="float: right; {{{1}}}">Magic div</div>
2407 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
2409 <div title="{{test}}"></div>
2411 <div title="This is a test template"></div>
2416 Bug 2304: HTML attribute safety (dangerous template; 2309)
2418 <div title="{{dangerous attribute}}"></div>
2420 <div title=""></div>
2425 Bug 2304: HTML attribute safety (dangerous style template; 2309)
2427 <div style="{{dangerous style attribute}}"></div>
2434 Bug 2304: HTML attribute safety (safe parameter; 2309)
2436 {{div style|width: 200px}}
2438 <div style="float: right; width: 200px">Magic div</div>
2443 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
2445 {{div style|width: expression(alert(document.cookie))}}
2447 <div>Magic div</div>
2452 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
2454 {{div style|"><script>alert(document.cookie)</script>}}
2456 <div>Magic div</div>
2461 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
2463 {{div style|" ><script>alert(document.cookie)</script>}}
2465 <div style="float: right; ">Magic div</div>
2470 Bug 2304: HTML attribute safety (link)
2472 <div title="[[Main Page]]"></div>
2474 <div title="[[Main Page]]"></div>
2479 Bug 2304: HTML attribute safety (italics)
2481 <div title="''foobar''"></div>
2483 <div title="''foobar''"></div>
2488 Bug 2304: HTML attribute safety (bold)
2490 <div title="'''foobar'''"></div>
2492 <div title="'''foobar'''"></div>
2497 Bug 2304: HTML attribute safety (ISBN)
2499 <div title="ISBN 1234567890"></div>
2501 <div title="ISBN 1234567890"></div>
2506 Bug 2304: HTML attribute safety (RFC)
2508 <div title="RFC 1234"></div>
2510 <div title="RFC 1234"></div>
2515 Bug 2304: HTML attribute safety (PMID)
2517 <div title="PMID 1234567890"></div>
2519 <div title="PMID 1234567890"></div>
2524 Bug 2304: HTML attribute safety (web link)
2526 <div title="http://example.com/"></div>
2528 <div title="http://example.com/"></div>
2533 Bug 2304: HTML attribute safety (named web link)
2535 <div title="[http://example.com/ link]"></div>
2537 <div title="[http://example.com/ link]"></div>