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 # noxml don't check for XML well formdness
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.
165 <!-- comment 1 --> asdf
201 asdf<!-- comment 1 -->jkl
211 <!-- foo --> b <!-- bar -->
225 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
231 Comment semantics and delimiters
233 <!-- --><!----><!-----><!------>
239 Comment semantics and delimiters, redux
241 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
242 -- foo -- funky huh? ... -->
248 Comment semantics and delimiters: directors cut
250 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
251 everything starting with < followed by !-- until the first -- and > we see,
252 that wouldn't be valid XML however, since in XML -- has to terminate a comment
260 Comment semantics: nesting
262 <!--<!-- no, we're not going to do anything fancy here -->-->
270 ### Preformatted text
279 And a [[Main Page|link]]
285 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
297 <dl><dt> name </dt><dd> Definition
307 <dl><dd> Indented text
313 Definition list with no space
317 <dl><dt>name</dt><dd>Definition
323 Definition list with URL link
325 ; http://example.com/ : definition
327 <dl><dt> <a href="http://example.com/" class='external free' title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
333 Definition list with bracketed URL link
335 ;[http://www.google.com/ Google]:Number one search engine
337 <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
343 Definition list with wikilink containing colon
345 ; [[Help:FAQ]]: The least-read page on Wikipedia
347 <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
352 # At Brion's and JeLuF's insistence... :)
354 Definition list with wikilink containing colon
356 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
358 <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!
364 Malformed definition list with colon
366 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
368 <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
374 Definition lists: colon in external link text
376 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
378 <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
388 External links: non-bracketed
390 Non-bracketed: http://example.com
392 <p>Non-bracketed: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
397 External links: numbered
399 Numbered: [http://example.com]
400 Numbered: [http://example.net]
401 Numbered: [http://example.org]
403 <p>Numbered: <a href="http://example.com" class='external autonumber' title="http://example.com" rel="nofollow">[1]</a>
404 Numbered: <a href="http://example.net" class='external autonumber' title="http://example.net" rel="nofollow">[2]</a>
405 Numbered: <a href="http://example.org" class='external autonumber' title="http://example.org" rel="nofollow">[3]</a>
410 External links: specified text
412 Specified text: [http://example.com link]
414 <p>Specified text: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>
419 External links: trail
421 Linktrails should not work for external links: [http://example.com link]s
423 <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
428 External links: dollar sign in URL
430 http://example.com/1$2345
432 <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>
437 External links: dollar sign in URL (named)
439 [http://example.com/1$2345]
441 <p><a href="http://example.com/1$2345" class='external autonumber' title="http://example.com/1$2345" rel="nofollow">[1]</a>
446 External links: open square bracket forbidden in URL (bug 4377)
448 http://example.com/1[2345
450 <p><a href="http://example.com/1" class='external free' title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
455 External links: open square bracket forbidden in URL (named) (bug 4377)
457 [http://example.com/1[2345]
459 <p><a href="http://example.com/1" class='external text' title="http://example.com/1" rel="nofollow">[2345</a>
466 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
468 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
473 External image from https
475 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
477 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
482 Link to non-http image, no img tag
484 Link to non-http image, no img tag: ftp://example.com/test.jpg
486 <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>
491 External links: terminating separator
493 Terminating separator: http://example.com/thing,
495 <p>Terminating separator: <a href="http://example.com/thing" class='external free' title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
500 External links: intervening separator
502 Intervening separator: http://example.com/1,2,3
504 <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>
509 External links: old bug with URL in query
511 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
513 <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>
518 External links: old URL-in-URL bug, mixed protocols
520 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
522 <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>
527 External links: URL in text
529 URL in text: [http://example.com http://example.com]
531 <p>URL in text: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
536 External links: Clickable images
538 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
540 <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>
545 External links: raw ampersand
547 Old & use: http://x&y
549 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
554 External links: encoded ampersand
556 Old & use: http://x&y
558 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
563 External links: [raw ampersand]
565 Old & use: [http://x&y]
567 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
572 External links: [encoded ampersand]
574 Old & use: [http://x&y]
576 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
581 External links: www.jpeg.org (bug 554)
585 <p><a href="http://www.jpeg.org" class='external free' title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
590 External links: URL within URL (original bug 2)
592 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
594 <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>
599 BUG 361: URL inside bracketed URL
601 [http://www.example.com/foo http://www.example.com/bar]
603 <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>
608 BUG 361: URL within URL, not bracketed
610 http://www.example.com/foo?=http://www.example.com/bar
612 <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>
617 BUG 289: ">"-token in URL-tail
619 http://www.example.com/<hello>
621 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
626 BUG 289: literal ">"-token in URL-tail
628 http://www.example.com/<b>html</b>
630 <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>
635 BUG 289: ">"-token in bracketed URL
637 [http://www.example.com/<hello> stuff]
639 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
644 BUG 289: literal ">"-token in bracketed URL
646 [http://www.example.com/<b>html</b> stuff]
648 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
653 BUG 289: literal double quote at end of URL
655 http://www.example.com/"hello"
657 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
662 BUG 289: literal double quote in bracketed URL
664 [http://www.example.com/"hello" stuff]
666 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
671 External links: invalid character
673 [http://www.example.com test]
675 <p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
680 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
682 [http://www.example.com test]
684 <p><a href="http://www.example.com" class='external text' title="http://www.example.com" rel="nofollow">test</a>
689 BUG 787: Links with one slash after the url protocol are invalid
693 [http:/example.com title]
696 </p><p>[http:/example.com title]
701 Bug 2702: Mismatched <i> and <a> tags are invalid
703 ''[http://example.com text'']
705 <p><i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">text</a></i>
713 http://www.example.com/?title=AT%26T
715 <p><a href="http://www.example.com/?title=AT%26T" class='external free' title="http://www.example.com/?title=AT%26T" rel="nofollow">http://www.example.com/?title=AT%26T</a>
720 Bug 4781, 5267: %26 in URL
722 http://www.example.com/?title=100%25_Bran
724 <p><a href="http://www.example.com/?title=100%25_Bran" class='external free' title="http://www.example.com/?title=100%25_Bran" rel="nofollow">http://www.example.com/?title=100%25_Bran</a>
729 Bug 4781, 5267: %28, %29 in URL
731 http://www.example.com/?title=Ben-Hur_%281959_film%29
733 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class='external free' title="http://www.example.com/?title=Ben-Hur_%281959_film%29" rel="nofollow">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
745 Normal text. '''Bold text.''' Normal text. ''Italic text.''
747 Normal text. '''''Bold italic text.''''' Normal text.
749 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
750 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
756 Unclosed and unmatched quotes
758 '''''Bold italic text '''with bold deactivated''' in between.'''''
760 '''''Bold italic text ''with italic deactivated'' in between.'''''
764 ..spanning two paragraphs (should not work).'''
766 '''Bold tag left open
768 ''Italic tag left open
772 <!-- Unmatching number of opening, closing tags: -->
773 '''This year''''s election ''should'' beat '''last year''''s.
775 ''Tom'''s car is bigger than ''Susan'''s.
777 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
778 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
779 </p><p><b>Bold text..</b>
780 </p><p>..spanning two paragraphs (should not work).<b></b>
781 </p><p><b>Bold tag left open</b>
782 </p><p><i>Italic tag left open</i>
784 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
785 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
792 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
795 # This should not produce <table></table> as <table><tr><td></td></tr></table>
796 # is the bare minimun required by the spec, see:
797 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
799 A table with no data.
805 # A table with nothing but a caption is invalid XHTML, we might want to render
806 # this as <p>caption</p>
808 A table with nothing but a caption
844 {| border="1" cellpadding="2"
845 |+Multiplication table
847 ! × !! 1 !! 2 !! 3
865 <table border="1" cellpadding="2">
866 <caption>Multiplication table
869 <th> × </th><th> 1 </th><th> 2 </th><th> 3
873 </th><td> 1 </td><td> 2 </td><td> 3
877 </th><td> 2 </td><td> 4 </td><td> 6
881 </th><td> 3 </td><td> 6 </td><td> 9
885 </th><td> 4 </td><td> 8 </td><td> 12
889 </th><td> 5 </td><td> 10 </td><td> 15
897 {| align=right border=1
899 |rowspan=2| Cell 2, row 1 (and 2)
906 <table align="right" border="1">
909 </td><td rowspan="2"> Cell 2, row 1 (and 2)
910 </td><td> Cell 3, row 1
914 </td><td> Cell 3, row 2
925 {| bgcolor=#ABCDEF border=2
930 |the original table again
937 <table bgcolor="#ABCDEF" border="2">
944 </td><td>the original table again
950 Invalid attributes in table cell (bug 1830)
968 Plain link, capitalized
972 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
977 Plain link, uncapitalized
981 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
988 [[Main Page|The Main Page]]
990 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
999 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1006 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1008 <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>
1015 [[Main Page]]xxx, [[Main Page]]XXX
1017 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1022 Link with 3 brackets
1031 Piped link with 3 brackets
1033 [[[main page|the main page]]]
1035 <p>[[[main page|the main page]]]
1040 Link with multiple pipes
1042 [[Main Page|The|Main|Page]]
1044 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1051 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1053 <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>
1058 Piped link to namespace
1060 [[Meta:Disclaimers|The disclaimers]]
1062 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1069 [[Usually caused by a typo (oops}]]
1071 <p>[[Usually caused by a typo (oops}]]
1076 Link containing % (not as a hex sequence)
1080 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1085 Link containing % as a single hex sequence interpreted to char
1089 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1094 Link containing % as a double hex sequence interpreted to hex sequence
1098 <p>[[7%2525 Solution]]
1103 Link containing "#<" and "#>" % as a hex sequences
1105 [[%23%3c]]<!-- Render this as "[[#%3c]]" maybe.. ? -->[[%23%3e]]<!-- ..."[[#%3e]]" ? -->
1107 <p>[[%23%3c]][[%23%3e]]
1112 Link containing "<#" and ">#" as a hex sequences
1114 [[%3c%23]][[%3e%23]]
1116 <p>[[%3c%23]][[%3e%23]]
1123 [[http://www.example.org]]
1125 <p>[<a href="http://www.example.org" class='external autonumber' title="http://www.example.org" rel="nofollow">[1]</a>]
1129 # I'm fairly sure the expected result here is wrong.
1130 # We want these to be URL links, not pseudo-pages with URLs for titles....
1131 # However the current output is also pretty screwy.
1134 # I'm changing it to match the current output--it arguably makes more
1135 # sense in the light of the test above. Old expected result was:
1136 #<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>
1138 # But I think this test is bordering on "garbage in, garbage out" anyway.
1143 Piped link to URL: [[http://www.example.org|an example URL]]
1145 <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>]
1150 BUG 2: [[page|http://url/]] should link to page, not http://url/
1152 [[Main Page|http://url/]]
1154 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1159 BUG 337: Escaped self-links should be bold
1163 [[Bug462]] [[Bug462]]
1165 <p><strong>Bug462</strong> <strong>Bug462</strong>
1170 Self-link to section should not be bold
1174 [[Main Page#section]]
1176 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1181 <nowiki> inside a link
1183 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1185 <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>
1190 ### Interwiki links (see maintenance/interwiki.sql)
1194 Inline interwiki link
1196 [[MeatBall:SoftSecurity]]
1198 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1203 Inline interwiki link with empty title (bug 2372)
1207 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class='extiw' title="meatball:">MeatBall:</a>
1212 Interwiki link encoding conversion (bug 1636)
1214 *[[Wikipedia:ro:Olteniţa]]
1215 *[[Wikipedia:ro:Olteniţa]]
1217 <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>
1218 </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>
1224 Interwiki link with fragment (bug 2130)
1226 [[MeatBall:SoftSecurity#foo]]
1228 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1246 Incorrecly removing closing slashes from correctly formed XHTML
1248 <br style="clear:both;" />
1250 <p><br style="clear:both;" />
1255 Failing to transform badly formed HTML into correct XHTML
1261 <p><br clear="left" />
1262 <br clear="right" />
1268 Horizontal ruler (should it add that extra space?)
1282 ### Block-level elements
1305 <ol><li>Numbered list
1322 ***#Number on level 4
1324 **#Number on level 3
1325 **#Number on level 3
1330 <ol><li> with numbers
1332 <ul><li> and bullets
1334 <ol><li> and numbers
1336 </li><li>bullets again
1337 <ul><li>bullet level 2
1338 <ul><li>bullet level 3
1339 <ol><li>Number on level 4
1342 </li><li>bullet level 2
1343 <ol><li>Number on level 3
1344 </li><li>Number on level 3
1347 <ol><li>number level 2
1355 List items are not parsed correctly following a <pre> block (bug 785)
1361 <ul><li> <pre>foo</pre>
1362 </li><li> <pre>bar</pre>
1373 Magic Word: {{CURRENTDAY}}
1382 Magic Word: {{CURRENTDAY2}}
1391 Magic Word: {{CURRENTDAYNAME}}
1400 Magic Word: {{CURRENTDOW}}
1409 Magic Word: {{CURRENTMONTH}}
1418 Magic Word: {{CURRENTMONTHABBREV}}
1420 {{CURRENTMONTHABBREV}}
1427 Magic Word: {{CURRENTMONTHNAME}}
1429 {{CURRENTMONTHNAME}}
1436 Magic Word: {{CURRENTMONTHNAMEGEN}}
1438 {{CURRENTMONTHNAMEGEN}}
1445 Magic Word: {{CURRENTTIME}}
1454 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1463 Magic Word: {{CURRENTYEAR}}
1472 Magic Word: {{FULLPAGENAME}}
1474 title=[[User:Ævar Arnfjörð Bjarmason]]
1478 <p>User:Ævar Arnfjörð Bjarmason
1483 Magic Word: {{FULLPAGENAMEE}}
1485 title=[[User:Ævar Arnfjörð Bjarmason]]
1489 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1494 Magic Word: {{NAMESPACE}}
1496 title=[[User:Ævar Arnfjörð Bjarmason]]
1506 Magic Word: {{NAMESPACEE}}
1508 title=[[User:Ævar Arnfjörð Bjarmason]]
1518 Magic Word: {{NUMBEROFARTICLES}}
1520 {{NUMBEROFARTICLES}}
1527 Magic Word: {{NUMBEROFFILES}}
1536 Magic Word: {{PAGENAME}}
1538 title=[[User:Ævar Arnfjörð Bjarmason]]
1543 <p>Ævar Arnfjörð Bjarmason
1548 Magic Word: {{PAGENAMEE}}
1550 title=[[User:Ævar Arnfjörð Bjarmason]]
1554 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1559 Magic Word: {{REVISIONID}}
1568 Magic Word: {{SCRIPTPATH}}
1577 Magic Word: {{SERVER}}
1581 <p><a href="http://localhost" class='external free' title="http://localhost" rel="nofollow">http://localhost</a>
1586 Magic Word: {{SERVERNAME}}
1595 Magic Word: {{SITENAME}}
1604 Namespace 1 {{ns:1}}
1613 Namespace 1 {{ns:01}}
1622 Namespace 0 {{ns:0}} (bug 4783)
1630 Namespace 0 {{ns:00}} (bug 4783)
1638 Namespace -1 {{ns:-1}}
1647 Namespace Project {{ns:User}}
1660 Magic links: internal link to RFC (bug 479)
1664 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1669 Magic links: RFC (bug 479)
1673 <p><a href='http://www.ietf.org/rfc/rfc822.txt' class='external' title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
1678 Magic links: ISBN (bug 1937)
1682 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1687 Magic links: PMID incorrectly converts space to underscore
1691 <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>
1700 Nonexistant template
1702 {{thistemplatedoesnotexist}}
1704 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1711 This is a test template
1719 <p>This is a test template
1724 Template with explicit namespace
1728 <p>This is a test template
1736 This is a test template with parameter {{{param}}}
1742 {{paramtest|param=foo}}
1744 <p>This is a test template with parameter foo
1749 Template:paramtestnum
1755 Template unnamed parameter
1757 {{paramtestnum|Main Page|the main page}}
1759 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
1764 Template:templatesimple
1770 Template:templateredirect
1772 #redirect [[Template:templatesimple]]
1776 Template:templateasargtestnum
1782 Template:templateasargtest
1784 {{template{{{templ}}}}}
1788 Template:templateasargtest2
1794 Template with template name as unnamed argument
1796 {{templateasargtestnum|templatesimple}}
1803 Template with template name as argument
1805 {{templateasargtest|templ=simple}}
1812 Template with template name as argument (2)
1814 {{templateasargtest2|templ=templatesimple}}
1821 Template:templateasargtestdefault
1823 {{{{{templ|templatesimple}}}}}
1833 Template with default value
1835 {{templateasargtestdefault}}
1842 Template with default value (value set)
1844 {{templateasargtestdefault|templ=templa}}
1853 {{templateredirect}}
1860 Template with argument in separate line
1862 {{ templateasargtest |
1870 Template with complex template as argument
1873 param ={{ templateasargtest |
1876 <p>This is a test template with parameter (test)
1881 Template with thumb image (wiht link in description)
1884 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
1886 This is a test template with parameter <div class="thumb tright"><div style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="Image:Noimage.png">Image:Noimage.png</a> <div class="thumbcaption" ><a href="/index.php?title=No_link&action=edit" class="new" title="No link">link</a> <a href="/index.php?title=No_link&action=edit" class="new" title="No link">caption</a></div></div></div>
1891 Template:complextemplate
1893 {{{1}}} {{paramtest|
1894 param ={{{param}}}}}
1898 Template with complex arguments
1901 param ={{ templateasargtest |
1902 templ = simple }}|[[Template:complextemplate|link]]}}
1904 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
1909 BUG 553: link with two variables in a piped link
1912 |[[{{{1}}}|{{{2}}}]]
1917 <td>[[{{{1}}}|{{{2}}}]]
1923 Magic variable as template parameter
1925 {{paramtest|param={{SITENAME}}}}
1927 <p>This is a test template with parameter MediaWiki
1934 [[{{{param}}}|link]]
1938 Template parameter as link source
1940 {{linktest|param=Main Page}}
1942 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
1950 including another template, {{paramtest|param={{{arg}}}}}
1954 Template passing argument to another template
1956 {{paramtest2|arg='hmm'}}
1958 <p>including another template, This is a test template with parameter 'hmm'
1969 Template as link source
1973 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1991 Template infinite loop
1995 <p>{{loop1}}<!-- WARNING: template loop detected -->
2000 Template from main namespace
2019 BUG 529: Template with table, not included at beginning of line
2036 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2054 BUG 41: Template parameters shown as broken links
2066 ''None'' of '''this''' should be
2068 but rather passed unmodified
2072 # hmm, fix this or just deprecate msgnw and document its behavior?
2078 {{msgnw:MSGNW test}}
2080 <p>''None'' of '''this''' should be
2082 but rather passed unmodified
2090 {{int:youhavenewmessages|lots of money|not!}}
2092 <p>You have lots of money (not!).
2099 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2103 <includeonly> and <noinclude> being included
2114 <onlyinclude>Foo</onlyinclude>bar
2118 <onlyinclude> being included
2130 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2134 <onlyinclude> and <includeonly> being included
2143 <includeonly> and <noinclude> on a page
2145 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2152 <onlyinclude> on a page
2154 <onlyinclude>Foo</onlyinclude>bar
2161 ### Pre-save transform tests
2164 pre-save transform: subst:
2170 This is a test template
2174 pre-save transform: normal template
2184 pre-save transform: nonexistant template
2188 {{thistemplatedoesnotexist}}
2190 {{thistemplatedoesnotexist}}
2195 pre-save transform: subst magic variables
2204 # This is bug 89, which I fixed. -- wtm
2206 pre-save transform: subst: templates with parameters
2210 {{subst:paramtest|param="something else"}}
2212 This is a test template with parameter "something else"
2218 <nowiki>'''not wiki'''</nowiki>
2222 pre-save transform: nowiki in subst (bug 1188)
2226 {{subst:nowikitest}}
2228 <nowiki>'''not wiki'''</nowiki>
2233 Template:commenttest
2235 This template has <!-- a comment --> in it.
2239 pre-save transform: comment in subst (bug 1936)
2243 {{subst:commenttest}}
2245 This template has <!-- a comment --> in it.
2252 <span onmouseover="alert('crap')">Oh no</span>
2256 (confirming safety of fix for subst bug 1936)
2258 {{Template:dangerous}}
2260 <p><span>Oh no</span>
2265 pre-save transform: comment containing gallery (bug 5024)
2269 <!-- <gallery>data</gallery> -->
2271 <!-- <gallery>data</gallery> -->
2275 pre-save transform: comment containing extension
2279 <!-- <tag>data</tag> -->
2281 <!-- <tag>data</tag> -->
2285 pre-save transform: comment containing nowiki
2289 <!-- <nowiki>data</nowiki> -->
2291 <!-- <nowiki>data</nowiki> -->
2295 pre-save transform: comment containing math
2299 <!-- <math>data</math> -->
2301 <!-- <math>data</math> -->
2306 ### Message transform tests
2309 message transform: magic variables
2319 message transform: should not transform wiki markup
2334 [[Image:foobar.jpg]]
2336 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2343 [[Image:foobar.jpg|right]]
2345 <div class="floatright"><span><a href="/wiki/Image:Foobar.jpg" class="image" title=""><img src="http://example.com/images/3/3a/Foobar.jpg" alt="" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div>
2352 [[Image:foobar.jpg|right|Caption text]]
2354 <div class="floatright"><span><a href="/wiki/Image:Foobar.jpg" class="image" title="Caption text"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="Caption text" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div>
2359 Image with frame and link
2361 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2363 <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="http://example.com/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>
2372 <p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2377 Frameless image caption with a free URL
2379 [[Image:foobar.jpg|http://example.com]]
2381 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="http://example.com"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="http://example.com" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2386 Thumbnail image caption with a free URL
2388 [[Image:foobar.jpg|thumb|http://example.com]]
2390 <div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="http://example.com"><img src="http://example.com/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>
2395 BUG 1887: A ISBN with a thumbnail
2397 [[Image:foobar.jpg|thumb|ISBN 12354]]
2399 <div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="ISBN 12354"><img src="http://example.com/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>
2403 BUG 1887: A <math> with a thumbnail
2405 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2407 <div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="2+2"><img src="http://example.com/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>
2410 # Pending resolution to bug 368
2412 BUG 648: Frameless image caption with a link
2414 [[Image:foobar.jpg|text with a [[link]] in it]]
2416 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a link in it"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="text with a link in it" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2421 BUG 648: Frameless image caption with a link (suffix)
2423 [[Image:foobar.jpg|text with a [[link]]foo in it]]
2425 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a linkfoo in it"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="text with a linkfoo in it" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2430 BUG 648: Frameless image caption with an interwiki link
2432 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
2434 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="text with a MeatBall:Link in it" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2439 BUG 648: Frameless image caption with a piped interwiki link
2441 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
2443 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a link in it"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="text with a link in it" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2448 Escape HTML special chars in image alt text
2450 [[Image:foobar.jpg|& < > "]]
2452 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="& < > ""><img src="http://example.com/images/3/3a/Foobar.jpg" alt="& < > "" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2457 BUG 499: Alt text should have Ӓ, not &1234;
2459 [[Image:foobar.jpg|♀]]
2461 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="♀"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="♀" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2466 Broken image caption with link
2468 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
2470 <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.
2475 Image caption containing another image
2477 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
2479 <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="http://example.com/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>
2484 Image caption containing a newline
2486 [[Image:Foobar.jpg|This
2489 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="This *is some text"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="This *is some text" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2495 Bug 3090: External links other than http: in image captions
2497 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
2499 <div class="thumb tright"><div style="width:202px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="This caption has irc and Secure ext links in it."><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" alt="This caption has irc and Secure ext links in it." width="200" height="23" 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 caption has <a href="irc://example.net" class='external text' title="irc://example.net" rel="nofollow">irc</a> and <a href="https://example.com" class='external text' title="https://example.com" rel="nofollow">Secure</a> ext links in it.</div></div></div>
2508 Subpage test/subpage
2516 subpage title=[[Subpage test]]
2520 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
2525 Subpage noslash link
2527 subpage title=[[Subpage test]]
2531 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
2540 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
2545 BUG 561: {{/Subpage}}
2547 subpage title=[[Page]]
2551 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
2559 Category:MediaWiki User's Guide
2567 [[:Category:MediaWiki User's Guide]]
2569 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
2578 [[Category: MediaWiki User's Guide]]
2580 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
2584 ### Inter-language links
2587 Inter-language links
2593 [[zh:食品]]
2595 es:Alimento fr:Nourriture zh:食品
2602 Basic section headings
2604 title=[[Parser test script]]
2611 ===Smaller headline===
2614 <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>
2617 <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>
2620 <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>
2626 Section headings with TOC
2628 title=[[Parser test script]]
2631 === Subheadline 1 ===
2632 ===== Skipping a level =====
2633 ====== Skipping a level ======
2637 ===Another headline===
2639 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2641 <li class='toclevel-1'><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
2643 <li class='toclevel-2'><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
2645 <li class='toclevel-3'><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
2647 <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>
2654 <li class='toclevel-1'><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
2656 <li class='toclevel-2'><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
2661 <script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2662 <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>
2663 <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>
2664 <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>
2665 <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>
2666 <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>
2669 <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>
2673 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
2675 Handling of sections up to level 6 and beyond
2678 == Level 2 Heading==
2679 === Level 3 Heading===
2680 ==== Level 4 Heading====
2681 ===== Level 5 Heading=====
2682 ====== Level 6 Heading======
2683 ======= Level 7 Heading=======
2684 ======== Level 8 Heading========
2685 ========= Level 9 Heading=========
2686 ========== Level 10 Heading==========
2688 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2690 <li class='toclevel-1'><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
2692 <li class='toclevel-2'><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
2694 <li class='toclevel-3'><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
2696 <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>
2698 <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>
2700 <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>
2701 <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>
2702 <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>
2703 <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>
2704 <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>
2717 <p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2719 <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>
2720 <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>
2721 <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>
2722 <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>
2723 <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>
2724 <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>
2725 <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>
2726 <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>
2727 <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>
2728 <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>
2733 Resolving duplicate section names
2735 title=[[Parser test script]]
2740 <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>
2741 <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>
2753 Template with sections, __NOTOC__
2755 title=[[Parser test script]]
2762 <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>
2763 <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>
2764 <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>
2765 <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>
2770 __NOEDITSECTION__ keyword
2776 <a name="Section_1"></a><h2>Section 1</h2>
2777 <a name="Section_2"></a><h2>Section 2</h2>
2782 Link inside a section heading
2784 title=[[Parser test script]]
2786 ==Section with a [[Main Page|link]] in it==
2788 <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>
2794 BUG 1219 URL next to image (good)
2796 http://example.com [[Image:foobar.jpg]]
2798 <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="http://example.com/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2803 BUG 1219 URL next to image (broken)
2805 http://example.com[[Image:foobar.jpg]]
2807 <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="http://example.com/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2812 Bug 1186 news: in the middle of text
2814 http://en.wikinews.org/wiki/Wikinews:Workplace
2816 <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>
2822 Namespaced link must have a title
2831 Namespaced link must have a title (bad fragment version)
2833 [[Project:#fragment]]
2835 <p>[[Project:#fragment]]
2841 div with no attributes
2843 <div>HTML rocks</div>
2845 <div>HTML rocks</div>
2850 div with double-quoted attribute
2852 <div id="rock">HTML rocks</div>
2854 <div id="rock">HTML rocks</div>
2859 div with single-quoted attribute
2861 <div id='rock'>HTML rocks</div>
2863 <div id="rock">HTML rocks</div>
2868 div with unquoted attribute
2870 <div id=rock>HTML rocks</div>
2872 <div id="rock">HTML rocks</div>
2877 div with illegal double attributes
2879 <div align="center" align="right">HTML rocks</div>
2881 <div align="right">HTML rocks</div>
2886 HTML multiple attributes correction
2888 <p class="error" class="awesome">Awesome!</p>
2890 <p class="awesome">Awesome!</p>
2895 Table multiple attributes correction
2898 !+ class="error" class="awesome"| status
2903 <th class="awesome"> status
2911 <DIV ALIGN="center">HTML ROCKS</DIV>
2913 <div align="center">HTML ROCKS</div>
2919 text with amp in the middle of nowhere
2923 <p>Remember AT&T?
2928 text with character entity: eacute
2930 I always thought é was a cute letter.
2932 <p>I always thought é was a cute letter.
2937 text with undefined character entity: xacute
2939 I always thought &xacute; was a cute letter.
2941 <p>I always thought &xacute; was a cute letter.
2953 [[Media:Foobar.jpg]]
2955 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Media:Foobar.jpg</a>
2960 Media link with text
2962 [[Media:Foobar.jpg|A neat file to look at]]
2964 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">A neat file to look at</a>
2968 # FIXME: this is still bad HTML tag nesting
2970 Media link with nasty text
2972 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
2974 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Safe Link<div style="display:none">" onmouseover="alert(document.cookie) onfoo="</div></a>
2979 Media link to nonexistent file (bug 1702)
2981 [[Media:No such.jpg]]
2983 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class='new' title="No such.jpg">Media:No such.jpg</a>
2988 Image link to nonexistent file (bug 1850 - good)
2990 [[Image:No such.jpg]]
2992 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
2997 :Image link to nonexistent file (bug 1850 - bad)
2999 [[:Image:No such.jpg]]
3001 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3008 Character reference normalization in link text (bug 1938)
3010 [[Main Page|this&that]]
3012 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3017 Empty attribute crash test (bug 2067)
3019 <font color="">foo</font>
3021 <p><font color="">foo</font>
3026 Empty attribute crash test single-quotes (bug 2067)
3028 <font color=''>foo</font>
3030 <p><font color="">foo</font>
3035 Attribute test: equals, then nothing
3037 <font color=>foo</font>
3044 Attribute test: unquoted value
3046 <font color=x>foo</font>
3048 <p><font color="x">foo</font>
3053 Attribute test: unquoted but illegal value (hash)
3055 <font color=#x>foo</font>
3057 <p><font color="#x">foo</font>
3062 Attribute test: no value
3064 <font color>foo</font>
3066 <p><font color="color">foo</font>
3071 Bug 2095: link with three closing brackets
3075 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3080 Bug 2095: link with pipe and three closing brackets
3084 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3094 Template:Dangerous attribute
3096 " onmouseover="alert(document.cookie)
3100 Template:Dangerous style attribute
3102 border-size: expression(alert(document.cookie))
3108 <div style="float: right; {{{1}}}">Magic div</div>
3112 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3114 <div title="{{test}}"></div>
3116 <div title="This is a test template"></div>
3121 Bug 2304: HTML attribute safety (dangerous template; 2309)
3123 <div title="{{dangerous attribute}}"></div>
3125 <div title=""></div>
3130 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3132 <div style="{{dangerous style attribute}}"></div>
3139 Bug 2304: HTML attribute safety (safe parameter; 2309)
3141 {{div style|width: 200px}}
3143 <div style="float: right; width: 200px">Magic div</div>
3148 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3150 {{div style|width: expression(alert(document.cookie))}}
3152 <div>Magic div</div>
3157 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3159 {{div style|"><script>alert(document.cookie)</script>}}
3161 <div>Magic div</div>
3166 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3168 {{div style|" ><script>alert(document.cookie)</script>}}
3170 <div style="float: right; ">Magic div</div>
3175 Bug 2304: HTML attribute safety (link)
3177 <div title="[[Main Page]]"></div>
3179 <div title="[[Main Page]]"></div>
3184 Bug 2304: HTML attribute safety (italics)
3186 <div title="''foobar''"></div>
3188 <div title="''foobar''"></div>
3193 Bug 2304: HTML attribute safety (bold)
3195 <div title="'''foobar'''"></div>
3197 <div title="'''foobar'''"></div>
3203 Bug 2304: HTML attribute safety (ISBN)
3205 <div title="ISBN 1234567890"></div>
3207 <div title="ISBN 1234567890"></div>
3212 Bug 2304: HTML attribute safety (RFC)
3214 <div title="RFC 1234"></div>
3216 <div title="RFC 1234"></div>
3221 Bug 2304: HTML attribute safety (PMID)
3223 <div title="PMID 1234567890"></div>
3225 <div title="PMID 1234567890"></div>
3230 Bug 2304: HTML attribute safety (web link)
3232 <div title="http://example.com/"></div>
3234 <div title="http://example.com/"></div>
3239 Bug 2304: HTML attribute safety (named web link)
3241 <div title="[http://example.com/ link]"></div>
3243 <div title="[http://example.com/ link]"></div>
3248 Bug 3244: HTML attribute safety (extension; safe)
3250 <div style="<nowiki>background:blue</nowiki>"></div>
3252 <div style="background:blue"></div>
3257 Bug 3244: HTML attribute safety (extension; unsafe)
3259 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3266 Math section safety when disabled
3268 <math><script>alert(document.cookies);</script></math>
3270 <p><math><script>alert(document.cookies);</script></math>
3274 # More MSIE fun discovered by Tom Gilder
3277 MSIE CSS safety test: spurious slash
3279 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3286 MSIE CSS safety test: hex code
3288 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3295 MSIE CSS safety test: comment in url
3297 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3299 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3304 MSIE CSS safety test: comment in expression
3306 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3308 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3314 Table attribute legitimate extension
3317 !+ style="<nowiki>color:blue</nowiki>"| status
3322 <th style="color:blue"> status
3328 Table attribute safety
3331 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3342 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3345 Parser hook: empty input
3358 Parser hook: empty input using terminated empty elements
3371 Parser hook: basic input
3385 Parser hook: case insensetive
3399 Parser hook: case insensetive, redux
3412 Parser hook: nested tags
3416 <tag><tag></tag></tag>
3427 Parser hook: basic arguments
3429 <tag width=200 height = "100" depth = '50' square></tag>
3448 Parser hook: empty input using terminated empty elements (bug 2374)
3462 # </tag> should be output literally since there is no matching tag that begins it
3464 Parser hook: basic arguments using terminated empty elements (bug 2374)
3466 <tag width=200 height = "100" depth = '50' square/>
3489 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
3493 Parser hook: static parser hook not inside a comment
3495 <statictag>hello, world</statictag>
3496 <statictag action=flush/>
3504 Parser hook: static parser hook inside a comment
3506 <!-- <statictag>hello, world</statictag> -->
3507 <statictag action=flush/>
3513 # Nested template calls; this case was broken by Parser.php rev 1.506,
3517 Template:One-parameter
3519 (My parameter is: {{{1}}})
3523 Template:Map-one-parameter
3529 Nested template calls
3531 {{Map-one-parameter|One-parameter|param}}
3533 <p>(My parameter is: param)
3542 Sanitizer: Closing of open tags
3544 <s></s><table></table>
3546 <s></s><table></table>
3551 Sanitizer: Closing of open but not closed tags
3560 Sanitizer: Closing of closed but not open tags
3569 Sanitizer: Closing of closed but not open table tags
3571 Table not started</td></tr></table>
3573 <p>Table not started</td></tr></table>
3578 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
3580 <span id="æ: v">byte</span>[[#æ: v|backlink]]
3582 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
3587 Sanitizer: Validating the contents of the id attribute (bug 4515)
3591 Something, but defenetly not <br id="9" />...