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 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # showtitle make the first line the title
25 # comment run through Linker::formatComment() instead of main parser
26 # local format section links in edit comment text as local links
28 # For testing purposes, temporary articles can created:
29 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
30 # where '/' denotes a newline.
32 # This is the standard article assumed to exist.
69 This is a simple paragraph.
71 <p>This is a simple paragraph.
91 * plain''italic''plain
92 * plain''italic''plain''italic''plain
93 * plain'''bold'''plain
94 * plain'''bold'''plain'''bold'''plain
95 * plain''italic''plain'''bold'''plain
96 * plain'''bold'''plain''italic''plain
97 * plain''italic'''bold-italic'''italic''plain
98 * plain'''bold''bold-italic''bold'''plain
99 * plain'''''bold-italic'''italic''plain
100 * plain'''''bold-italic''bold'''plain
101 * plain''italic'''bold-italic'''''plain
102 * plain'''bold''bold-italic'''''plain
103 * plain l'''italic''plain
104 * plain l''''bold''' plain
107 </li><li> plain<i>italic</i>plain
108 </li><li> plain<i>italic</i>plain<i>italic</i>plain
109 </li><li> plain<b>bold</b>plain
110 </li><li> plain<b>bold</b>plain<b>bold</b>plain
111 </li><li> plain<i>italic</i>plain<b>bold</b>plain
112 </li><li> plain<b>bold</b>plain<i>italic</i>plain
113 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
114 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
115 </li><li> plain<i><b>bold-italic</b>italic</i>plain
116 </li><li> plain<b><i>bold-italic</i>bold</b>plain
117 </li><li> plain<i>italic<b>bold-italic</b></i>plain
118 </li><li> plain<b>bold<i>bold-italic</i></b>plain
119 </li><li> plain l'<i>italic</i>plain
120 </li><li> plain l'<b>bold</b> plain
126 ### <nowiki> test cases
130 <nowiki> unordered list
132 <nowiki>* This is not an unordered list item.</nowiki>
134 <p>* This is not an unordered list item.
141 <nowiki>Lorem ipsum dolor
162 :There is not nowiki.
163 :There is <nowiki>nowiki</nowiki>.
165 #There is not nowiki.
166 #There is <nowiki>nowiki</nowiki>.
168 *There is not nowiki.
169 *There is <nowiki>nowiki</nowiki>.
171 <dl><dd>There is not nowiki.
172 </dd><dd>There is nowiki.
174 <ol><li>There is not nowiki.
175 </li><li>There is nowiki.
177 <ul><li>There is not nowiki.
178 </li><li>There is nowiki.
190 <!-- comment 1 --> asdf
226 asdf<!-- comment 1 -->jkl
236 <!-- foo --> b <!-- bar -->
250 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
256 Comment semantics and delimiters
258 <!-- --><!----><!-----><!------>
264 Comment semantics and delimiters, redux
266 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
267 -- foo -- funky huh? ... -->
273 Comment semantics and delimiters: directors cut
275 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
276 everything starting with < followed by !-- until the first -- and > we see,
277 that wouldn't be valid XML however, since in XML -- has to terminate a comment
285 Comment semantics: nesting
287 <!--<!-- no, we're not going to do anything fancy here -->-->
294 Comment semantics: unclosed comment at end
296 <!--This comment will run out to the end of the document
302 Comment in template title
311 Comment on its own line post-expand
323 ### Preformatted text
332 And a [[Main Page|link]]
338 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
343 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
360 Regression with preformatted in <center>
374 <pre> with attributes (bug 3202)
376 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
378 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
383 <pre> with width attribute (bug 3202)
385 <pre width="8">Narrow screen goodies</pre>
387 <pre width="8">Narrow screen goodies</pre>
392 <pre> with forbidden attribute (bug 3202)
394 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
396 <pre width="8">Narrow screen goodies</pre>
401 <pre> with forbidden attribute values (bug 3202)
403 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
405 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
417 <dl><dt> name </dt><dd> Definition
423 Definition list for indentation only
427 <dl><dd> Indented text
433 Definition list with no space
437 <dl><dt>name</dt><dd>Definition
443 Definition list with URL link
445 ; http://example.com/ : definition
447 <dl><dt> <a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> </dt><dd> definition
453 Definition list with bracketed URL link
455 ;[http://www.example.com/ Example]:Something about it
457 <dl><dt><a href="http://www.example.com/" class="external text" rel="nofollow">Example</a></dt><dd>Something about it
463 Definition list with wikilink containing colon
465 ; [[Help:FAQ]]: The least-read page on Wikipedia
467 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt><dd> The least-read page on Wikipedia
472 # At Brion's and JeLuF's insistence... :)
474 Definition list with news link containing colon
476 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
478 <dl><dt> <a href="news:alt.wikipedia.rox" class="external free" rel="nofollow">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
484 Malformed definition list with colon
486 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
488 <dl><dt> <a href="news:alt.wikipedia.rox" class="external free" rel="nofollow">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop
494 Definition lists: colon in external link text
496 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
498 <dl><dt> <a href="http://www.wikipedia2.org/" class="external text" rel="nofollow">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up
504 Definition lists: colon in HTML attribute
506 ;<b style="display: inline">bold</b>
508 <dl><dt><b style="display: inline">bold</b>
515 Definition lists: self-closed tag
517 ;one<br/>two : two-line fun
519 <dl><dt>one<br />two </dt><dd> two-line fun
529 External links: non-bracketed
531 Non-bracketed: http://example.com
533 <p>Non-bracketed: <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>
538 External links: numbered
540 Numbered: [http://example.com]
541 Numbered: [http://example.net]
542 Numbered: [http://example.com]
544 <p>Numbered: <a href="http://example.com" class="external autonumber" rel="nofollow">[1]</a>
545 Numbered: <a href="http://example.net" class="external autonumber" rel="nofollow">[2]</a>
546 Numbered: <a href="http://example.com" class="external autonumber" rel="nofollow">[3]</a>
551 External links: specified text
553 Specified text: [http://example.com link]
555 <p>Specified text: <a href="http://example.com" class="external text" rel="nofollow">link</a>
560 External links: trail
562 Linktrails should not work for external links: [http://example.com link]s
564 <p>Linktrails should not work for external links: <a href="http://example.com" class="external text" rel="nofollow">link</a>s
569 External links: dollar sign in URL
571 http://example.com/1$2345
573 <p><a href="http://example.com/1$2345" class="external free" rel="nofollow">http://example.com/1$2345</a>
578 External links: dollar sign in URL (named)
580 [http://example.com/1$2345]
582 <p><a href="http://example.com/1$2345" class="external autonumber" rel="nofollow">[1]</a>
587 External links: open square bracket forbidden in URL (bug 4377)
589 http://example.com/1[2345
591 <p><a href="http://example.com/1" class="external free" rel="nofollow">http://example.com/1</a>[2345
596 External links: open square bracket forbidden in URL (named) (bug 4377)
598 [http://example.com/1[2345]
600 <p><a href="http://example.com/1" class="external text" rel="nofollow">[2345</a>
605 External links: nowiki in URL link text (bug 6230)
607 [http://example.com/ <nowiki>''example site''</nowiki>]
609 <p><a href="http://example.com/" class="external text" rel="nofollow">''example site''</a>
614 External links: newline forbidden in text (bug 6230 regression check)
616 [http://example.com/ first
619 <p>[<a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> first
627 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
629 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
634 External image from https
636 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
638 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
643 Link to non-http image, no img tag
645 Link to non-http image, no img tag: ftp://example.com/test.jpg
647 <p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class="external free" rel="nofollow">ftp://example.com/test.jpg</a>
652 External links: terminating separator
654 Terminating separator: http://example.com/thing,
656 <p>Terminating separator: <a href="http://example.com/thing" class="external free" rel="nofollow">http://example.com/thing</a>,
661 External links: intervening separator
663 Intervening separator: http://example.com/1,2,3
665 <p>Intervening separator: <a href="http://example.com/1,2,3" class="external free" rel="nofollow">http://example.com/1,2,3</a>
670 External links: old bug with URL in query
672 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
674 <p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class="external text" rel="nofollow">link</a>
679 External links: old URL-in-URL bug, mixed protocols
681 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
683 <p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class="external text" rel="nofollow">link</a>
688 External links: URL in text
690 URL in text: [http://example.com http://example.com]
692 <p>URL in text: <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>
697 External links: Clickable images
699 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
701 <p>ja-style clickable images: <a href="http://example.com" class="external text" rel="nofollow"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a>
706 External links: raw ampersand
708 Old & use: http://x&y
710 <p>Old & use: <a href="http://x&y" class="external free" rel="nofollow">http://x&y</a>
715 External links: encoded ampersand
717 Old & use: http://x&y
719 <p>Old & use: <a href="http://x&y" class="external free" rel="nofollow">http://x&y</a>
724 External links: encoded equals (bug 6102)
726 http://example.com/?foo=bar
728 <p><a href="http://example.com/?foo=bar" class="external free" rel="nofollow">http://example.com/?foo=bar</a>
733 External links: [raw ampersand]
735 Old & use: [http://x&y]
737 <p>Old & use: <a href="http://x&y" class="external autonumber" rel="nofollow">[1]</a>
742 External links: [encoded ampersand]
744 Old & use: [http://x&y]
746 <p>Old & use: <a href="http://x&y" class="external autonumber" rel="nofollow">[1]</a>
751 External links: [encoded equals] (bug 6102)
753 [http://example.com/?foo=bar]
755 <p><a href="http://example.com/?foo=bar" class="external autonumber" rel="nofollow">[1]</a>
760 External links: [IDN ignored character reference in hostname; strip it right off]
762 [http://e‌xample.com/]
764 <p><a href="http://example.com/" class="external autonumber" rel="nofollow">[1]</a>
769 External links: IDN ignored character reference in hostname; strip it right off
771 http://e‌xample.com/
773 <p><a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a>
778 External links: www.jpeg.org (bug 554)
782 <p><a href="http://www.jpeg.org" class="external free" rel="nofollow">http://www.jpeg.org</a>
787 External links: URL within URL (original bug 2)
789 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
791 <p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class="external autonumber" rel="nofollow">[1]</a>
796 BUG 361: URL inside bracketed URL
798 [http://www.example.com/foo http://www.example.com/bar]
800 <p><a href="http://www.example.com/foo" class="external text" rel="nofollow">http://www.example.com/bar</a>
805 BUG 361: URL within URL, not bracketed
807 http://www.example.com/foo?=http://www.example.com/bar
809 <p><a href="http://www.example.com/foo?=http://www.example.com/bar" class="external free" rel="nofollow">http://www.example.com/foo?=http://www.example.com/bar</a>
814 BUG 289: ">"-token in URL-tail
816 http://www.example.com/<hello>
818 <p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a><hello>
823 BUG 289: literal ">"-token in URL-tail
825 http://www.example.com/<b>html</b>
827 <p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a><b>html</b>
832 BUG 289: ">"-token in bracketed URL
834 [http://www.example.com/<hello> stuff]
836 <p><a href="http://www.example.com/" class="external text" rel="nofollow"><hello> stuff</a>
841 BUG 289: literal ">"-token in bracketed URL
843 [http://www.example.com/<b>html</b> stuff]
845 <p><a href="http://www.example.com/" class="external text" rel="nofollow"><b>html</b> stuff</a>
850 BUG 289: literal double quote at end of URL
852 http://www.example.com/"hello"
854 <p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a>"hello"
859 BUG 289: literal double quote in bracketed URL
861 [http://www.example.com/"hello" stuff]
863 <p><a href="http://www.example.com/" class="external text" rel="nofollow">"hello" stuff</a>
868 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
870 [http://www.example.com test]
872 <p><a href="http://www.example.com" class="external text" rel="nofollow">test</a>
877 External links: wiki links within external link (Bug 3695)
879 [http://example.com [[wikilink]] embedded in ext link]
881 <p><a href="http://example.com" class="external text" rel="nofollow"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a href="http://example.com" class="external text" rel="nofollow"> embedded in ext link</a>
886 BUG 787: Links with one slash after the url protocol are invalid
890 [http:/example.com title]
893 </p><p>[http:/example.com title]
898 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
900 ''[http://example.com text'']
901 [http://example.com '''text]'''
902 ''Something [http://example.com in italic'']
903 ''Something [http://example.com mixed''''', even bold]'''
904 '''''Now [http://example.com both''''']
906 <p><a href="http://example.com" class="external text" rel="nofollow"><i>text</i></a>
907 <a href="http://example.com" class="external text" rel="nofollow"><b>text</b></a>
908 <i>Something </i><a href="http://example.com" class="external text" rel="nofollow"><i>in italic</i></a>
909 <i>Something </i><a href="http://example.com" class="external text" rel="nofollow"><i>mixed</i><b>, even bold</b></a>
910 <i><b>Now </b></i><a href="http://example.com" class="external text" rel="nofollow"><i><b>both</b></i></a>
918 http://www.example.com/?title=AT%26T
920 <p><a href="http://www.example.com/?title=AT%26T" class="external free" rel="nofollow">http://www.example.com/?title=AT%26T</a>
925 Bug 4781, 5267: %26 in URL
927 http://www.example.com/?title=100%25_Bran
929 <p><a href="http://www.example.com/?title=100%25_Bran" class="external free" rel="nofollow">http://www.example.com/?title=100%25_Bran</a>
934 Bug 4781, 5267: %28, %29 in URL
936 http://www.example.com/?title=Ben-Hur_%281959_film%29
938 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external free" rel="nofollow">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
944 Bug 4781: %26 in autonumber URL
946 [http://www.example.com/?title=AT%26T]
948 <p><a href="http://www.example.com/?title=AT%26T" class="external autonumber" rel="nofollow">[1]</a>
953 Bug 4781, 5267: %26 in autonumber URL
955 [http://www.example.com/?title=100%25_Bran]
957 <p><a href="http://www.example.com/?title=100%25_Bran" class="external autonumber" rel="nofollow">[1]</a>
962 Bug 4781, 5267: %28, %29 in autonumber URL
964 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
966 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external autonumber" rel="nofollow">[1]</a>
972 Bug 4781: %26 in bracketed URL
974 [http://www.example.com/?title=AT%26T link]
976 <p><a href="http://www.example.com/?title=AT%26T" class="external text" rel="nofollow">link</a>
981 Bug 4781, 5267: %26 in bracketed URL
983 [http://www.example.com/?title=100%25_Bran link]
985 <p><a href="http://www.example.com/?title=100%25_Bran" class="external text" rel="nofollow">link</a>
990 Bug 4781, 5267: %28, %29 in bracketed URL
992 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
994 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external text" rel="nofollow">link</a>
999 External link containing double-single-quotes in text '' (bug 4598 sanity check)
1001 Some [http://example.com/ pretty ''italics'' and stuff]!
1003 <p>Some <a href="http://example.com/" class="external text" rel="nofollow">pretty <i>italics</i> and stuff</a>!
1008 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
1010 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
1012 <p><i>Some </i><a href="http://example.com/" class="external text" rel="nofollow"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
1017 External link containing double-single-quotes with no space separating the url from text in italics
1019 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
1021 <p><a href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm" class="external text" rel="nofollow"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a>
1026 URL-encoding in URL functions (single parameter)
1028 {{localurl:Some page|amp=&}}
1030 <p>/index.php?title=Some_page&amp=&
1035 URL-encoding in URL functions (multiple parameters)
1037 {{localurl:Some page|q=?&=&}}
1039 <p>/index.php?title=Some_page&q=?&amp=&
1050 Normal text. '''Bold text.''' Normal text. ''Italic text.''
1052 Normal text. '''''Bold italic text.''''' Normal text.
1054 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
1055 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
1061 Unclosed and unmatched quotes
1063 '''''Bold italic text '''with bold deactivated''' in between.'''''
1065 '''''Bold italic text ''with italic deactivated'' in between.'''''
1069 ..spanning two paragraphs (should not work).'''
1071 '''Bold tag left open
1073 ''Italic tag left open
1077 <!-- Unmatching number of opening, closing tags: -->
1078 '''This year''''s election ''should'' beat '''last year''''s.
1080 ''Tom'''s car is bigger than ''Susan'''s.
1082 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
1083 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
1084 </p><p><b>Bold text..</b>
1085 </p><p>..spanning two paragraphs (should not work).
1086 </p><p><b>Bold tag left open</b>
1087 </p><p><i>Italic tag left open</i>
1089 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
1090 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
1097 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
1100 # This should not produce <table></table> as <table><tr><td></td></tr></table>
1101 # is the bare minimun required by the spec, see:
1102 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
1104 A table with no data.
1110 # A table with nothing but a caption is invalid XHTML, we might want to render
1111 # this as <p>caption</p>
1113 A table with nothing but a caption
1121 </caption><tr><td></td></tr></table>
1145 Multiplication table
1147 {| border="1" cellpadding="2"
1148 |+Multiplication table
1150 ! × !! 1 !! 2 !! 3
1168 <table border="1" cellpadding="2">
1169 <caption>Multiplication table
1172 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1176 </th><td> 1 </td><td> 2 </td><td> 3
1180 </th><td> 2 </td><td> 4 </td><td> 6
1184 </th><td> 3 </td><td> 6 </td><td> 9
1188 </th><td> 4 </td><td> 8 </td><td> 12
1192 </th><td> 5 </td><td> 10 </td><td> 15
1200 {| align=right border=1
1202 |rowspan=2| Cell 2, row 1 (and 2)
1209 <table align="right" border="1">
1212 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1213 </td><td> Cell 3, row 1
1217 </td><td> Cell 3, row 2
1228 {| bgcolor=#ABCDEF border=2
1233 |the original table again
1240 <table bgcolor="#ABCDEF" border="2">
1247 </td><td>the original table again
1253 Invalid attributes in table cell (bug 1830)
1267 # FIXME: It's not clear at all that this is the result we want, but the actual
1268 # output right now is invalid XML, so clearly something is wrong. The result
1269 # specified here is now valid XML, which is an improvement . . .
1271 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
1276 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1280 <td><a href="ftp://|x||" class="external autonumber" title="ftp://|x||" rel="nofollow">[1]</a></td><td>" onmouseover="alert(document.cookie)">test
1292 Plain link, capitalized
1296 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1301 Plain link, uncapitalized
1305 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1312 [[Main Page|The Main Page]]
1314 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1323 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
1328 Broken link with fragment
1330 [[Zigzagzogzagzig#zug]]
1332 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
1337 Special page link with fragment
1339 [[Special:Version#anchor]]
1341 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
1346 Nonexistent special page link with fragment
1348 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
1350 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
1357 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1359 <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>
1366 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
1368 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
1373 Link with 3 brackets
1382 Piped link with 3 brackets
1384 [[[main page|the main page]]]
1386 <p>[[[main page|the main page]]]
1391 Link with multiple pipes
1393 [[Main Page|The|Main|Page]]
1395 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1402 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1404 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
1409 Piped link to namespace
1411 [[Meta:Disclaimers|The disclaimers]]
1413 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
1420 [[Usually caused by a typo (oops}]]
1422 <p>[[Usually caused by a typo (oops}]]
1427 Link containing % (not as a hex sequence)
1431 <p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a>
1436 Link containing % as a single hex sequence interpreted to char
1440 <p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a>
1445 Link containing % as a double hex sequence interpreted to hex sequence
1449 <p>[[7%2525 Solution]]
1454 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1455 Example for such a section: == < ==
1457 [[%23%3c]][[%23%3e]]
1459 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
1464 Link containing "<#" and ">#" as a hex sequences
1466 [[%3c%23]][[%3e%23]]
1468 <p>[[%3c%23]][[%3e%23]]
1473 Link containing double-single-quotes '' (bug 4598)
1475 [[Lista d''e paise d''o munno]]
1477 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
1482 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1484 Some [[Link|pretty ''italics'' and stuff]]!
1486 <p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
1491 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1493 ''Some [[Link|pretty ''italics'' and stuff]]!
1495 <p><i>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
1500 Link with double quotes in title part (literal) and alternate part (interpreted)
1502 [[File:Denys Savchenko ''Pentecoste''.jpg]]
1506 [[''Pentecoste''|Pentecoste]]
1508 [[''Pentecoste''|''Pentecoste'']]
1510 <p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
1511 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
1512 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
1513 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a>
1520 [[http://www.example.com]]
1522 <p>[<a href="http://www.example.com" class="external autonumber" rel="nofollow">[1]</a>]
1526 # I'm fairly sure the expected result here is wrong.
1527 # We want these to be URL links, not pseudo-pages with URLs for titles....
1528 # However the current output is also pretty screwy.
1531 # I'm changing it to match the current output--it arguably makes more
1532 # sense in the light of the test above. Old expected result was:
1533 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
1535 # But I think this test is bordering on "garbage in, garbage out" anyway.
1540 Piped link to URL: [[http://www.example.com|an example URL]]
1542 <p>Piped link to URL: [<a href="http://www.example.com%7Can" class="external text" rel="nofollow">example URL</a>]
1547 BUG 2: [[page|http://url/]] should link to page, not http://url/
1549 [[Main Page|http://url/]]
1551 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1556 BUG 337: Escaped self-links should be bold
1560 [[Bug462]] [[Bug462]]
1562 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1567 Self-link to section should not be bold
1571 [[Main Page#section]]
1573 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1584 Self-link to numeric title
1590 <p><strong class="selflink">0</strong>
1595 Link to numeric-equivalent title
1601 <p><a href="/wiki/00" title="00">00</a>
1606 <nowiki> inside a link
1608 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1610 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1615 Non-breaking spaces in title
1617 [[ Main Page ]]
1619 <p><a href="/wiki/Main_Page" title="Main Page"> Main Page </a>
1625 ### Interwiki links (see maintenance/interwiki.sql)
1629 Inline interwiki link
1631 [[MeatBall:SoftSecurity]]
1633 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1638 Inline interwiki link with empty title (bug 2372)
1642 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw" title="meatball:">MeatBall:</a>
1647 Interwiki link encoding conversion (bug 1636)
1649 *[[Wikipedia:ro:Olteniţa]]
1650 *[[Wikipedia:ro:Olteniţa]]
1652 <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>
1653 </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>
1659 Interwiki link with fragment (bug 2130)
1661 [[MeatBall:SoftSecurity#foo]]
1663 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1678 Double interlanguage link
1689 Interlanguage link, with prefix links
1701 Double interlanguage link, with prefix links (bug 8897)
1728 Incorrecly removing closing slashes from correctly formed XHTML
1730 <br style="clear:both;" />
1732 <p><br style="clear:both;" />
1737 Failing to transform badly formed HTML into correct XHTML
1743 <p><br clear="left" />
1744 <br clear="right" />
1750 Horizontal ruler (should it add that extra space?)
1764 ### Block-level elements
1787 <ol><li>Numbered list
1804 ***#Number on level 4
1806 **#Number on level 3
1807 **#Number on level 3
1812 <ol><li> with numbers
1814 <ul><li> and bullets
1816 <ol><li> and numbers
1818 </li><li>bullets again
1819 <ul><li>bullet level 2
1820 <ul><li>bullet level 3
1821 <ol><li>Number on level 4
1824 </li><li>bullet level 2
1825 <ol><li>Number on level 3
1826 </li><li>Number on level 3
1829 <ol><li>number level 2
1837 List items are not parsed correctly following a <pre> block (bug 785)
1843 <ul><li> <pre>foo</pre>
1844 </li><li> <pre>bar</pre>
1855 Magic Word: {{CURRENTDAY}}
1864 Magic Word: {{CURRENTDAY2}}
1873 Magic Word: {{CURRENTDAYNAME}}
1882 Magic Word: {{CURRENTDOW}}
1891 Magic Word: {{CURRENTMONTH}}
1900 Magic Word: {{CURRENTMONTHABBREV}}
1902 {{CURRENTMONTHABBREV}}
1909 Magic Word: {{CURRENTMONTHNAME}}
1911 {{CURRENTMONTHNAME}}
1918 Magic Word: {{CURRENTMONTHNAMEGEN}}
1920 {{CURRENTMONTHNAMEGEN}}
1927 Magic Word: {{CURRENTTIME}}
1936 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1945 Magic Word: {{CURRENTYEAR}}
1954 Magic Word: {{FULLPAGENAME}}
1956 title=[[User:Ævar Arnfjörð Bjarmason]]
1960 <p>User:Ævar Arnfjörð Bjarmason
1965 Magic Word: {{FULLPAGENAMEE}}
1967 title=[[User:Ævar Arnfjörð Bjarmason]]
1971 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1976 Magic Word: {{NAMESPACE}}
1978 title=[[User:Ævar Arnfjörð Bjarmason]]
1987 Magic Word: {{NAMESPACEE}}
1989 title=[[User:Ævar Arnfjörð Bjarmason]]
1998 Magic Word: {{NUMBEROFFILES}}
2007 Magic Word: {{PAGENAME}}
2009 title=[[User:Ævar Arnfjörð Bjarmason]]
2013 <p>Ævar Arnfjörð Bjarmason
2018 Magic Word: {{PAGENAMEE}}
2020 title=[[User:Ævar Arnfjörð Bjarmason]]
2024 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
2029 Magic Word: {{REVISIONID}}
2038 Magic Word: {{SCRIPTPATH}}
2047 Magic Word: {{SERVER}}
2051 <p><a href="http://localhost" class="external free" rel="nofollow">http://localhost</a>
2056 Magic Word: {{SERVERNAME}}
2065 Magic Word: {{SITENAME}}
2074 Namespace 1 {{ns:1}}
2083 Namespace 1 {{ns:01}}
2092 Namespace 0 {{ns:0}} (bug 4783)
2100 Namespace 0 {{ns:00}} (bug 4783)
2108 Namespace -1 {{ns:-1}}
2117 Namespace User {{ns:User}}
2126 Namespace User talk {{ns:User_talk}}
2135 Namespace User talk {{ns:uSeR tAlK}}
2144 Namespace File {{ns:File}}
2153 Namespace File {{ns:Image}}
2162 Namespace (lang=de) Benutzer {{ns:User}}
2173 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
2179 <p>Benutzer Diskussion
2187 {{urlencode:hi world?!}}
2188 {{urlencode:hi world?!|WIKI}}
2189 {{urlencode:hi world?!|PATH}}
2190 {{urlencode:hi world?!|QUERY}}
2203 Magic links: internal link to RFC (bug 479)
2207 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
2212 Magic links: RFC (bug 479)
2216 <p><a href="http://tools.ietf.org/html/rfc822" class="external mw-magiclink-rfc">RFC 822</a>
2221 Magic links: ISBN (bug 1937)
2225 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
2230 Magic links: PMID incorrectly converts space to underscore
2234 <p><a href="http://www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" class="external mw-magiclink-pmid">PMID 1234</a>
2243 Nonexistent template
2245 {{thistemplatedoesnotexist}}
2247 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
2254 This is a test template
2262 <p>This is a test template
2267 Template with explicit namespace
2271 <p>This is a test template
2279 This is a test template with parameter {{{param}}}
2285 {{paramtest|param=foo}}
2287 <p>This is a test template with parameter foo
2292 Template:paramtestnum
2298 Template unnamed parameter
2300 {{paramtestnum|Main Page|the main page}}
2302 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2307 Template:templatesimple
2313 Template:templateredirect
2315 #redirect [[Template:templatesimple]]
2319 Template:templateasargtestnum
2325 Template:templateasargtest
2327 {{template{{{templ}}}}}
2331 Template:templateasargtest2
2337 Template with template name as unnamed argument
2339 {{templateasargtestnum|templatesimple}}
2346 Template with template name as argument
2348 {{templateasargtest|templ=simple}}
2355 Template with template name as argument (2)
2357 {{templateasargtest2|templ=templatesimple}}
2364 Template:templateasargtestdefault
2366 {{{{{templ|templatesimple}}}}}
2376 Template with default value
2378 {{templateasargtestdefault}}
2385 Template with default value (value set)
2387 {{templateasargtestdefault|templ=templa}}
2396 {{templateredirect}}
2403 Template with argument in separate line
2405 {{ templateasargtest |
2413 Template with complex template as argument
2416 param ={{ templateasargtest |
2419 <p>This is a test template with parameter (test)
2424 Template with thumb image (with link in description)
2427 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2429 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
2434 Template:complextemplate
2436 {{{1}}} {{paramtest|
2437 param ={{{param}}}}}
2441 Template with complex arguments
2444 param ={{ templateasargtest |
2445 templ = simple }}|[[Template:complextemplate|link]]}}
2447 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2452 BUG 553: link with two variables in a piped link
2455 |[[{{{1}}}|{{{2}}}]]
2460 <td>[[{{{1}}}|{{{2}}}]]
2466 Magic variable as template parameter
2468 {{paramtest|param={{SITENAME}}}}
2470 <p>This is a test template with parameter MediaWiki
2477 [[{{{param}}}|link]]
2481 Template parameter as link source
2483 {{linktest|param=Main Page}}
2485 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2493 including another template, {{paramtest|param={{{arg}}}}}
2497 Template passing argument to another template
2499 {{paramtest2|arg='hmm'}}
2501 <p>including another template, This is a test template with parameter 'hmm'
2512 Template as link source
2516 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2534 Template infinite loop
2538 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
2543 Template from main namespace
2562 BUG 529: Template with table, not included at beginning of line
2579 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2597 BUG 41: Template parameters shown as broken links
2609 ''None'' of '''this''' should be
2611 but rather passed unmodified
2615 # hmm, fix this or just deprecate msgnw and document its behavior?
2621 {{msgnw:MSGNW test}}
2623 <p>''None'' of '''this''' should be
2625 but rather passed unmodified
2633 {{int:youhavenewmessages|lots of money|not!}}
2635 <p>You have lots of money (not!).
2642 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2646 <includeonly> and <noinclude> being included
2657 <onlyinclude>Foo</onlyinclude>bar
2661 <onlyinclude> being included
2673 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2677 <onlyinclude> and <includeonly> being included
2686 <includeonly> and <noinclude> on a page
2688 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2695 <onlyinclude> on a page
2697 <onlyinclude>Foo</onlyinclude>bar
2704 Template:Includeonly section
2707 ==Includeonly section==
2713 Bug 6563: Edit link generation for section shown by <includeonly>
2715 {{includeonly section}}
2717 <h2><span class="editsection">[<a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a>]</span> <span class="mw-headline" id="Includeonly_section">Includeonly section</span></h2>
2718 <h2><span class="editsection">[<a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a>]</span> <span class="mw-headline" id="Section_T-1">Section T-1</span></h2>
2722 # Uses same input as the contents of [[Template:Includeonly section]]
2724 Bug 6563: Section extraction for section shown by <includeonly>
2729 ==Includeonly section==
2737 Bug 6563: Edit link generation for section suppressed by <includeonly>
2740 ==Includeonly section==
2744 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a>]</span> <span class="mw-headline" id="Section_1">Section 1</span></h2>
2749 Bug 6563: Section extraction for section suppressed by <includeonly>
2754 ==Includeonly section==
2762 ### Pre-save transform tests
2765 pre-save transform: subst:
2771 This is a test template
2775 pre-save transform: normal template
2785 pre-save transform: nonexistent template
2789 {{thistemplatedoesnotexist}}
2791 {{thistemplatedoesnotexist}}
2796 pre-save transform: subst magic variables
2805 # This is bug 89, which I fixed. -- wtm
2807 pre-save transform: subst: templates with parameters
2811 {{subst:paramtest|param="something else"}}
2813 This is a test template with parameter "something else"
2819 <nowiki>'''not wiki'''</nowiki>
2823 pre-save transform: nowiki in subst (bug 1188)
2827 {{subst:nowikitest}}
2829 <nowiki>'''not wiki'''</nowiki>
2834 Template:commenttest
2836 This template has <!-- a comment --> in it.
2840 pre-save transform: comment in subst (bug 1936)
2844 {{subst:commenttest}}
2846 This template has <!-- a comment --> in it.
2850 pre-save transform: unclosed tag
2854 <nowiki>'''not wiki'''
2856 <nowiki>'''not wiki'''
2860 pre-save transform: mixed tag case
2864 <NOwiki>'''not wiki'''</noWIKI>
2866 <NOwiki>'''not wiki'''</noWIKI>
2870 pre-save transform: unclosed comment in <nowiki>
2874 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2876 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2882 <span onmouseover="alert('crap')">Oh no</span>
2886 (confirming safety of fix for subst bug 1936)
2888 {{Template:dangerous}}
2890 <p><span>Oh no</span>
2895 pre-save transform: comment containing gallery (bug 5024)
2899 <!-- <gallery>data</gallery> -->
2901 <!-- <gallery>data</gallery> -->
2905 pre-save transform: comment containing extension
2909 <!-- <tag>data</tag> -->
2911 <!-- <tag>data</tag> -->
2915 pre-save transform: comment containing nowiki
2919 <!-- <nowiki>data</nowiki> -->
2921 <!-- <nowiki>data</nowiki> -->
2925 pre-save transform: comment containing math
2929 <!-- <math>data</math> -->
2931 <!-- <math>data</math> -->
2935 pre-save transform: <noinclude> in subst (bug 3298)
2945 pre-save transform: <onlyinclude> in subst (bug 3298)
2957 {{<includeonly>subst:</includeonly>Includes}}
2961 Template:SafeSubstTest
2963 {{<includeonly>safesubst:</includeonly>Includes}}
2967 bug 22297: safesubst: works during PST
2971 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
2977 bug 22297: safesubst: works during normal parse
2986 subst: does not work during normal parse
2990 <p>{{subst:Includes}}
2995 pre-save transform: context links ("pipe trick")
2999 [[Article (context)|]]
3002 [[Bar:Article (context)|]]
3003 [[:Bar:Article (context)|]]
3005 [[|Article (context)]]
3009 [[Article (context)|Article]]
3010 [[Bar:Article|Article]]
3011 [[:Bar:Article|Article]]
3012 [[Bar:Article (context)|Article]]
3013 [[:Bar:Article (context)|Article]]
3015 [[Article (context)]]
3016 [[Bar:X (Y) Z|X (Y) Z]]
3017 [[:Bar:X (Y) Z|X (Y) Z]]
3021 pre-save transform: context links ("pipe trick") with interwiki prefix
3025 [[interwiki:Article|]]
3026 [[:interwiki:Article|]]
3027 [[interwiki:Bar:Article|]]
3028 [[:interwiki:Bar:Article|]]
3030 [[interwiki:Article|Article]]
3031 [[:interwiki:Article|Article]]
3032 [[interwiki:Bar:Article|Bar:Article]]
3033 [[:interwiki:Bar:Article|Bar:Article]]
3037 pre-save transform: context links ("pipe trick") with parens in title
3039 pst title=[[Somearticle (context)]]
3043 [[Article (context)|Article]]
3047 pre-save transform: context links ("pipe trick") with comma in title
3049 pst title=[[Someplace, Somewhere]]
3052 [[Otherplace, Elsewhere|]]
3053 [[Otherplace, Elsewhere, Anywhere|]]
3055 [[Otherplace, Somewhere|Otherplace]]
3056 [[Otherplace, Elsewhere|Otherplace]]
3057 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
3061 pre-save transform: context links ("pipe trick") with parens and comma
3063 pst title=[[Someplace (IGNORED), Somewhere]]
3066 [[Otherplace (place), Elsewhere|]]
3068 [[Otherplace, Somewhere|Otherplace]]
3069 [[Otherplace (place), Elsewhere|Otherplace]]
3073 pre-save transform: context links ("pipe trick") with comma and parens
3075 pst title=[[Who, me? (context)]]
3078 [[Me, Myself, and I (1937 song)|]]
3080 [[Yes, you. (context)|Yes, you.]]
3081 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
3085 pre-save transform: context links ("pipe trick") with namespace
3087 pst title=[[Ns:Somearticle]]
3091 [[Ns:Article|Article]]
3095 pre-save transform: context links ("pipe trick") with namespace and parens
3097 pst title=[[Ns:Somearticle (context)]]
3101 [[Ns:Article (context)|Article]]
3105 pre-save transform: context links ("pipe trick") with namespace and comma
3107 pst title=[[Ns:Somearticle, Context, Whatever]]
3111 [[Ns:Article, Context, Whatever|Article]]
3115 pre-save transform: context links ("pipe trick") with namespace, comma and parens
3117 pst title=[[Ns:Somearticle, Context (context)]]
3121 [[Ns:Article (context)|Article]]
3125 pre-save transform: context links ("pipe trick") with namespace, parens and comma
3127 pst title=[[Ns:Somearticle (IGNORED), Context]]
3131 [[Ns:Article, Context|Article]]
3136 ### Message transform tests
3139 message transform: magic variables
3149 message transform: should not transform wiki markup
3159 message transform: <noinclude> in transcluded template (bug 4926)
3169 message transform: <onlyinclude> in transcluded template (bug 4926)
3179 {{#special:}} page name, known
3183 {{#special:Recentchanges}}
3185 Special:RecentChanges
3189 {{#special:}} page name with subpage, known
3193 {{#special:Recentchanges/param}}
3195 Special:RecentChanges/param
3199 {{#special:}} page name, unknown
3203 {{#special:foobarnonexistent}}
3205 No such special page
3214 [[Image:foobar.jpg]]
3216 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3223 [[Image:foobar.jpg|right]]
3225 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
3230 Simple image (using File: namespace, now canonical)
3234 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3241 [[Image:foobar.jpg|right|Caption text]]
3243 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
3248 Image with link parameter, wiki target
3250 [[Image:foobar.jpg|link=Target page]]
3252 <p><a href="/wiki/Target_page" title="Target page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3257 Image with link parameter, URL target
3259 [[Image:foobar.jpg|link=http://example.com/]]
3261 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3266 Image with empty link parameter
3268 [[Image:foobar.jpg|link=]]
3270 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
3275 Image with link parameter (wiki target) and unnamed parameter
3277 [[Image:foobar.jpg|link=Target page|Title]]
3279 <p><a href="/wiki/Target_page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3284 Image with link parameter (URL target) and unnamed parameter
3286 [[Image:foobar.jpg|link=http://example.com/|Title]]
3288 <p><a href="http://example.com/" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3293 Thumbnail image with link parameter
3295 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
3297 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
3302 Image with frame and link
3304 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
3306 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
3311 Image with frame and link and explicit alt
3313 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
3315 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
3320 Image with wiki markup in implicit alt
3322 [[Image:Foobar.jpg|testing '''bold''' in alt]]
3324 <p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3329 Image with wiki markup in explicit alt
3331 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
3333 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3338 Link to image page- image page normally doesn't exists, hence edit link
3339 Add test with existing image page
3340 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
3344 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
3349 bug 18784 Link to non-existent image page with caption should use caption as link text
3351 [[:Image:test|caption]]
3353 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
3358 Frameless image caption with a free URL
3360 [[Image:foobar.jpg|http://example.com]]
3362 <p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3367 Thumbnail image caption with a free URL
3369 [[Image:foobar.jpg|thumb|http://example.com]]
3371 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a></div></div></div>
3376 Thumbnail image caption with a free URL and explicit alt
3378 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
3380 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a></div></div></div>
3385 BUG 1887: A ISBN with a thumbnail
3387 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
3389 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
3394 BUG 1887: A RFC with a thumbnail
3396 [[Image:foobar.jpg|thumb|This is RFC 12354]]
3398 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is <a href="http://tools.ietf.org/html/rfc12354" class="external mw-magiclink-rfc">RFC 12354</a></div></div></div>
3403 BUG 1887: A mailto link with a thumbnail
3405 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
3407 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Please <a href="mailto:nobody@example.com" class="external free" rel="nofollow">mailto:nobody@example.com</a></div></div></div>
3412 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
3413 so math is not stripped and turns up as escaped <math> tags.
3415 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
3417 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><math>2+2</math></div></div></div>
3422 BUG 1887, part 2: A <math> with a thumbnail- math enabled
3426 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
3428 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><span class="texhtml">2 + 2</span></div></div></div>
3432 # Pending resolution to bug 368
3434 BUG 648: Frameless image caption with a link
3436 [[Image:foobar.jpg|text with a [[link]] in it]]
3438 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3443 BUG 648: Frameless image caption with a link (suffix)
3445 [[Image:foobar.jpg|text with a [[link]]foo in it]]
3447 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a linkfoo in it"><img alt="text with a linkfoo in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3452 BUG 648: Frameless image caption with an interwiki link
3454 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
3456 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3461 BUG 648: Frameless image caption with a piped interwiki link
3463 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
3465 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3470 Escape HTML special chars in image alt text
3472 [[Image:foobar.jpg|& < > "]]
3474 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3479 BUG 499: Alt text should have Ӓ, not &1234;
3481 [[Image:foobar.jpg|♀]]
3483 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3488 Broken image caption with link
3490 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
3492 <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.
3497 Image caption containing another image
3499 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
3501 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is a caption with another <a href="/index.php?title=Special:Upload&wpDestFile=Icon.png" class="new" title="File:Icon.png">image</a> inside it!</div></div></div>
3506 Image caption containing a newline
3508 [[Image:Foobar.jpg|This
3511 <p><a href="/wiki/File:Foobar.jpg" class="image" title="This *is some text"><img alt="This *is some text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3517 Bug 3090: External links other than http: in image captions
3519 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
3521 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="200" height="23" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This caption has <a href="irc://example.net" class="external text" rel="nofollow">irc</a> and <a href="https://example.com" class="external text" rel="nofollow">Secure</a> ext links in it.</div></div></div>
3530 Subpage test/subpage
3538 subpage title=[[Subpage test]]
3542 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
3547 Subpage noslash link
3549 subpage title=[[Subpage test]]
3553 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
3562 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
3567 BUG 561: {{/Subpage}}
3569 subpage title=[[Page]]
3573 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
3581 Category:MediaWiki User's Guide
3589 [[:Category:MediaWiki User's Guide]]
3591 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
3600 [[Category:MediaWiki User's Guide]]
3602 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
3606 PAGESINCATEGORY invalid title fatal (r33546 fix)
3608 {{PAGESINCATEGORY:<bogus>}}
3615 ### Inter-language links
3618 Inter-language links
3624 [[zh:食品]]
3626 es:Alimento fr:Nourriture zh:食品
3633 Basic section headings
3640 ===Smaller headline===
3643 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline" id="Headline_1"> Headline 1 </span></h2>
3646 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline" id="Headline_2">Headline 2</span></h2>
3649 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</span> <span class="mw-headline" id="Smaller_headline">Smaller headline</span></h3>
3655 Section headings with TOC
3658 === Subheadline 1 ===
3659 ===== Skipping a level =====
3660 ====== Skipping a level ======
3664 ===Another headline===
3666 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3668 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
3670 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
3672 <li class="toclevel-3 tocsection-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
3674 <li class="toclevel-4 tocsection-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
3681 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
3683 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
3687 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3688 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline" id="Headline_1"> Headline 1 </span></h2>
3689 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</span> <span class="mw-headline" id="Subheadline_1"> Subheadline 1 </span></h3>
3690 <h5><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline" id="Skipping_a_level"> Skipping a level </span></h5>
3691 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline" id="Skipping_a_level_2"> Skipping a level </span></h6>
3692 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline" id="Headline_2"> Headline 2 </span></h2>
3695 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a>]</span> <span class="mw-headline" id="Another_headline">Another headline</span></h3>
3699 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
3701 Handling of sections up to level 6 and beyond
3704 == Level 2 Heading==
3705 === Level 3 Heading===
3706 ==== Level 4 Heading====
3707 ===== Level 5 Heading=====
3708 ====== Level 6 Heading======
3709 ======= Level 7 Heading=======
3710 ======== Level 8 Heading========
3711 ========= Level 9 Heading=========
3712 ========== Level 10 Heading==========
3714 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3716 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
3718 <li class="toclevel-2 tocsection-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
3720 <li class="toclevel-3 tocsection-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
3722 <li class="toclevel-4 tocsection-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a>
3724 <li class="toclevel-5 tocsection-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a>
3726 <li class="toclevel-6 tocsection-6"><a href="#Level_6_Heading"><span class="tocnumber">1.1.1.1.1.1</span> <span class="toctext">Level 6 Heading</span></a></li>
3727 <li class="toclevel-6 tocsection-7"><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>
3728 <li class="toclevel-6 tocsection-8"><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>
3729 <li class="toclevel-6 tocsection-9"><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>
3730 <li class="toclevel-6 tocsection-10"><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>
3742 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3743 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</span> <span class="mw-headline" id="Level_1_Heading"> Level 1 Heading</span></h1>
3744 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</span> <span class="mw-headline" id="Level_2_Heading"> Level 2 Heading</span></h2>
3745 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</span> <span class="mw-headline" id="Level_3_Heading"> Level 3 Heading</span></h3>
3746 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</span> <span class="mw-headline" id="Level_4_Heading"> Level 4 Heading</span></h4>
3747 <h5><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</span> <span class="mw-headline" id="Level_5_Heading"> Level 5 Heading</span></h5>
3748 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</span> <span class="mw-headline" id="Level_6_Heading"> Level 6 Heading</span></h6>
3749 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</span> <span class="mw-headline" id=".3D_Level_7_Heading.3D">= Level 7 Heading=</span></h6>
3750 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</span> <span class="mw-headline" id=".3D.3D_Level_8_Heading.3D.3D">== Level 8 Heading==</span></h6>
3751 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</span> <span class="mw-headline" id=".3D.3D.3D_Level_9_Heading.3D.3D.3D">=== Level 9 Heading===</span></h6>
3752 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</span> <span class="mw-headline" id=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D">==== Level 10 Heading====</span></h6>
3757 TOC regression (bug 9764)
3761 ==== title 1.1.1 ====
3766 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3768 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3770 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
3772 <li class="toclevel-3 tocsection-3"><a href="#title_1.1.1"><span class="tocnumber">1.1.1</span> <span class="toctext">title 1.1.1</span></a></li>
3775 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
3778 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
3780 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
3784 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3785 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1"> title 1 </span></h2>
3786 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1"> title 1.1 </span></h3>
3787 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1.1"> title 1.1.1 </span></h4>
3788 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a>]</span> <span class="mw-headline" id="title_1.2"> title 1.2 </span></h3>
3789 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline" id="title_2"> title 2 </span></h2>
3790 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a>]</span> <span class="mw-headline" id="title_2.1"> title 2.1 </span></h3>
3795 TOC with wgMaxTocLevel=3 (bug 6204)
3801 ==== title 1.1.1 ====
3806 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3808 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3810 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
3811 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
3814 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
3816 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
3820 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3821 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1"> title 1 </span></h2>
3822 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1"> title 1.1 </span></h3>
3823 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1.1"> title 1.1.1 </span></h4>
3824 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a>]</span> <span class="mw-headline" id="title_1.2"> title 1.2 </span></h3>
3825 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline" id="title_2"> title 2 </span></h2>
3826 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a>]</span> <span class="mw-headline" id="title_2.1"> title 2.1 </span></h3>
3831 Resolving duplicate section names
3836 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline" id="Foo_bar"> Foo bar </span></h2>
3837 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline" id="Foo_bar_2"> Foo bar </span></h2>
3842 Resolving duplicate section names with differing case (bug 10721)
3847 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline" id="Foo_bar"> Foo bar </span></h2>
3848 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a>]</span> <span class="mw-headline" id="Foo_Bar_2"> Foo Bar </span></h2>
3860 Template with sections, __NOTOC__
3867 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a>]</span> <span class="mw-headline" id="Section_0">Section 0</span></h2>
3868 <h3><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=T-1" title="Template:Sections">edit</a>]</span> <span class="mw-headline" id="Section_1">Section 1</span></h3>
3869 <h2><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=T-2" title="Template:Sections">edit</a>]</span> <span class="mw-headline" id="Section_2">Section 2</span></h2>
3870 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a>]</span> <span class="mw-headline" id="Section_4">Section 4</span></h2>
3875 __NOEDITSECTION__ keyword
3881 <h2> <span class="mw-headline" id="Section_1">Section 1</span></h2>
3882 <h2> <span class="mw-headline" id="Section_2">Section 2</span></h2>
3887 Link inside a section heading
3889 ==Section with a [[Main Page|link]] in it==
3891 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</span> <span class="mw-headline" id="Section_with_a_link_in_it">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span></h2>
3896 TOC regression (bug 12077)
3903 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3905 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3907 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
3910 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
3912 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3913 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1"> title 1 </span></h2>
3914 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1"> title 1.1 </span></h3>
3915 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline" id="title_2"> title 2 </span></h2>
3920 BUG 1219 URL next to image (good)
3922 http://example.com [[Image:foobar.jpg]]
3924 <p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3929 Short headings with trailing space should match behaviour of Parser::doHeadings (bug 19910)
3932 The line above must have a trailing space!
3935 But just in case it doesn't...
3937 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D">=</span></h1>
3938 <p>The line above must have a trailing space!
3940 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D_2">=</span></h1>
3941 <p>But just in case it doesn't...
3946 BUG 1219 URL next to image (broken)
3948 http://example.com[[Image:foobar.jpg]]
3950 <p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3955 Bug 1186 news: in the middle of text
3957 http://en.wikinews.org/wiki/Wikinews:Workplace
3959 <p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class="external free" rel="nofollow">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
3965 Namespaced link must have a title
3974 Namespaced link must have a title (bad fragment version)
3976 [[Project:#fragment]]
3978 <p>[[Project:#fragment]]
3984 div with no attributes
3986 <div>HTML rocks</div>
3988 <div>HTML rocks</div>
3993 div with double-quoted attribute
3995 <div id="rock">HTML rocks</div>
3997 <div id="rock">HTML rocks</div>
4002 div with single-quoted attribute
4004 <div id='rock'>HTML rocks</div>
4006 <div id="rock">HTML rocks</div>
4011 div with unquoted attribute
4013 <div id=rock>HTML rocks</div>
4015 <div id="rock">HTML rocks</div>
4020 div with illegal double attributes
4022 <div align="center" align="right">HTML rocks</div>
4024 <div align="right">HTML rocks</div>
4029 HTML multiple attributes correction
4031 <p class="error" class="awesome">Awesome!</p>
4033 <p class="awesome">Awesome!</p>
4038 Table multiple attributes correction
4041 !+ class="error" class="awesome"| status
4046 <th class="awesome"> status
4054 <DIV ALIGN="center">HTML ROCKS</DIV>
4056 <div align="center">HTML ROCKS</div>
4062 text with amp in the middle of nowhere
4066 <p>Remember AT&T?
4071 text with character entity: eacute
4073 I always thought é was a cute letter.
4075 <p>I always thought é was a cute letter.
4080 text with undefined character entity: xacute
4082 I always thought &xacute; was a cute letter.
4084 <p>I always thought &xacute; was a cute letter.
4096 [[Media:Foobar.jpg]]
4098 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
4103 Media link with text
4105 [[Media:Foobar.jpg|A neat file to look at]]
4107 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
4111 # FIXME: this is still bad HTML tag nesting
4113 Media link with nasty text
4114 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
4116 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
4118 <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>
4123 Media link to nonexistent file (bug 1702)
4125 [[Media:No such.jpg]]
4127 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
4132 Image link to nonexistent file (bug 1850 - good)
4134 [[Image:No such.jpg]]
4136 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
4141 :Image link to nonexistent file (bug 1850 - bad)
4143 [[:Image:No such.jpg]]
4145 <p><a href="/index.php?title=File:No_such.jpg&action=edit&redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a>
4152 Character reference normalization in link text (bug 1938)
4154 [[Main Page|this&that]]
4156 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
4163 Test for unicode normalization
4165 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
4169 (bug 19451) Links should refer to the normalized form.
4177 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4178 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4179 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4180 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4181 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4186 Empty attribute crash test (bug 2067)
4188 <font color="">foo</font>
4190 <p><font color="">foo</font>
4195 Empty attribute crash test single-quotes (bug 2067)
4197 <font color=''>foo</font>
4199 <p><font color="">foo</font>
4204 Attribute test: equals, then nothing
4206 <font color=>foo</font>
4213 Attribute test: unquoted value
4215 <font color=x>foo</font>
4217 <p><font color="x">foo</font>
4222 Attribute test: unquoted but illegal value (hash)
4224 <font color=#x>foo</font>
4226 <p><font color="#x">foo</font>
4231 Attribute test: no value
4233 <font color>foo</font>
4235 <p><font color="color">foo</font>
4240 Bug 2095: link with three closing brackets
4244 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
4249 Bug 2095: link with pipe and three closing brackets
4253 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
4258 Bug 2095: link with pipe and three closing brackets, version 2
4260 [[Main Page|[http://example.com/]]]
4262 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
4272 Template:Dangerous attribute
4274 " onmouseover="alert(document.cookie)
4278 Template:Dangerous style attribute
4280 border-size: expression(alert(document.cookie))
4286 <div style="float: right; {{{1}}}">Magic div</div>
4290 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
4292 <div title="{{test}}"></div>
4294 <div title="This is a test template"></div>
4299 Bug 2304: HTML attribute safety (dangerous template; 2309)
4301 <div title="{{dangerous attribute}}"></div>
4303 <div title=""></div>
4308 Bug 2304: HTML attribute safety (dangerous style template; 2309)
4310 <div style="{{dangerous style attribute}}"></div>
4312 <div style="/* insecure input */"></div>
4317 Bug 2304: HTML attribute safety (safe parameter; 2309)
4319 {{div style|width: 200px}}
4321 <div style="float: right; width: 200px">Magic div</div>
4326 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
4328 {{div style|width: expression(alert(document.cookie))}}
4330 <div style="/* insecure input */">Magic div</div>
4335 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
4337 {{div style|"><script>alert(document.cookie)</script>}}
4339 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
4344 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
4346 {{div style|" ><script>alert(document.cookie)</script>}}
4348 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
4353 Bug 2304: HTML attribute safety (link)
4355 <div title="[[Main Page]]"></div>
4357 <div title="[[Main Page]]"></div>
4362 Bug 2304: HTML attribute safety (italics)
4364 <div title="''foobar''"></div>
4366 <div title="''foobar''"></div>
4371 Bug 2304: HTML attribute safety (bold)
4373 <div title="'''foobar'''"></div>
4375 <div title="'''foobar'''"></div>
4381 Bug 2304: HTML attribute safety (ISBN)
4383 <div title="ISBN 1234567890"></div>
4385 <div title="ISBN 1234567890"></div>
4390 Bug 2304: HTML attribute safety (RFC)
4392 <div title="RFC 1234"></div>
4394 <div title="RFC 1234"></div>
4399 Bug 2304: HTML attribute safety (PMID)
4401 <div title="PMID 1234567890"></div>
4403 <div title="PMID 1234567890"></div>
4408 Bug 2304: HTML attribute safety (web link)
4410 <div title="http://example.com/"></div>
4412 <div title="http://example.com/"></div>
4417 Bug 2304: HTML attribute safety (named web link)
4419 <div title="[http://example.com/ link]"></div>
4421 <div title="[http://example.com/ link]"></div>
4426 Bug 3244: HTML attribute safety (extension; safe)
4428 <div style="<nowiki>background:blue</nowiki>"></div>
4430 <div style="background:blue"></div>
4435 Bug 3244: HTML attribute safety (extension; unsafe)
4437 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
4439 <div style="/* insecure input */"></div>
4444 Math section safety when disabled
4446 <math><script>alert(document.cookies);</script></math>
4448 <p><math><script>alert(document.cookies);</script></math>
4452 # More MSIE fun discovered by Tom Gilder
4455 MSIE CSS safety test: spurious slash
4457 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
4459 <div style="/* insecure input */">evil</div>
4464 MSIE CSS safety test: hex code
4466 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
4468 <div style="/* insecure input */">evil</div>
4473 MSIE CSS safety test: comment in url
4475 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
4477 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
4482 MSIE CSS safety test: comment in expression
4484 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
4486 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
4492 Table attribute legitimate extension
4495 !+ style="<nowiki>color:blue</nowiki>"| status
4500 <th style="color:blue"> status
4506 Table attribute safety
4509 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
4514 <th style="/* insecure input */"> status
4520 CSS line continuation 1
4522 <div style="background-image: u\ rl(test.jpg);"></div>
4524 <div style="/* insecure input */"></div>
4529 CSS line continuation 2
4531 <div style="background-image: u\ rl(test.jpg); "></div>
4533 <div style="/* insecure input */"></div>
4544 Expansion of multi-line templates in attribute values (bug 6255)
4546 <div style="background: {{identity|#00FF00}}">-</div>
4548 <div style="background: #00FF00">-</div>
4554 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
4556 <div style="background:
4559 <div style="background: #00FF00">-</div>
4564 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
4566 <div style="background: #00FF00">-</div>
4568 <div style="background: #00FF00">-</div>
4573 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
4576 Parser hook: empty input
4589 Parser hook: empty input using terminated empty elements
4602 Parser hook: empty input using terminated empty elements (space before)
4615 Parser hook: basic input
4629 Parser hook: case insensitive
4643 Parser hook: case insensitive, redux
4656 Parser hook: nested tags
4660 <tag><tag></tag></tag>
4671 Parser hook: basic arguments
4673 <tag width=200 height = "100" depth = '50' square></tag>
4692 Parser hook: argument containing a forward slash (bug 5344)
4694 <tag filename='/tmp/bla'></tag>
4700 string(8) "/tmp/bla"
4707 Parser hook: empty input using terminated empty elements (bug 2374)
4721 # </tag> should be output literally since there is no matching tag that begins it
4723 Parser hook: basic arguments using terminated empty elements (bug 2374)
4725 <tag width=200 height = "100" depth = '50' square/>
4748 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
4752 Parser hook: static parser hook not inside a comment
4754 <statictag>hello, world</statictag>
4755 <statictag action=flush/>
4763 Parser hook: static parser hook inside a comment
4765 <!-- <statictag>hello, world</statictag> -->
4766 <statictag action=flush/>
4772 # Nested template calls; this case was broken by Parser.php rev 1.506,
4776 Template:One-parameter
4778 (My parameter is: {{{1}}})
4782 Template:Map-one-parameter
4788 Nested template calls
4790 {{Map-one-parameter|One-parameter|param}}
4792 <p>(My parameter is: param)
4801 Sanitizer: Closing of open tags
4803 <s></s><table></table>
4805 <s></s><table></table>
4810 Sanitizer: Closing of open but not closed tags
4819 Sanitizer: Closing of closed but not open tags
4828 Sanitizer: Closing of closed but not open table tags
4830 Table not started</td></tr></table>
4832 <p>Table not started</td></tr></table>
4837 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
4839 <span id="æ: v">byte</span>[[#æ: v|backlink]]
4841 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
4846 Sanitizer: Validating the contents of the id attribute (bug 4515)
4852 Something, but definitely not <br id="9" />...
4856 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
4860 <br id="foo" /><br id="foo" />
4862 Something need to be done. foo-2 ?
4866 Language converter: output gets cut off unexpectedly (bug 5757)
4870 this bit is safe: }-
4872 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
4874 then we get cut off here: }-
4876 all additional text is vanished
4878 <p>this bit is safe: }-
4879 </p><p>but if we add a conversion instance: xxx
4880 </p><p>then we get cut off here: }-
4881 </p><p>all additional text is vanished
4886 Self closed html pairs (bug 5487)
4889 <center><font id="bug" />Centered text</center>
4890 <div><font id="bug2" />In div text</div>
4892 <center><font id="bug" />Centered text</center>
4893 <div><font id="bug2" />In div text</div>
4902 Punctuation: nbsp before exclamation
4906 <p>C'est grave !
4911 Punctuation: CSS !important (bug 11874)
4913 <div style="width:50% !important">important</div>
4915 <div style="width:50% !important">important</div>
4920 Punctuation: CSS ! important (bug 11874; with space after)
4922 <div style="width:50% ! important">important</div>
4924 <div style="width:50% ! important">important</div>
4930 HTML bullet list, closed tags (bug 5497)
4945 HTML bullet list, unclosed tags (bug 5497)
4962 HTML ordered list, closed tags (bug 5497)
4977 HTML ordered list, unclosed tags (bug 5497)
4994 HTML nested bullet list, closed tags (bug 5497)
5019 HTML nested bullet list, open tags (bug 5497)
5044 HTML nested ordered list, closed tags (bug 5497)
5069 HTML nested ordered list, open tags (bug 5497)
5094 HTML ordered list item with parameters oddity
5096 <ol><li id="fragment">One</li></ol>
5098 <ol><li id="fragment">One</li></ol>
5103 bug 5918: autonumbering
5105 [http://first/] [http://second] [ftp://ftp]
5109 [mailto:enclosed@mail.tld With target]
5111 [mailto:enclosed@mail.tld]
5113 mailto:inline@mail.tld
5115 <p><a href="http://first/" class="external autonumber" rel="nofollow">[1]</a> <a href="http://second" class="external autonumber" rel="nofollow">[2]</a> <a href="ftp://ftp" class="external autonumber" rel="nofollow">[3]</a>
5116 </p><p><a href="ftp://inlineftp" class="external free" rel="nofollow">ftp://inlineftp</a>
5117 </p><p><a href="mailto:enclosed@mail.tld" class="external text" rel="nofollow">With target</a>
5118 </p><p><a href="mailto:enclosed@mail.tld" class="external autonumber" rel="nofollow">[4]</a>
5119 </p><p><a href="mailto:inline@mail.tld" class="external free" rel="nofollow">mailto:inline@mail.tld</a>
5125 # Security and HTML correctness
5126 # From Nick Jenkins' fuzz testing
5130 Fuzz testing: Parser13
5145 Fuzz testing: Parser14
5150 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</span> <span class="mw-headline" id="onmouseover.3D"> onmouseover= </span></h2>
5151 http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
5153 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
5155 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
5160 Fuzz testing: Parser14-table
5165 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline" id="a">a</span></h2>
5166 <table style="__TOC__">
5172 # Known to produce bogus xml (extra </td>)
5174 Fuzz testing: Parser16
5183 <th>https://</th><th></th><th></th><th>
5191 Fuzz testing: Parser21
5194 ! irc://{{ftp://a" onmouseover="alert('hello world');"
5199 <th> <a href="irc://{{ftp://a" class="external free" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
5208 Fuzz testing: Parser22
5210 http://===r:::https://b
5214 <p><a href="http://===r:::https://b" class="external free" rel="nofollow">http://===r:::https://b</a>
5222 # Known to produce bad XML for now
5224 Fuzz testing: Parser24
5231 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
5232 <br style="onmouseover='alert(document.cookie);' " />
5234 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
5239 <u class="|">}}}} >
5240 <br style="onmouseover='alert(document.cookie);'" />
5242 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
5251 # Note: the current result listed for this is not what the original one was,
5252 # but the original bug was JavaScript injection, which is fixed in any case.
5253 # It's not clear that the original result listed was any more correct than the
5254 # current one. Original result:
5257 # <li class="||">
5258 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
5260 Fuzz testing: Parser25 (bug 6055)
5266 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
5268 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
5273 Fuzz testing: URL adjacent extension (with space, clean)
5276 http://example.com <nowiki>junk</nowiki>
5278 <p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a> junk
5283 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
5286 http://example.com<nowiki>junk</nowiki>
5288 <p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>junk
5293 Fuzz testing: URL adjacent extension (no space, dirty; pre)
5296 http://example.com<pre>junk</pre>
5298 <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a><pre>junk</pre>
5303 Fuzz testing: image with bogus manual thumbnail
5305 [[Image:foobar.jpg|thumbnail= ]]
5307 <div class="thumb tright"><div class="thumbinner" style="width:1943px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
5312 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
5314 <pre dir=" "></pre>
5316 <pre dir=" "></pre>
5321 Parsing optional HTML elements (Bug 6171)
5326 <td> Some tabular data</td>
5327 <td> More tabular data ...
5328 <td> And yet som tabular data</td>
5334 <td> Some tabular data</td>
5335 <td> More tabular data ...
5336 </td><td> And yet som tabular data</td>
5343 Correct handling of <td>, <tr> (Bug 6171)
5348 <td> Some tabular data</td>
5349 <td> More tabular data ...</td>
5350 <td> And yet som tabular data</td>
5356 <td> Some tabular data</td>
5357 <td> More tabular data ...</td>
5358 <td> And yet som tabular data</td>
5366 Parsing crashing regression (fr:JavaScript)
5370 <p></body></x>
5375 Inline wiki vs wiki block nesting
5381 <p><b>Bold paragraph</b>
5382 </p><p>New wiki paragraph
5387 Inline HTML vs wiki block nesting
5395 <p><b>Bold paragraph</b>
5396 </p><p>New wiki paragraph
5400 # Original result was this:
5401 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
5403 # While that might be marginally more intuitive, maybe, the six-apostrophe
5404 # construct is clearly pathological and the result stated here (which is what
5405 # the parser actually does) is about as reasonable as anything.
5407 Mixing markup for italics and bold
5410 '''bold''''''bold''bolditalics'''''
5412 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
5420 Article for special page transclusion test
5424 Special page transclusion
5427 {{Special:Prefixindex/Xyzzyx}}
5431 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
5436 Special page transclusion twice (bug 5021)
5439 {{Special:Prefixindex/Xyzzyx}}
5440 {{Special:Prefixindex/Xyzzyx}}
5444 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
5447 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
5452 Transclusion of default MediaWiki message
5454 {{MediaWiki:Mainpage}}
5461 Transclusion of nonexistent MediaWiki message
5463 {{MediaWiki:Mainpagexxx}}
5465 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
5470 Transclusion of MediaWiki message with underscore
5472 {{MediaWiki:history_short}}
5479 Transclusion of MediaWiki message with space
5481 {{MediaWiki:history short}}
5488 Invalid header with following text
5498 Section extraction test (section 0)
5518 Section extraction test (section 1)
5540 Section extraction test (section 2)
5561 Section extraction test (section 3)
5581 Section extraction test (section 4)
5605 Section extraction test (section 5)
5625 Section extraction test (section 6)
5646 Section extraction test (section 7)
5666 Section extraction test (section 8)
5686 Section extraction test (section 9)
5707 Section extraction test (section 10)
5727 Section extraction test (nonexistent section 11)
5746 Section extraction test with bogus heading (section 1)
5751 ==bogus== not a legal section
5755 ==bogus== not a legal section
5759 Section extraction test with bogus heading (section 2)
5764 ==bogus== not a legal section
5771 Section extraction test with comment after heading (section 1)
5783 Section extraction test with comment after heading (section 2)
5795 Section extraction test with bogus <nowiki> heading (section 1)
5800 ==bogus== <nowiki>not a legal section</nowiki>
5804 ==bogus== <nowiki>not a legal section</nowiki>
5808 Section extraction test with bogus <nowiki> heading (section 2)
5813 ==bogus== <nowiki>not a legal section</nowiki>
5820 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
5821 # instead of respecting commented sections
5823 Section extraction prefixed by comment (section 1)
5834 Section extraction prefixed by comment (section 2)
5845 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
5846 # instead of respecting HTML-style headings
5848 Section extraction, mixed wiki and html (section 1)
5864 Section extraction, mixed wiki and html (section 2)
5880 # Formerly testing for bug 3342
5882 Section extraction, heading surrounded by <noinclude>
5886 <noinclude>==unmarked==</noinclude>
5892 # Test behaviour of bug 19910
5894 Sectiion with all-equals
5899 The line above must have a trailing space
5902 But just in case it doesn't...
5906 But just in case it doesn't...
5910 Section replacement test (section 0)
5941 Section replacement test (section 1)
5970 Section replacement test (section 2)
6000 Section replacement test (section 3)
6031 Section replacement test (section 4)
6058 Section replacement test (section 5)
6089 Section replacement test (section 6)
6119 Section replacement test (section 7)
6150 Section replacement test (section 8)
6181 Section replacement test (section 9)
6210 Section replacement test (section 10)
6240 Section replacement test with initial whitespace (bug 13728)
6244 Preformatted initial line
6248 Preformatted initial line
6255 Section extraction, heading followed by pre with 20 spaces (bug 6398)
6267 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
6280 Section extraction, <pre> around bogus header (bug 10309)
6297 Section replacement, <pre> around bogus header (bug 10309)
6299 noxml replace=2,"xxx"
6320 Handling of 
 in URLs
6324 <ul><li><ul><li><a href="irc://%0Aa" class="external free" rel="nofollow">irc://%0Aa</a>
6331 5 quotes, code coverage +1 line
6338 Special:Search page linking.
6342 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
6357 * {{SUBJECTPAGENAME}}
6358 * {{SUBJECTPAGENAMEE}}
6365 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
6367 <ul><li> Parser test
6368 </li><li> Parser test
6369 </li><li> Parser test
6370 </li><li> Parser_test
6371 </li><li> Parser test
6372 </li><li> Parser_test
6373 </li><li> Talk:Parser test
6374 </li><li> Talk:Parser_test
6375 </li><li> Parser test
6376 </li><li> Parser_test
6383 </li><li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a>
6387 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
6397 image4 |300px| centre
6398 image5.svg| http://///////
6403 <table class="gallery" cellspacing="0" cellpadding="0">
6405 <td><div class="gallerybox" style="width: 155px;">
6406 <div style="height: 152px;">Image1.png</div>
6407 <div class="gallerytext">
6410 <td><div class="gallerybox" style="width: 155px;">
6411 <div style="height: 152px;">Image2.gif</div>
6412 <div class="gallerytext">
6417 <td><div class="gallerybox" style="width: 155px;">
6418 <div style="height: 152px;">Image3</div>
6419 <div class="gallerytext">
6422 <td><div class="gallerybox" style="width: 155px;">
6423 <div style="height: 152px;">Image4</div>
6424 <div class="gallerytext">
6431 <td><div class="gallerybox" style="width: 155px;">
6432 <div style="height: 152px;">Image5.svg</div>
6433 <div class="gallerytext">
6434 <p><a href="http://///////" class="external free" rel="nofollow">http://///////</a>
6438 <td><div class="gallerybox" style="width: 155px;">
6439 <div style="height: 152px;">* image6</div>
6440 <div class="gallerytext">
6449 Gallery (with options)
6451 <gallery widths='60px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
6452 File:Nonexistant.jpg|caption
6453 File:Nonexistant.jpg
6454 image:foobar.jpg|some '''caption''' [[Main Page]]
6458 <table class="gallery" cellspacing="0" cellpadding="0">
6459 <caption>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></caption>
6461 <td><div class="gallerybox" style="width: 95px;">
6462 <div style="height: 52px;">Nonexistant.jpg</div>
6463 <div class="gallerytext">
6468 <td><div class="gallerybox" style="width: 95px;">
6469 <div style="height: 52px;">Nonexistant.jpg</div>
6470 <div class="gallerytext">
6475 <td><div class="gallerybox" style="width: 95px;">
6476 <div class="thumb" style="padding: 19px 0; width: 90px;"><div style="margin-left: auto; margin-right: auto; width: 60px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="60" height="7" /></a></div></div>
6477 <div class="gallerytext">
6478 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6482 <td><div class="gallerybox" style="width: 95px;">
6483 <div class="thumb" style="padding: 19px 0; width: 90px;"><div style="margin-left: auto; margin-right: auto; width: 60px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="60" height="7" /></a></div></div>
6484 <div class="gallerytext">
6493 gallery (with showfilename option)
6495 <gallery showfilename>
6496 File:Nonexistant.jpg|caption
6497 File:Nonexistant.jpg
6498 image:foobar.jpg|some '''caption''' [[Main Page]]
6502 <table class="gallery" cellspacing="0" cellpadding="0">
6504 <td><div class="gallerybox" style="width: 155px;">
6505 <div style="height: 152px;">Nonexistant.jpg</div>
6506 <div class="gallerytext">
6507 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
6512 <td><div class="gallerybox" style="width: 155px;">
6513 <div style="height: 152px;">Nonexistant.jpg</div>
6514 <div class="gallerytext">
6515 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
6519 <td><div class="gallerybox" style="width: 155px;">
6520 <div class="thumb" style="padding: 66px 0; width: 150px;"><div style="margin-left: auto; margin-right: auto; width: 120px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div>
6521 <div class="gallerytext">
6522 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
6523 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6527 <td><div class="gallerybox" style="width: 155px;">
6528 <div class="thumb" style="padding: 66px 0; width: 150px;"><div style="margin-left: auto; margin-right: auto; width: 120px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div>
6529 <div class="gallerytext">
6530 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
6540 HTML Hex character encoding (spells the word "JavaScript")
6542 JavaScript
6544 <p>JavaScript
6549 __FORCETOC__ override
6561 ISBN 978-0-1234-56 789
6563 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
6568 ISBN followed by 5 spaces
6579 ISBN ISBN 1234567890
6581 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
6586 Bug 22905: <abbr> followed by ISBN followed by </a>
6588 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
6590 <p><abbr>(fr)</abbr> <a href="/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a href="http://www.example.com" class="external text" rel="nofollow">example.com</a>
6599 <p>RFC <a href="http://tools.ietf.org/html/rfc1234" class="external mw-magiclink-rfc">RFC 1234</a>
6604 Double RFC with a wiki link
6608 <p>RFC <a href="/index.php?title=RFC_1234&action=edit&redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a>
6617 <p><a href="http://tools.ietf.org/html/rfc983" class="external mw-magiclink-rfc">RFC 983</a> 987
6622 Centre-aligned image
6624 [[Image:foobar.jpg|centre]]
6626 <div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div>
6633 [[Image:foobar.jpg|none]]
6635 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
6640 Width + Height sized image (using px) (height is ignored)
6642 [[Image:foobar.jpg|640x480px]]
6644 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="640" height="73" /></a>
6649 Width-sized image (using px, no following whitespace)
6651 [[Image:foobar.jpg|640px]]
6653 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="640" height="73" /></a>
6658 Width-sized image (using px, with following whitespace - test regression from r39467)
6660 [[Image:foobar.jpg|640px ]]
6662 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="640" height="73" /></a>
6667 Width-sized image (using px, with preceding whitespace - test regression from r39467)
6669 [[Image:foobar.jpg| 640px]]
6671 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="640" height="73" /></a>
6676 Another italics / bold test
6684 # Note the results may be incorrect, as parserTest output included this:
6685 # XML error: Mismatched tag at byte 6120:
6686 # ...<dd> </dt></dl> </dd...
6694 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
6705 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
6707 Images with the "|" character in the comment
6709 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
6711 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a href="http://test/?param1=%7Cleft%7C&param2=%7Cx" class="external text" rel="nofollow">external</a> URL</div></div></div>
6716 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
6718 <html><script>alert(1);</script></html>
6720 <p><html><script>alert(1);</script></html>
6725 HTML with raw HTML ($wgRawHtml==true)
6729 <html><script>alert(1);</script></html>
6731 <p><script>alert(1);</script>
6736 Parents of subpages, one level up
6738 subpage title=[[Subpage test/L1/L2/L3]]
6742 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a>
6748 Parents of subpages, one level up, not named
6750 subpage title=[[Subpage test/L1/L2/L3]]
6754 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a>
6761 Parents of subpages, two levels up
6763 subpage title=[[Subpage test/L1/L2/L3]]
6769 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a>2
6770 </p><p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1l</a>
6775 Parents of subpages, two levels up, without trailing slash or name.
6777 subpage title=[[Subpage test/L1/L2/L3]]
6786 Parents of subpages, two levels up, with lots of extra trailing slashes.
6788 subpage title=[[Subpage test/L1/L2/L3]]
6792 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
6797 Definition list code coverage
6803 <dl><dt> title  </dt><dd> def
6804 </dd><dt> title </dt><dd> def
6805 </dd><dt>title</dt><dd> def
6811 Don't fall for the self-closing div
6813 <div>hello world</div/>
6815 <div>hello world</div>
6824 <p>[[:Template:Msg]]
6833 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
6837 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
6839 Always escape literal '>' in output, not just after '<'
6853 <p>This is a test template
6854 This is a test template
6866 Inclusion of !userCanEdit() content
6870 <h2><span class="editsection">[<a href="/index.php?title=MediaWiki:Fake&action=edit&section=T-1" title="MediaWiki:Fake">edit</a>]</span> <span class="mw-headline" id="header">header</span></h2>
6876 Out-of-order TOC heading levels
6885 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
6887 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
6889 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
6890 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
6893 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
6895 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
6896 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
6900 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
6901 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 2">edit</a>]</span> <span class="mw-headline" id="2">2</span></h2>
6902 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 6">edit</a>]</span> <span class="mw-headline" id="6">6</span></h6>
6903 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 3">edit</a>]</span> <span class="mw-headline" id="3">3</span></h3>
6904 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 1">edit</a>]</span> <span class="mw-headline" id="1">1</span></h1>
6905 <h5><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 5">edit</a>]</span> <span class="mw-headline" id="5">5</span></h5>
6906 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: 2">edit</a>]</span> <span class="mw-headline" id="2_2">2</span></h2>
6912 ISBN with a dummy number
6922 ISBN with space-delimited number
6926 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
6932 ISBN with multiple spaces, no number
6951 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
6952 </p><p>ISBN 12345678901
6958 ISBN with trailing year (bug 8110)
6960 ISBN 1-234-56789-0 - 2006
6962 ISBN 1 234 56789 0 - 2006
6964 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
6965 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
6973 {{anchorencode:foo bar©#%n}}
6975 <p>foo_bar.C2.A9.23.25n
6980 anchorencode trims spaces
6982 {{anchorencode: __pretty__please__}}
6989 anchorencode deals with links
6991 {{anchorencode: [[hello|world]] [[hi]]}}
6998 anchorencode deals with templates
7000 {{anchorencode: {{Foo}} }}
7007 anchorencode encodes like the TOC generator: (bug 18431)
7009 === _ +:.3A%3A&&]] ===
7010 {{anchorencode: _ +:.3A%3A&&]] }}
7013 <h3> <span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D"> _ +:.3A%3A&&]] </span></h3>
7014 <p>.2B:.3A.253A.26.26.5D.5D
7019 Bug 8293: Use of center tag ruins paragraph formatting
7041 ### Language variants related tests
7044 Self-link in language variants
7046 title=[[Dunav]] language=sr
7048 Both [[Dunav]] and [[Дунав]] are names for this river.
7050 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
7056 Link to pages in language variants
7060 Main Page can be written as [[Маин Паге]]
7062 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
7068 Multiple links to pages in language variants
7072 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
7074 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a> same as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>.
7080 Simple template in language variants
7086 <p>This is a test template
7092 Template with explicit namespace in language variants
7098 <p>This is a test template
7104 Basic test for template parameter in language variants
7108 {{парамтест|param=foo}}
7110 <p>This is a test template with parameter foo
7116 Simple category in language variants
7120 [[Category:МедиаWики Усер'с Гуиде]]
7122 <a href="/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%98%D0%B0:MediaWiki_User%27s_Guide" title="Категорија:MediaWiki User's Guide">MediaWiki User's Guide</a>
7127 Stripping -{}- tags (language variants)
7131 Latin proverb: -{Ne nuntium necare}-
7133 <p>Latin proverb: Ne nuntium necare
7139 Prevent conversion with -{}- tags (language variants)
7141 language=sr variant=sr-ec
7143 Latinski: -{Ne nuntium necare}-
7145 <p>Латински: Ne nuntium necare
7151 Prevent conversion of text with -{}- tags (language variants)
7153 language=sr variant=sr-ec
7155 Latinski: -{Ne nuntium necare}-
7157 <p>Латински: Ne nuntium necare
7163 Prevent conversion of links with -{}- tags (language variants)
7165 language=sr variant=sr-ec
7169 <p><a href="/index.php?title=Main_Page&variant=sr-ec" title="Main Page">Main Page</a>
7175 -{}- tags within headlines (within html for parserConvert())
7177 language=sr variant=sr-ec
7181 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Уреди део: Naslov">уреди</a>]</span> <span class="mw-headline" id="-.7BNaslov.7D-"> Naslov </span></h2>
7187 Explicit definition of language variant alternatives
7189 language=zh variant=zh-tw
7191 -{zh:China;zh-tw:Taiwan}-, not China
7193 <p>Taiwan, not China
7199 Explicit session-wise language variant mapping (A flag and - flag)
7201 language=zh variant=zh-tw
7203 Taiwan is not China.
7204 But -{A|zh:China;zh-tw:Taiwan}- is China,
7205 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
7206 and -{China}- is China.
7208 <p>Taiwan is not China.
7209 But Taiwan is Taiwan,
7210 (This should be stripped!)
7216 Explicit session-wise language variant mapping (H flag for hide)
7218 language=zh variant=zh-tw
7220 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
7223 <p>(This should be stripped!)
7229 Adding explicit conversion rule for title (T flag)
7231 language=zh variant=zh-tw showtitle
7233 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
7236 <p>Should be stripped!
7241 Testing that changing the language variant here in the tests actually works
7243 language=zh variant=zh showtitle
7245 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
7248 <p>Should be stripped!
7253 Bug 24072: more test on conversion rule for title
7255 language=zh variant=zh-tw showtitle
7257 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
7258 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
7261 <p>This should be stripped!
7262 This won't take interferes with the title rule.
7267 Raw output of variant escape tags (R flag)
7269 language=zh variant=zh-tw
7271 Raw: -{R|zh:China;zh-tw:Taiwan}-
7273 <p>Raw: zh:China;zh-tw:Taiwan
7278 Nested using of manual convert syntax
7280 language=zh variant=zh-hk
7282 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
7284 <p>Nested: Hello Hong Kong!
7289 Do not convert roman numbers to language variants
7291 language=sr variant=sr-ec
7295 <p>Фридрих IV је цар.
7300 Unclosed language converter markup "-{"
7311 Don't convert raw rule "-{R|=>}-" to "=>"
7328 Bug 529: Uncovered bullet
7339 Bug 529: Uncovered table already at line-start
7360 Bug 529: Uncovered bullet in parser function result
7362 * Foo {{lc:{{bullet}} }}
7371 Bug 5678: Double-parsed template argument
7373 {{lc:{{{1}}}|hello}}
7380 Bug 5678: Double-parsed template invocation
7382 {{lc:{{paramtest {{!}} param = hello }} }}
7384 <p>{{paramtest | param = hello }}
7389 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
7415 Morwen/13: Unclosed link followed by heading
7422 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a>]</span> <span class="mw-headline" id="heading">heading</span></h2>
7427 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
7434 <h1> <span class="mw-headline" id="heading">heading</span></h1>
7439 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
7446 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a>]</span> <span class="mw-headline" id="heading">heading</span></h2>
7461 Paragraphs inside divs (no extra line breaks)
7473 Paragraphs inside divs (extra line break on open)
7488 Paragraphs inside divs (extra line break on close)
7503 Paragraphs inside divs (extra line break on open and close)
7520 Nesting tags, paragraphs on lines which begin with <div>
7524 <div></div><strong>A
7533 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
7535 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
7539 <blockquote>Line one
7541 Line two</blockquote>
7543 <blockquote>Line one
7544 Line two</blockquote>
7549 Bug 6200: paragraphs inside blockquotes (extra line break on open)
7556 Line two</blockquote>
7561 Line two</blockquote>
7566 Bug 6200: paragraphs inside blockquotes (extra line break on close)
7570 <blockquote>Line one
7575 <blockquote>Line one
7583 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
7602 Paragraphs inside blockquotes/divs (no extra line breaks)
7604 <blockquote><div>Line one
7606 Line two</div></blockquote>
7608 <blockquote><div>Line one
7609 Line two</div></blockquote>
7614 Paragraphs inside blockquotes/divs (extra line break on open)
7619 Line two</div></blockquote>
7624 Line two</div></blockquote>
7629 Paragraphs inside blockquotes/divs (extra line break on close)
7631 <blockquote><div>Line one
7636 <blockquote><div>Line one
7644 Paragraphs inside blockquotes/divs (extra line break on open and close)
7661 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
7663 wgLinkHolderBatchSize=0
7669 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
7670 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
7671 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
7676 Free external link invading image caption
7678 [[Image:Foobar.jpg|thumb|http://x|hello]]
7680 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>hello</div></div></div>
7685 Bug 15196: localised external link numbers
7689 [http://en.wikipedia.org/]
7691 <p><a href="http://en.wikipedia.org/" class="external autonumber" rel="nofollow">[۱]</a>
7696 Multibyte character in padleft
7698 {{padleft:-Hello|7|Æ}}
7705 Multibyte character in padright
7707 {{padright:Hello-|7|Æ}}
7720 <p><span class="mw-formatted-date" title="2009-03-24"><a href="/index.php?title=2009&action=edit&redlink=1" class="new" title="2009 (page does not exist)">2009</a>-<a href="/index.php?title=March_24&action=edit&redlink=1" class="new" title="March 24 (page does not exist)">03-24</a></span>
7725 formatdate parser function
7727 {{#formatdate:2009-03-24}}
7729 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
7734 formatdate parser function, with default format
7736 {{#formatdate:2009-03-24|mdy}}
7738 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
7743 Linked date with autoformatting disabled
7745 wgUseDynamicDates=false
7749 <p><a href="/index.php?title=2009-03-24&action=edit&redlink=1" class="new" title="2009-03-24 (page does not exist)">2009-03-24</a>
7754 Spacing of numbers in formatted dates
7756 {{#formatdate:January 15}}
7758 <p><span class="mw-formatted-date" title="01-15">January 15</span>
7763 Spacing of numbers in formatted dates (linked)
7765 wgUseDynamicDates=true
7769 <p><span class="mw-formatted-date" title="01-15"><a href="/index.php?title=January_15&action=edit&redlink=1" class="new" title="January 15 (page does not exist)">January 15</a></span>
7782 Edit comment with link
7786 I like the [[Main Page]] a lot
7788 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
7792 Edit comment with link and link text
7796 I like the [[Main Page|best pages]] a lot
7798 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
7802 Edit comment with link and link text with suffix
7806 I like the [[Main Page|best page]]s a lot
7808 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
7812 Edit comment with section link (non-local, eg in history list)
7814 comment title=[[Main Page]]
7816 /* External links */ removed bogus entries
7818 <span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→</a>External links: </span> removed bogus entries
7822 Edit comment with section link (local, eg in diff view)
7824 comment local title=[[Main Page]]
7826 /* External links */ removed bogus entries
7828 <span class="autocomment"><a href="#External_links">→</a>External links: </span> removed bogus entries
7832 Edit comment with subpage link (bug 14080)
7836 title=[[Subpage test]]
7838 Poked at a [[/subpage]] here...
7840 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
7844 Edit comment with subpage link and link text (bug 14080)
7848 title=[[Subpage test]]
7850 Poked at a [[/subpage|neat little page]] here...
7852 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
7856 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
7859 title=[[Subpage test]]
7861 Poked at a [[/subpage]] here...
7863 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
7867 Edit comment with bare anchor link (local, as on diff)
7875 <a href="#section">#section</a>
7879 Edit comment with bare anchor link (non-local, as on history)
7886 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
7890 Space normalisation on autocomment (bug 22784)
7895 /* __hello__world__ */
7897 <span class="autocomment"><a href="/wiki/Main_Page#hello_world" title="Main Page">→</a>__hello__world__</span>
7901 MediaWiki:bad image list
7903 * [[File:Bad.jpg]] except [[Nasty page]]
7907 Bad images - basic functionality
7914 Bad images - bug 16039: text after bad image disappears
7926 Verify that displaytitle works (bug #22501) no displaytitle
7930 wgAllowDisplayTitle=true
7931 wgRestrictDisplayTitle=false
7933 this is not the the title
7936 <p>this is not the the title
7941 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
7946 wgAllowDisplayTitle=true
7947 wgRestrictDisplayTitle=false
7949 this is not the the title
7950 {{DISPLAYTITLE:whatever}}
7953 <p>this is not the the title
7958 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
7963 wgAllowDisplayTitle=true
7964 wgRestrictDisplayTitle=true
7966 this is not the the title
7967 {{DISPLAYTITLE:whatever}}
7970 <p>this is not the the title
7975 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
7980 wgAllowDisplayTitle=true
7981 wgRestrictDisplayTitle=true
7983 this is not the the title
7984 {{DISPLAYTITLE:screen}}
7987 <p>this is not the the title
7992 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
7997 wgAllowDisplayTitle=false
7999 this is not the the title
8000 {{DISPLAYTITLE:screen}}
8003 <p>this is not the the title
8004 <a href="/index.php?title=Template:DISPLAYTITLE:screen&action=edit&redlink=1" class="new" title="Template:DISPLAYTITLE:screen (page does not exist)">Template:DISPLAYTITLE:screen</a>
8009 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
8014 wgAllowDisplayTitle=false
8016 this is not the the title
8019 <p>this is not the the title
8024 preload: check <noinclude> and <includeonly>
8028 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
8034 preload: check <onlyinclude>
8038 Goodbye <onlyinclude>Hello world</onlyinclude>
8044 preload: can pass tags through if we want to
8048 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
8050 <includeonly>Hello world</includeonly>
8054 preload: check that it doesn't try to do tricks
8058 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
8060 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
8064 Play a bit with r67090 and bug 3158
8068 <div style="width:50% !important"> </div>
8069 <div style="width:50% !important"> </div>
8070 <div style="width:50% !important"> </div>
8071 <div style="border : solid;"> </div>
8073 <div style="width:50% !important"> </div>
8074 <div style="width:50% !important"> </div>
8075 <div style="width:50% !important"> </div>
8076 <div style="border : solid;"> </div>
8087 Try for 100% code coverage