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>
373 # Expected output in the following test is not really expected (there should be
374 # <pre> in the output) -- it's only testing for well-formedness.
376 Bug 6200: Preformatted in <blockquote>
389 <pre> with attributes (bug 3202)
391 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
393 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
398 <pre> with width attribute (bug 3202)
400 <pre width="8">Narrow screen goodies</pre>
402 <pre width="8">Narrow screen goodies</pre>
407 <pre> with forbidden attribute (bug 3202)
409 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
411 <pre width="8">Narrow screen goodies</pre>
416 <pre> with forbidden attribute values (bug 3202)
418 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
420 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
432 <dl><dt> name </dt><dd> Definition
438 Definition list for indentation only
442 <dl><dd> Indented text
448 Definition list with no space
452 <dl><dt>name</dt><dd>Definition
458 Definition list with URL link
460 ; http://example.com/ : definition
462 <dl><dt> <a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> </dt><dd> definition
468 Definition list with bracketed URL link
470 ;[http://www.example.com/ Example]:Something about it
472 <dl><dt><a href="http://www.example.com/" class="external text" rel="nofollow">Example</a></dt><dd>Something about it
478 Definition list with wikilink containing colon
480 ; [[Help:FAQ]]: The least-read page on Wikipedia
482 <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
487 # At Brion's and JeLuF's insistence... :)
489 Definition list with news link containing colon
491 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
493 <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!
499 Malformed definition list with colon
501 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
503 <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
509 Definition lists: colon in external link text
511 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
513 <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
519 Definition lists: colon in HTML attribute
521 ;<b style="display: inline">bold</b>
523 <dl><dt><b style="display: inline">bold</b>
530 Definition lists: self-closed tag
532 ;one<br/>two : two-line fun
534 <dl><dt>one<br />two </dt><dd> two-line fun
544 External links: non-bracketed
546 Non-bracketed: http://example.com
548 <p>Non-bracketed: <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>
553 External links: numbered
555 Numbered: [http://example.com]
556 Numbered: [http://example.net]
557 Numbered: [http://example.com]
559 <p>Numbered: <a href="http://example.com" class="external autonumber" rel="nofollow">[1]</a>
560 Numbered: <a href="http://example.net" class="external autonumber" rel="nofollow">[2]</a>
561 Numbered: <a href="http://example.com" class="external autonumber" rel="nofollow">[3]</a>
566 External links: specified text
568 Specified text: [http://example.com link]
570 <p>Specified text: <a href="http://example.com" class="external text" rel="nofollow">link</a>
575 External links: trail
577 Linktrails should not work for external links: [http://example.com link]s
579 <p>Linktrails should not work for external links: <a href="http://example.com" class="external text" rel="nofollow">link</a>s
584 External links: dollar sign in URL
586 http://example.com/1$2345
588 <p><a href="http://example.com/1$2345" class="external free" rel="nofollow">http://example.com/1$2345</a>
593 External links: dollar sign in URL (named)
595 [http://example.com/1$2345]
597 <p><a href="http://example.com/1$2345" class="external autonumber" rel="nofollow">[1]</a>
602 External links: open square bracket forbidden in URL (bug 4377)
604 http://example.com/1[2345
606 <p><a href="http://example.com/1" class="external free" rel="nofollow">http://example.com/1</a>[2345
611 External links: open square bracket forbidden in URL (named) (bug 4377)
613 [http://example.com/1[2345]
615 <p><a href="http://example.com/1" class="external text" rel="nofollow">[2345</a>
620 External links: nowiki in URL link text (bug 6230)
622 [http://example.com/ <nowiki>''example site''</nowiki>]
624 <p><a href="http://example.com/" class="external text" rel="nofollow">''example site''</a>
629 External links: newline forbidden in text (bug 6230 regression check)
631 [http://example.com/ first
634 <p>[<a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> first
642 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
644 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
649 External image from https
651 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
653 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
658 Link to non-http image, no img tag
660 Link to non-http image, no img tag: ftp://example.com/test.jpg
662 <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>
667 External links: terminating separator
669 Terminating separator: http://example.com/thing,
671 <p>Terminating separator: <a href="http://example.com/thing" class="external free" rel="nofollow">http://example.com/thing</a>,
676 External links: intervening separator
678 Intervening separator: http://example.com/1,2,3
680 <p>Intervening separator: <a href="http://example.com/1,2,3" class="external free" rel="nofollow">http://example.com/1,2,3</a>
685 External links: old bug with URL in query
687 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
689 <p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class="external text" rel="nofollow">link</a>
694 External links: old URL-in-URL bug, mixed protocols
696 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
698 <p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class="external text" rel="nofollow">link</a>
703 External links: URL in text
705 URL in text: [http://example.com http://example.com]
707 <p>URL in text: <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>
712 External links: Clickable images
714 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
716 <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>
721 External links: raw ampersand
723 Old & use: http://x&y
725 <p>Old & use: <a href="http://x&y" class="external free" rel="nofollow">http://x&y</a>
730 External links: encoded ampersand
732 Old & use: http://x&y
734 <p>Old & use: <a href="http://x&y" class="external free" rel="nofollow">http://x&y</a>
739 External links: encoded equals (bug 6102)
741 http://example.com/?foo=bar
743 <p><a href="http://example.com/?foo=bar" class="external free" rel="nofollow">http://example.com/?foo=bar</a>
748 External links: [raw ampersand]
750 Old & use: [http://x&y]
752 <p>Old & use: <a href="http://x&y" class="external autonumber" rel="nofollow">[1]</a>
757 External links: [encoded ampersand]
759 Old & use: [http://x&y]
761 <p>Old & use: <a href="http://x&y" class="external autonumber" rel="nofollow">[1]</a>
766 External links: [encoded equals] (bug 6102)
768 [http://example.com/?foo=bar]
770 <p><a href="http://example.com/?foo=bar" class="external autonumber" rel="nofollow">[1]</a>
775 External links: [IDN ignored character reference in hostname; strip it right off]
777 [http://e‌xample.com/]
779 <p><a href="http://example.com/" class="external autonumber" rel="nofollow">[1]</a>
784 External links: IDN ignored character reference in hostname; strip it right off
786 http://e‌xample.com/
788 <p><a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a>
793 External links: www.jpeg.org (bug 554)
797 <p><a href="http://www.jpeg.org" class="external free" rel="nofollow">http://www.jpeg.org</a>
802 External links: URL within URL (original bug 2)
804 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
806 <p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class="external autonumber" rel="nofollow">[1]</a>
811 BUG 361: URL inside bracketed URL
813 [http://www.example.com/foo http://www.example.com/bar]
815 <p><a href="http://www.example.com/foo" class="external text" rel="nofollow">http://www.example.com/bar</a>
820 BUG 361: URL within URL, not bracketed
822 http://www.example.com/foo?=http://www.example.com/bar
824 <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>
829 BUG 289: ">"-token in URL-tail
831 http://www.example.com/<hello>
833 <p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a><hello>
838 BUG 289: literal ">"-token in URL-tail
840 http://www.example.com/<b>html</b>
842 <p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a><b>html</b>
847 BUG 289: ">"-token in bracketed URL
849 [http://www.example.com/<hello> stuff]
851 <p><a href="http://www.example.com/" class="external text" rel="nofollow"><hello> stuff</a>
856 BUG 289: literal ">"-token in bracketed URL
858 [http://www.example.com/<b>html</b> stuff]
860 <p><a href="http://www.example.com/" class="external text" rel="nofollow"><b>html</b> stuff</a>
865 BUG 289: literal double quote at end of URL
867 http://www.example.com/"hello"
869 <p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a>"hello"
874 BUG 289: literal double quote in bracketed URL
876 [http://www.example.com/"hello" stuff]
878 <p><a href="http://www.example.com/" class="external text" rel="nofollow">"hello" stuff</a>
883 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
885 [http://www.example.com test]
887 <p><a href="http://www.example.com" class="external text" rel="nofollow">test</a>
892 External links: wiki links within external link (Bug 3695)
894 [http://example.com [[wikilink]] embedded in ext link]
896 <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>
901 BUG 787: Links with one slash after the url protocol are invalid
905 [http:/example.com title]
908 </p><p>[http:/example.com title]
913 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
915 ''[http://example.com text'']
916 [http://example.com '''text]'''
917 ''Something [http://example.com in italic'']
918 ''Something [http://example.com mixed''''', even bold]'''
919 '''''Now [http://example.com both''''']
921 <p><a href="http://example.com" class="external text" rel="nofollow"><i>text</i></a>
922 <a href="http://example.com" class="external text" rel="nofollow"><b>text</b></a>
923 <i>Something </i><a href="http://example.com" class="external text" rel="nofollow"><i>in italic</i></a>
924 <i>Something </i><a href="http://example.com" class="external text" rel="nofollow"><i>mixed</i><b>, even bold</b></a>
925 <i><b>Now </b></i><a href="http://example.com" class="external text" rel="nofollow"><i><b>both</b></i></a>
933 http://www.example.com/?title=AT%26T
935 <p><a href="http://www.example.com/?title=AT%26T" class="external free" rel="nofollow">http://www.example.com/?title=AT%26T</a>
940 Bug 4781, 5267: %26 in URL
942 http://www.example.com/?title=100%25_Bran
944 <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>
949 Bug 4781, 5267: %28, %29 in URL
951 http://www.example.com/?title=Ben-Hur_%281959_film%29
953 <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>
959 Bug 4781: %26 in autonumber URL
961 [http://www.example.com/?title=AT%26T]
963 <p><a href="http://www.example.com/?title=AT%26T" class="external autonumber" rel="nofollow">[1]</a>
968 Bug 4781, 5267: %26 in autonumber URL
970 [http://www.example.com/?title=100%25_Bran]
972 <p><a href="http://www.example.com/?title=100%25_Bran" class="external autonumber" rel="nofollow">[1]</a>
977 Bug 4781, 5267: %28, %29 in autonumber URL
979 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
981 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external autonumber" rel="nofollow">[1]</a>
987 Bug 4781: %26 in bracketed URL
989 [http://www.example.com/?title=AT%26T link]
991 <p><a href="http://www.example.com/?title=AT%26T" class="external text" rel="nofollow">link</a>
996 Bug 4781, 5267: %26 in bracketed URL
998 [http://www.example.com/?title=100%25_Bran link]
1000 <p><a href="http://www.example.com/?title=100%25_Bran" class="external text" rel="nofollow">link</a>
1005 Bug 4781, 5267: %28, %29 in bracketed URL
1007 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
1009 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external text" rel="nofollow">link</a>
1014 External link containing double-single-quotes in text '' (bug 4598 sanity check)
1016 Some [http://example.com/ pretty ''italics'' and stuff]!
1018 <p>Some <a href="http://example.com/" class="external text" rel="nofollow">pretty <i>italics</i> and stuff</a>!
1023 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
1025 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
1027 <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>
1032 External link containing double-single-quotes with no space separating the url from text in italics
1034 [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]].]
1036 <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>
1041 URL-encoding in URL functions (single parameter)
1043 {{localurl:Some page|amp=&}}
1045 <p>/index.php?title=Some_page&amp=&
1050 URL-encoding in URL functions (multiple parameters)
1052 {{localurl:Some page|q=?&=&}}
1054 <p>/index.php?title=Some_page&q=?&amp=&
1065 Normal text. '''Bold text.''' Normal text. ''Italic text.''
1067 Normal text. '''''Bold italic text.''''' Normal text.
1069 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
1070 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
1076 Unclosed and unmatched quotes
1078 '''''Bold italic text '''with bold deactivated''' in between.'''''
1080 '''''Bold italic text ''with italic deactivated'' in between.'''''
1084 ..spanning two paragraphs (should not work).'''
1086 '''Bold tag left open
1088 ''Italic tag left open
1092 <!-- Unmatching number of opening, closing tags: -->
1093 '''This year''''s election ''should'' beat '''last year''''s.
1095 ''Tom'''s car is bigger than ''Susan'''s.
1097 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
1098 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
1099 </p><p><b>Bold text..</b>
1100 </p><p>..spanning two paragraphs (should not work).
1101 </p><p><b>Bold tag left open</b>
1102 </p><p><i>Italic tag left open</i>
1104 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
1105 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
1112 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
1115 # This should not produce <table></table> as <table><tr><td></td></tr></table>
1116 # is the bare minimun required by the spec, see:
1117 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
1119 A table with no data.
1125 # A table with nothing but a caption is invalid XHTML, we might want to render
1126 # this as <p>caption</p>
1128 A table with nothing but a caption
1136 </caption><tr><td></td></tr></table>
1162 Multiplication table
1164 {| border="1" cellpadding="2"
1165 |+Multiplication table
1167 ! × !! 1 !! 2 !! 3
1185 <table border="1" cellpadding="2">
1186 <caption>Multiplication table
1235 {| align=right border=1
1237 |rowspan=2| Cell 2, row 1 (and 2)
1244 <table align="right" border="1">
1248 <td rowspan="2"> Cell 2, row 1 (and 2)
1266 {| bgcolor=#ABCDEF border=2
1271 |the original table again
1279 <table bgcolor="#ABCDEF" border="2">
1287 <td>the original table again
1293 Invalid attributes in table cell (bug 1830)
1308 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
1311 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1315 <td>[<a href="ftp://%7Cx" class="external free" rel="nofollow">ftp://%7Cx</a></td>
1316 <td>]" onmouseover="alert(document.cookie)">test
1328 Plain link, capitalized
1332 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1337 Plain link, uncapitalized
1341 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1348 [[Main Page|The Main Page]]
1350 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1359 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
1364 Broken link with fragment
1366 [[Zigzagzogzagzig#zug]]
1368 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
1373 Special page link with fragment
1375 [[Special:Version#anchor]]
1377 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
1382 Nonexistent special page link with fragment
1384 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
1386 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
1393 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1395 <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>
1402 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
1404 <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>!!!
1409 Link with 3 brackets
1418 Piped link with 3 brackets
1420 [[[main page|the main page]]]
1422 <p>[[[main page|the main page]]]
1427 Link with multiple pipes
1429 [[Main Page|The|Main|Page]]
1431 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1438 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1440 <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>
1445 Piped link to namespace
1447 [[Meta:Disclaimers|The disclaimers]]
1449 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
1456 [[Usually caused by a typo (oops}]]
1458 <p>[[Usually caused by a typo (oops}]]
1463 Link containing % (not as a hex sequence)
1467 <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>
1472 Link containing % as a single hex sequence interpreted to char
1476 <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>
1481 Link containing % as a double hex sequence interpreted to hex sequence
1485 <p>[[7%2525 Solution]]
1490 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1491 Example for such a section: == < ==
1493 [[%23%3c]][[%23%3e]]
1495 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
1500 Link containing "<#" and ">#" as a hex sequences
1502 [[%3c%23]][[%3e%23]]
1504 <p>[[%3c%23]][[%3e%23]]
1509 Link containing double-single-quotes '' (bug 4598)
1511 [[Lista d''e paise d''o munno]]
1513 <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>
1518 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1520 Some [[Link|pretty ''italics'' and stuff]]!
1522 <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>!
1527 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1529 ''Some [[Link|pretty ''italics'' and stuff]]!
1531 <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>
1536 Link with double quotes in title part (literal) and alternate part (interpreted)
1538 [[File:Denys Savchenko ''Pentecoste''.jpg]]
1542 [[''Pentecoste''|Pentecoste]]
1544 [[''Pentecoste''|''Pentecoste'']]
1546 <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>
1547 </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>
1548 </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>
1549 </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>
1556 [[http://www.example.com]]
1558 <p>[<a href="http://www.example.com" class="external autonumber" rel="nofollow">[1]</a>]
1562 # I'm fairly sure the expected result here is wrong.
1563 # We want these to be URL links, not pseudo-pages with URLs for titles....
1564 # However the current output is also pretty screwy.
1567 # I'm changing it to match the current output--it arguably makes more
1568 # sense in the light of the test above. Old expected result was:
1569 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
1571 # But I think this test is bordering on "garbage in, garbage out" anyway.
1576 Piped link to URL: [[http://www.example.com|an example URL]]
1578 <p>Piped link to URL: [<a href="http://www.example.com%7Can" class="external text" rel="nofollow">example URL</a>]
1583 BUG 2: [[page|http://url/]] should link to page, not http://url/
1585 [[Main Page|http://url/]]
1587 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1592 BUG 337: Escaped self-links should be bold
1596 [[Bug462]] [[Bug462]]
1598 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1603 Self-link to section should not be bold
1607 [[Main Page#section]]
1609 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1620 Self-link to numeric title
1626 <p><strong class="selflink">0</strong>
1631 Link to numeric-equivalent title
1637 <p><a href="/wiki/00" title="00">00</a>
1642 <nowiki> inside a link
1644 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1646 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1651 Non-breaking spaces in title
1653 [[ Main Page ]]
1655 <p><a href="/wiki/Main_Page" title="Main Page"> Main Page </a>
1661 ### Interwiki links (see maintenance/interwiki.sql)
1665 Inline interwiki link
1667 [[MeatBall:SoftSecurity]]
1669 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1674 Inline interwiki link with empty title (bug 2372)
1678 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw" title="meatball:">MeatBall:</a>
1683 Interwiki link encoding conversion (bug 1636)
1685 *[[Wikipedia:ro:Olteniţa]]
1686 *[[Wikipedia:ro:Olteniţa]]
1688 <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>
1689 </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>
1695 Interwiki link with fragment (bug 2130)
1697 [[MeatBall:SoftSecurity#foo]]
1699 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1714 Double interlanguage link
1725 Interlanguage link, with prefix links
1737 Double interlanguage link, with prefix links (bug 8897)
1764 Incorrecly removing closing slashes from correctly formed XHTML
1766 <br style="clear:both;" />
1768 <p><br style="clear:both;" />
1773 Failing to transform badly formed HTML into correct XHTML
1779 <p><br clear="left" />
1780 <br clear="right" />
1786 Horizontal ruler (should it add that extra space?)
1800 ### Block-level elements
1823 <ol><li>Numbered list
1840 ***#Number on level 4
1842 **#Number on level 3
1843 **#Number on level 3
1848 <ol><li> with numbers
1850 <ul><li> and bullets
1852 <ol><li> and numbers
1854 </li><li>bullets again
1855 <ul><li>bullet level 2
1856 <ul><li>bullet level 3
1857 <ol><li>Number on level 4
1860 </li><li>bullet level 2
1861 <ol><li>Number on level 3
1862 </li><li>Number on level 3
1865 <ol><li>number level 2
1873 List items are not parsed correctly following a <pre> block (bug 785)
1879 <ul><li> <pre>foo</pre>
1880 </li><li> <pre>bar</pre>
1891 Magic Word: {{CURRENTDAY}}
1900 Magic Word: {{CURRENTDAY2}}
1909 Magic Word: {{CURRENTDAYNAME}}
1918 Magic Word: {{CURRENTDOW}}
1927 Magic Word: {{CURRENTMONTH}}
1936 Magic Word: {{CURRENTMONTHABBREV}}
1938 {{CURRENTMONTHABBREV}}
1945 Magic Word: {{CURRENTMONTHNAME}}
1947 {{CURRENTMONTHNAME}}
1954 Magic Word: {{CURRENTMONTHNAMEGEN}}
1956 {{CURRENTMONTHNAMEGEN}}
1963 Magic Word: {{CURRENTTIME}}
1972 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1981 Magic Word: {{CURRENTYEAR}}
1990 Magic Word: {{FULLPAGENAME}}
1992 title=[[User:Ævar Arnfjörð Bjarmason]]
1996 <p>User:Ævar Arnfjörð Bjarmason
2001 Magic Word: {{FULLPAGENAMEE}}
2003 title=[[User:Ævar Arnfjörð Bjarmason]]
2007 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
2012 Magic Word: {{NAMESPACE}}
2014 title=[[User:Ævar Arnfjörð Bjarmason]]
2023 Magic Word: {{NAMESPACEE}}
2025 title=[[User:Ævar Arnfjörð Bjarmason]]
2034 Magic Word: {{NUMBEROFFILES}}
2043 Magic Word: {{PAGENAME}}
2045 title=[[User:Ævar Arnfjörð Bjarmason]]
2049 <p>Ævar Arnfjörð Bjarmason
2054 Magic Word: {{PAGENAMEE}}
2056 title=[[User:Ævar Arnfjörð Bjarmason]]
2060 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
2065 Magic Word: {{REVISIONID}}
2074 Magic Word: {{SCRIPTPATH}}
2083 Magic Word: {{SERVER}}
2087 <p><a href="http://localhost" class="external free" rel="nofollow">http://localhost</a>
2092 Magic Word: {{SERVERNAME}}
2101 Magic Word: {{SITENAME}}
2110 Namespace 1 {{ns:1}}
2119 Namespace 1 {{ns:01}}
2128 Namespace 0 {{ns:0}} (bug 4783)
2136 Namespace 0 {{ns:00}} (bug 4783)
2144 Namespace -1 {{ns:-1}}
2153 Namespace User {{ns:User}}
2162 Namespace User talk {{ns:User_talk}}
2171 Namespace User talk {{ns:uSeR tAlK}}
2180 Namespace File {{ns:File}}
2189 Namespace File {{ns:Image}}
2198 Namespace (lang=de) Benutzer {{ns:User}}
2209 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
2215 <p>Benutzer Diskussion
2223 {{urlencode:hi world?!}}
2224 {{urlencode:hi world?!|WIKI}}
2225 {{urlencode:hi world?!|PATH}}
2226 {{urlencode:hi world?!|QUERY}}
2239 Magic links: internal link to RFC (bug 479)
2243 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
2248 Magic links: RFC (bug 479)
2252 <p><a href="http://tools.ietf.org/html/rfc822" class="external mw-magiclink-rfc">RFC 822</a>
2257 Magic links: ISBN (bug 1937)
2261 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
2266 Magic links: PMID incorrectly converts space to underscore
2270 <p><a href="http://www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" class="external mw-magiclink-pmid">PMID 1234</a>
2279 Nonexistent template
2281 {{thistemplatedoesnotexist}}
2283 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
2290 This is a test template
2298 <p>This is a test template
2303 Template with explicit namespace
2307 <p>This is a test template
2315 This is a test template with parameter {{{param}}}
2321 {{paramtest|param=foo}}
2323 <p>This is a test template with parameter foo
2328 Template:paramtestnum
2334 Template unnamed parameter
2336 {{paramtestnum|Main Page|the main page}}
2338 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2343 Template:templatesimple
2349 Template:templateredirect
2351 #redirect [[Template:templatesimple]]
2355 Template:templateasargtestnum
2361 Template:templateasargtest
2363 {{template{{{templ}}}}}
2367 Template:templateasargtest2
2373 Template with template name as unnamed argument
2375 {{templateasargtestnum|templatesimple}}
2382 Template with template name as argument
2384 {{templateasargtest|templ=simple}}
2391 Template with template name as argument (2)
2393 {{templateasargtest2|templ=templatesimple}}
2400 Template:templateasargtestdefault
2402 {{{{{templ|templatesimple}}}}}
2412 Template with default value
2414 {{templateasargtestdefault}}
2421 Template with default value (value set)
2423 {{templateasargtestdefault|templ=templa}}
2432 {{templateredirect}}
2439 Template with argument in separate line
2441 {{ templateasargtest |
2449 Template with complex template as argument
2452 param ={{ templateasargtest |
2455 <p>This is a test template with parameter (test)
2460 Template with thumb image (with link in description)
2463 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2465 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>
2470 Template:complextemplate
2472 {{{1}}} {{paramtest|
2473 param ={{{param}}}}}
2477 Template with complex arguments
2480 param ={{ templateasargtest |
2481 templ = simple }}|[[Template:complextemplate|link]]}}
2483 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2488 BUG 553: link with two variables in a piped link
2491 |[[{{{1}}}|{{{2}}}]]
2496 <td>[[{{{1}}}|{{{2}}}]]
2502 Magic variable as template parameter
2504 {{paramtest|param={{SITENAME}}}}
2506 <p>This is a test template with parameter MediaWiki
2513 [[{{{param}}}|link]]
2517 Template parameter as link source
2519 {{linktest|param=Main Page}}
2521 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2529 including another template, {{paramtest|param={{{arg}}}}}
2533 Template passing argument to another template
2535 {{paramtest2|arg='hmm'}}
2537 <p>including another template, This is a test template with parameter 'hmm'
2548 Template as link source
2552 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2570 Template infinite loop
2574 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
2579 Template from main namespace
2598 BUG 529: Template with table, not included at beginning of line
2617 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2637 BUG 41: Template parameters shown as broken links
2649 ''None'' of '''this''' should be
2651 but rather passed unmodified
2655 # hmm, fix this or just deprecate msgnw and document its behavior?
2661 {{msgnw:MSGNW test}}
2663 <p>''None'' of '''this''' should be
2665 but rather passed unmodified
2673 {{int:youhavenewmessages|lots of money|not!}}
2675 <p>You have lots of money (not!).
2682 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2686 <includeonly> and <noinclude> being included
2697 <onlyinclude>Foo</onlyinclude>bar
2701 <onlyinclude> being included
2713 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2717 <onlyinclude> and <includeonly> being included
2726 <includeonly> and <noinclude> on a page
2728 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2735 <onlyinclude> on a page
2737 <onlyinclude>Foo</onlyinclude>bar
2744 Template:Includeonly section
2747 ==Includeonly section==
2753 Bug 6563: Edit link generation for section shown by <includeonly>
2755 {{includeonly section}}
2757 <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>
2758 <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>
2762 # Uses same input as the contents of [[Template:Includeonly section]]
2764 Bug 6563: Section extraction for section shown by <includeonly>
2769 ==Includeonly section==
2777 Bug 6563: Edit link generation for section suppressed by <includeonly>
2780 ==Includeonly section==
2784 <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>
2789 Bug 6563: Section extraction for section suppressed by <includeonly>
2794 ==Includeonly section==
2802 ### Pre-save transform tests
2805 pre-save transform: subst:
2811 This is a test template
2815 pre-save transform: normal template
2825 pre-save transform: nonexistent template
2829 {{thistemplatedoesnotexist}}
2831 {{thistemplatedoesnotexist}}
2836 pre-save transform: subst magic variables
2845 # This is bug 89, which I fixed. -- wtm
2847 pre-save transform: subst: templates with parameters
2851 {{subst:paramtest|param="something else"}}
2853 This is a test template with parameter "something else"
2859 <nowiki>'''not wiki'''</nowiki>
2863 pre-save transform: nowiki in subst (bug 1188)
2867 {{subst:nowikitest}}
2869 <nowiki>'''not wiki'''</nowiki>
2874 Template:commenttest
2876 This template has <!-- a comment --> in it.
2880 pre-save transform: comment in subst (bug 1936)
2884 {{subst:commenttest}}
2886 This template has <!-- a comment --> in it.
2890 pre-save transform: unclosed tag
2894 <nowiki>'''not wiki'''
2896 <nowiki>'''not wiki'''
2900 pre-save transform: mixed tag case
2904 <NOwiki>'''not wiki'''</noWIKI>
2906 <NOwiki>'''not wiki'''</noWIKI>
2910 pre-save transform: unclosed comment in <nowiki>
2914 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2916 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2922 <span onmouseover="alert('crap')">Oh no</span>
2926 (confirming safety of fix for subst bug 1936)
2928 {{Template:dangerous}}
2930 <p><span>Oh no</span>
2935 pre-save transform: comment containing gallery (bug 5024)
2939 <!-- <gallery>data</gallery> -->
2941 <!-- <gallery>data</gallery> -->
2945 pre-save transform: comment containing extension
2949 <!-- <tag>data</tag> -->
2951 <!-- <tag>data</tag> -->
2955 pre-save transform: comment containing nowiki
2959 <!-- <nowiki>data</nowiki> -->
2961 <!-- <nowiki>data</nowiki> -->
2965 pre-save transform: comment containing math
2969 <!-- <math>data</math> -->
2971 <!-- <math>data</math> -->
2975 pre-save transform: <noinclude> in subst (bug 3298)
2985 pre-save transform: <onlyinclude> in subst (bug 3298)
2997 {{<includeonly>subst:</includeonly>Includes}}
3001 Template:SafeSubstTest
3003 {{<includeonly>safesubst:</includeonly>Includes}}
3007 bug 22297: safesubst: works during PST
3011 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
3017 bug 22297: safesubst: works during normal parse
3026 subst: does not work during normal parse
3030 <p>{{subst:Includes}}
3035 pre-save transform: context links ("pipe trick")
3039 [[Article (context)|]]
3042 [[Bar:Article (context)|]]
3043 [[:Bar:Article (context)|]]
3045 [[|Article (context)]]
3049 [[Article (context)|Article]]
3050 [[Bar:Article|Article]]
3051 [[:Bar:Article|Article]]
3052 [[Bar:Article (context)|Article]]
3053 [[:Bar:Article (context)|Article]]
3055 [[Article (context)]]
3056 [[Bar:X (Y) Z|X (Y) Z]]
3057 [[:Bar:X (Y) Z|X (Y) Z]]
3061 pre-save transform: context links ("pipe trick") with interwiki prefix
3065 [[interwiki:Article|]]
3066 [[:interwiki:Article|]]
3067 [[interwiki:Bar:Article|]]
3068 [[:interwiki:Bar:Article|]]
3070 [[interwiki:Article|Article]]
3071 [[:interwiki:Article|Article]]
3072 [[interwiki:Bar:Article|Bar:Article]]
3073 [[:interwiki:Bar:Article|Bar:Article]]
3077 pre-save transform: context links ("pipe trick") with parens in title
3079 pst title=[[Somearticle (context)]]
3083 [[Article (context)|Article]]
3087 pre-save transform: context links ("pipe trick") with comma in title
3089 pst title=[[Someplace, Somewhere]]
3092 [[Otherplace, Elsewhere|]]
3093 [[Otherplace, Elsewhere, Anywhere|]]
3095 [[Otherplace, Somewhere|Otherplace]]
3096 [[Otherplace, Elsewhere|Otherplace]]
3097 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
3101 pre-save transform: context links ("pipe trick") with parens and comma
3103 pst title=[[Someplace (IGNORED), Somewhere]]
3106 [[Otherplace (place), Elsewhere|]]
3108 [[Otherplace, Somewhere|Otherplace]]
3109 [[Otherplace (place), Elsewhere|Otherplace]]
3113 pre-save transform: context links ("pipe trick") with comma and parens
3115 pst title=[[Who, me? (context)]]
3118 [[Me, Myself, and I (1937 song)|]]
3120 [[Yes, you. (context)|Yes, you.]]
3121 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
3125 pre-save transform: context links ("pipe trick") with namespace
3127 pst title=[[Ns:Somearticle]]
3131 [[Ns:Article|Article]]
3135 pre-save transform: context links ("pipe trick") with namespace and parens
3137 pst title=[[Ns:Somearticle (context)]]
3141 [[Ns:Article (context)|Article]]
3145 pre-save transform: context links ("pipe trick") with namespace and comma
3147 pst title=[[Ns:Somearticle, Context, Whatever]]
3151 [[Ns:Article, Context, Whatever|Article]]
3155 pre-save transform: context links ("pipe trick") with namespace, comma and parens
3157 pst title=[[Ns:Somearticle, Context (context)]]
3161 [[Ns:Article (context)|Article]]
3165 pre-save transform: context links ("pipe trick") with namespace, parens and comma
3167 pst title=[[Ns:Somearticle (IGNORED), Context]]
3171 [[Ns:Article, Context|Article]]
3176 ### Message transform tests
3179 message transform: magic variables
3189 message transform: should not transform wiki markup
3199 message transform: <noinclude> in transcluded template (bug 4926)
3209 message transform: <onlyinclude> in transcluded template (bug 4926)
3219 {{#special:}} page name, known
3223 {{#special:Recentchanges}}
3225 Special:RecentChanges
3229 {{#special:}} page name with subpage, known
3233 {{#special:Recentchanges/param}}
3235 Special:RecentChanges/param
3239 {{#special:}} page name, unknown
3243 {{#special:foobarnonexistent}}
3245 No such special page
3254 [[Image:foobar.jpg]]
3256 <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>
3263 [[Image:foobar.jpg|right]]
3265 <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>
3270 Simple image (using File: namespace, now canonical)
3274 <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>
3281 [[Image:foobar.jpg|right|Caption text]]
3283 <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>
3288 Image with link parameter, wiki target
3290 [[Image:foobar.jpg|link=Target page]]
3292 <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>
3297 Image with link parameter, URL target
3299 [[Image:foobar.jpg|link=http://example.com/]]
3301 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3306 Image with empty link parameter
3308 [[Image:foobar.jpg|link=]]
3310 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
3315 Image with link parameter (wiki target) and unnamed parameter
3317 [[Image:foobar.jpg|link=Target page|Title]]
3319 <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>
3324 Image with link parameter (URL target) and unnamed parameter
3326 [[Image:foobar.jpg|link=http://example.com/|Title]]
3328 <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>
3333 Thumbnail image with link parameter
3335 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
3337 <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>
3342 Image with frame and link
3344 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
3346 <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>
3351 Image with frame and link and explicit alt
3353 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
3355 <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>
3360 Image with wiki markup in implicit alt
3362 [[Image:Foobar.jpg|testing '''bold''' in alt]]
3364 <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>
3369 Image with wiki markup in explicit alt
3371 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
3373 <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>
3378 Link to image page- image page normally doesn't exists, hence edit link
3379 Add test with existing image page
3380 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
3384 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
3389 bug 18784 Link to non-existent image page with caption should use caption as link text
3391 [[:Image:test|caption]]
3393 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
3398 Frameless image caption with a free URL
3400 [[Image:foobar.jpg|http://example.com]]
3402 <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>
3407 Thumbnail image caption with a free URL
3409 [[Image:foobar.jpg|thumb|http://example.com]]
3411 <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>
3416 Thumbnail image caption with a free URL and explicit alt
3418 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
3420 <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>
3425 BUG 1887: A ISBN with a thumbnail
3427 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
3429 <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>
3434 BUG 1887: A RFC with a thumbnail
3436 [[Image:foobar.jpg|thumb|This is RFC 12354]]
3438 <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>
3443 BUG 1887: A mailto link with a thumbnail
3445 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
3447 <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>
3452 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
3453 so math is not stripped and turns up as escaped <math> tags.
3455 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
3457 <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>
3462 BUG 1887, part 2: A <math> with a thumbnail- math enabled
3466 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
3468 <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>
3472 # Pending resolution to bug 368
3474 BUG 648: Frameless image caption with a link
3476 [[Image:foobar.jpg|text with a [[link]] in it]]
3478 <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>
3483 BUG 648: Frameless image caption with a link (suffix)
3485 [[Image:foobar.jpg|text with a [[link]]foo in it]]
3487 <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>
3492 BUG 648: Frameless image caption with an interwiki link
3494 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
3496 <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>
3501 BUG 648: Frameless image caption with a piped interwiki link
3503 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
3505 <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>
3510 Escape HTML special chars in image alt text
3512 [[Image:foobar.jpg|& < > "]]
3514 <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>
3519 BUG 499: Alt text should have Ӓ, not &1234;
3521 [[Image:foobar.jpg|♀]]
3523 <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>
3528 Broken image caption with link
3530 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
3532 <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.
3537 Image caption containing another image
3539 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
3541 <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>
3546 Image caption containing a newline
3548 [[Image:Foobar.jpg|This
3551 <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>
3557 Bug 3090: External links other than http: in image captions
3559 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
3561 <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>
3570 Subpage test/subpage
3578 subpage title=[[Subpage test]]
3582 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
3587 Subpage noslash link
3589 subpage title=[[Subpage test]]
3593 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
3602 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
3607 BUG 561: {{/Subpage}}
3609 subpage title=[[Page]]
3613 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
3621 Category:MediaWiki User's Guide
3629 [[:Category:MediaWiki User's Guide]]
3631 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
3640 [[Category:MediaWiki User's Guide]]
3642 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
3646 PAGESINCATEGORY invalid title fatal (r33546 fix)
3648 {{PAGESINCATEGORY:<bogus>}}
3655 ### Inter-language links
3658 Inter-language links
3664 [[zh:食品]]
3666 es:Alimento fr:Nourriture zh:食品
3673 Basic section headings
3680 ===Smaller headline===
3683 <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>
3686 <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>
3689 <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>
3695 Section headings with TOC
3698 === Subheadline 1 ===
3699 ===== Skipping a level =====
3700 ====== Skipping a level ======
3704 ===Another headline===
3706 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3708 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
3710 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
3712 <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>
3714 <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>
3721 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
3723 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
3727 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3728 <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>
3729 <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>
3730 <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>
3731 <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>
3732 <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>
3735 <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>
3739 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
3741 Handling of sections up to level 6 and beyond
3744 == Level 2 Heading==
3745 === Level 3 Heading===
3746 ==== Level 4 Heading====
3747 ===== Level 5 Heading=====
3748 ====== Level 6 Heading======
3749 ======= Level 7 Heading=======
3750 ======== Level 8 Heading========
3751 ========= Level 9 Heading=========
3752 ========== Level 10 Heading==========
3754 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3756 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
3758 <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>
3760 <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>
3762 <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>
3764 <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>
3766 <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>
3767 <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>
3768 <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>
3769 <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>
3770 <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>
3782 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3783 <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>
3784 <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>
3785 <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>
3786 <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>
3787 <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>
3788 <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>
3789 <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>
3790 <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>
3791 <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>
3792 <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>
3797 TOC regression (bug 9764)
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>
3812 <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>
3815 <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>
3818 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
3820 <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>
3824 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3825 <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>
3826 <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>
3827 <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>
3828 <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>
3829 <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>
3830 <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>
3835 TOC with wgMaxTocLevel=3 (bug 6204)
3841 ==== title 1.1.1 ====
3846 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3848 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3850 <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>
3851 <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>
3854 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
3856 <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>
3860 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3861 <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>
3862 <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>
3863 <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>
3864 <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>
3865 <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>
3866 <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>
3871 Resolving duplicate section names
3876 <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>
3877 <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>
3882 Resolving duplicate section names with differing case (bug 10721)
3887 <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>
3888 <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>
3900 Template with sections, __NOTOC__
3907 <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>
3908 <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>
3909 <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>
3910 <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>
3915 __NOEDITSECTION__ keyword
3921 <h2> <span class="mw-headline" id="Section_1">Section 1</span></h2>
3922 <h2> <span class="mw-headline" id="Section_2">Section 2</span></h2>
3927 Link inside a section heading
3929 ==Section with a [[Main Page|link]] in it==
3931 <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>
3936 TOC regression (bug 12077)
3943 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3945 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3947 <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>
3950 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
3952 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3953 <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>
3954 <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>
3955 <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>
3960 BUG 1219 URL next to image (good)
3962 http://example.com [[Image:foobar.jpg]]
3964 <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>
3969 Short headings with trailing space should match behaviour of Parser::doHeadings (bug 19910)
3972 The line above must have a trailing space!
3975 But just in case it doesn't...
3977 <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>
3978 <p>The line above must have a trailing space!
3980 <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>
3981 <p>But just in case it doesn't...
3986 BUG 1219 URL next to image (broken)
3988 http://example.com[[Image:foobar.jpg]]
3990 <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>
3995 Bug 1186 news: in the middle of text
3997 http://en.wikinews.org/wiki/Wikinews:Workplace
3999 <p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class="external free" rel="nofollow">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
4005 Namespaced link must have a title
4014 Namespaced link must have a title (bad fragment version)
4016 [[Project:#fragment]]
4018 <p>[[Project:#fragment]]
4024 div with no attributes
4026 <div>HTML rocks</div>
4028 <div>HTML rocks</div>
4033 div with double-quoted attribute
4035 <div id="rock">HTML rocks</div>
4037 <div id="rock">HTML rocks</div>
4042 div with single-quoted attribute
4044 <div id='rock'>HTML rocks</div>
4046 <div id="rock">HTML rocks</div>
4051 div with unquoted attribute
4053 <div id=rock>HTML rocks</div>
4055 <div id="rock">HTML rocks</div>
4060 div with illegal double attributes
4062 <div align="center" align="right">HTML rocks</div>
4064 <div align="right">HTML rocks</div>
4069 HTML multiple attributes correction
4071 <p class="error" class="awesome">Awesome!</p>
4073 <p class="awesome">Awesome!</p>
4078 Table multiple attributes correction
4081 !+ class="error" class="awesome"| status
4086 <th class="awesome"> status
4094 <DIV ALIGN="center">HTML ROCKS</DIV>
4096 <div align="center">HTML ROCKS</div>
4102 text with amp in the middle of nowhere
4106 <p>Remember AT&T?
4111 text with character entity: eacute
4113 I always thought é was a cute letter.
4115 <p>I always thought é was a cute letter.
4120 text with undefined character entity: xacute
4122 I always thought &xacute; was a cute letter.
4124 <p>I always thought &xacute; was a cute letter.
4136 [[Media:Foobar.jpg]]
4138 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
4143 Media link with text
4145 [[Media:Foobar.jpg|A neat file to look at]]
4147 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
4151 # FIXME: this is still bad HTML tag nesting
4153 Media link with nasty text
4154 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
4156 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
4158 <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>
4163 Media link to nonexistent file (bug 1702)
4165 [[Media:No such.jpg]]
4167 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
4172 Image link to nonexistent file (bug 1850 - good)
4174 [[Image:No such.jpg]]
4176 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
4181 :Image link to nonexistent file (bug 1850 - bad)
4183 [[:Image:No such.jpg]]
4185 <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>
4192 Character reference normalization in link text (bug 1938)
4194 [[Main Page|this&that]]
4196 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
4203 Test for unicode normalization
4205 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
4209 (bug 19451) Links should refer to the normalized form.
4217 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4218 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4219 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4220 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4221 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4226 Empty attribute crash test (bug 2067)
4228 <font color="">foo</font>
4230 <p><font color="">foo</font>
4235 Empty attribute crash test single-quotes (bug 2067)
4237 <font color=''>foo</font>
4239 <p><font color="">foo</font>
4244 Attribute test: equals, then nothing
4246 <font color=>foo</font>
4253 Attribute test: unquoted value
4255 <font color=x>foo</font>
4257 <p><font color="x">foo</font>
4262 Attribute test: unquoted but illegal value (hash)
4264 <font color=#x>foo</font>
4266 <p><font color="#x">foo</font>
4271 Attribute test: no value
4273 <font color>foo</font>
4275 <p><font color="color">foo</font>
4280 Bug 2095: link with three closing brackets
4284 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
4289 Bug 2095: link with pipe and three closing brackets
4293 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
4298 Bug 2095: link with pipe and three closing brackets, version 2
4300 [[Main Page|[http://example.com/]]]
4302 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
4312 Template:Dangerous attribute
4314 " onmouseover="alert(document.cookie)
4318 Template:Dangerous style attribute
4320 border-size: expression(alert(document.cookie))
4326 <div style="float: right; {{{1}}}">Magic div</div>
4330 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
4332 <div title="{{test}}"></div>
4334 <div title="This is a test template"></div>
4339 Bug 2304: HTML attribute safety (dangerous template; 2309)
4341 <div title="{{dangerous attribute}}"></div>
4343 <div title=""></div>
4348 Bug 2304: HTML attribute safety (dangerous style template; 2309)
4350 <div style="{{dangerous style attribute}}"></div>
4352 <div style="/* insecure input */"></div>
4357 Bug 2304: HTML attribute safety (safe parameter; 2309)
4359 {{div style|width: 200px}}
4361 <div style="float: right; width: 200px">Magic div</div>
4366 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
4368 {{div style|width: expression(alert(document.cookie))}}
4370 <div style="/* insecure input */">Magic div</div>
4375 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
4377 {{div style|"><script>alert(document.cookie)</script>}}
4379 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
4384 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
4386 {{div style|" ><script>alert(document.cookie)</script>}}
4388 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
4393 Bug 2304: HTML attribute safety (link)
4395 <div title="[[Main Page]]"></div>
4397 <div title="[[Main Page]]"></div>
4402 Bug 2304: HTML attribute safety (italics)
4404 <div title="''foobar''"></div>
4406 <div title="''foobar''"></div>
4411 Bug 2304: HTML attribute safety (bold)
4413 <div title="'''foobar'''"></div>
4415 <div title="'''foobar'''"></div>
4421 Bug 2304: HTML attribute safety (ISBN)
4423 <div title="ISBN 1234567890"></div>
4425 <div title="ISBN 1234567890"></div>
4430 Bug 2304: HTML attribute safety (RFC)
4432 <div title="RFC 1234"></div>
4434 <div title="RFC 1234"></div>
4439 Bug 2304: HTML attribute safety (PMID)
4441 <div title="PMID 1234567890"></div>
4443 <div title="PMID 1234567890"></div>
4448 Bug 2304: HTML attribute safety (web link)
4450 <div title="http://example.com/"></div>
4452 <div title="http://example.com/"></div>
4457 Bug 2304: HTML attribute safety (named web link)
4459 <div title="[http://example.com/ link]"></div>
4461 <div title="[http://example.com/ link]"></div>
4466 Bug 3244: HTML attribute safety (extension; safe)
4468 <div style="<nowiki>background:blue</nowiki>"></div>
4470 <div style="background:blue"></div>
4475 Bug 3244: HTML attribute safety (extension; unsafe)
4477 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
4479 <div style="/* insecure input */"></div>
4484 Math section safety when disabled
4486 <math><script>alert(document.cookies);</script></math>
4488 <p><math><script>alert(document.cookies);</script></math>
4492 # More MSIE fun discovered by Tom Gilder
4495 MSIE CSS safety test: spurious slash
4497 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
4499 <div style="/* insecure input */">evil</div>
4504 MSIE CSS safety test: hex code
4506 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
4508 <div style="/* insecure input */">evil</div>
4513 MSIE CSS safety test: comment in url
4515 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
4517 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
4522 MSIE CSS safety test: comment in expression
4524 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
4526 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
4532 Table attribute legitimate extension
4535 !+ style="<nowiki>color:blue</nowiki>"| status
4540 <th style="color:blue"> status
4546 Table attribute safety
4549 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
4554 <th style="/* insecure input */"> status
4560 CSS line continuation 1
4562 <div style="background-image: u\ rl(test.jpg);"></div>
4564 <div style="/* insecure input */"></div>
4569 CSS line continuation 2
4571 <div style="background-image: u\ rl(test.jpg); "></div>
4573 <div style="/* insecure input */"></div>
4584 Expansion of multi-line templates in attribute values (bug 6255)
4586 <div style="background: {{identity|#00FF00}}">-</div>
4588 <div style="background: #00FF00">-</div>
4594 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
4596 <div style="background:
4599 <div style="background: #00FF00">-</div>
4604 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
4606 <div style="background: #00FF00">-</div>
4608 <div style="background: #00FF00">-</div>
4613 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
4616 Parser hook: empty input
4629 Parser hook: empty input using terminated empty elements
4642 Parser hook: empty input using terminated empty elements (space before)
4655 Parser hook: basic input
4669 Parser hook: case insensitive
4683 Parser hook: case insensitive, redux
4696 Parser hook: nested tags
4700 <tag><tag></tag></tag>
4711 Parser hook: basic arguments
4713 <tag width=200 height = "100" depth = '50' square></tag>
4732 Parser hook: argument containing a forward slash (bug 5344)
4734 <tag filename='/tmp/bla'></tag>
4740 string(8) "/tmp/bla"
4747 Parser hook: empty input using terminated empty elements (bug 2374)
4761 # </tag> should be output literally since there is no matching tag that begins it
4763 Parser hook: basic arguments using terminated empty elements (bug 2374)
4765 <tag width=200 height = "100" depth = '50' square/>
4788 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
4792 Parser hook: static parser hook not inside a comment
4794 <statictag>hello, world</statictag>
4795 <statictag action=flush/>
4803 Parser hook: static parser hook inside a comment
4805 <!-- <statictag>hello, world</statictag> -->
4806 <statictag action=flush/>
4812 # Nested template calls; this case was broken by Parser.php rev 1.506,
4816 Template:One-parameter
4818 (My parameter is: {{{1}}})
4822 Template:Map-one-parameter
4828 Nested template calls
4830 {{Map-one-parameter|One-parameter|param}}
4832 <p>(My parameter is: param)
4841 Sanitizer: Closing of open tags
4843 <s></s><table></table>
4845 <s></s><table></table>
4850 Sanitizer: Closing of open but not closed tags
4859 Sanitizer: Closing of closed but not open tags
4868 Sanitizer: Closing of closed but not open table tags
4870 Table not started</td></tr></table>
4872 <p>Table not started</td></tr></table>
4877 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
4879 <span id="æ: v">byte</span>[[#æ: v|backlink]]
4881 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
4886 Sanitizer: Validating the contents of the id attribute (bug 4515)
4892 Something, but definitely not <br id="9" />...
4896 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
4900 <br id="foo" /><br id="foo" />
4902 Something need to be done. foo-2 ?
4906 Language converter: output gets cut off unexpectedly (bug 5757)
4910 this bit is safe: }-
4912 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
4914 then we get cut off here: }-
4916 all additional text is vanished
4918 <p>this bit is safe: }-
4919 </p><p>but if we add a conversion instance: xxx
4920 </p><p>then we get cut off here: }-
4921 </p><p>all additional text is vanished
4926 Self closed html pairs (bug 5487)
4929 <center><font id="bug" />Centered text</center>
4930 <div><font id="bug2" />In div text</div>
4932 <center><font id="bug" />Centered text</center>
4933 <div><font id="bug2" />In div text</div>
4942 Punctuation: nbsp before exclamation
4946 <p>C'est grave !
4951 Punctuation: CSS !important (bug 11874)
4953 <div style="width:50% !important">important</div>
4955 <div style="width:50% !important">important</div>
4960 Punctuation: CSS ! important (bug 11874; with space after)
4962 <div style="width:50% ! important">important</div>
4964 <div style="width:50% ! important">important</div>
4970 HTML bullet list, closed tags (bug 5497)
4985 HTML bullet list, unclosed tags (bug 5497)
5002 HTML ordered list, closed tags (bug 5497)
5017 HTML ordered list, unclosed tags (bug 5497)
5034 HTML nested bullet list, closed tags (bug 5497)
5059 HTML nested bullet list, open tags (bug 5497)
5084 HTML nested ordered list, closed tags (bug 5497)
5109 HTML nested ordered list, open tags (bug 5497)
5134 HTML ordered list item with parameters oddity
5136 <ol><li id="fragment">One</li></ol>
5138 <ol><li id="fragment">One</li></ol>
5143 bug 5918: autonumbering
5145 [http://first/] [http://second] [ftp://ftp]
5149 [mailto:enclosed@mail.tld With target]
5151 [mailto:enclosed@mail.tld]
5153 mailto:inline@mail.tld
5155 <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>
5156 </p><p><a href="ftp://inlineftp" class="external free" rel="nofollow">ftp://inlineftp</a>
5157 </p><p><a href="mailto:enclosed@mail.tld" class="external text" rel="nofollow">With target</a>
5158 </p><p><a href="mailto:enclosed@mail.tld" class="external autonumber" rel="nofollow">[4]</a>
5159 </p><p><a href="mailto:inline@mail.tld" class="external free" rel="nofollow">mailto:inline@mail.tld</a>
5165 # Security and HTML correctness
5166 # From Nick Jenkins' fuzz testing
5170 Fuzz testing: Parser13
5185 Fuzz testing: Parser14
5190 <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>
5191 http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
5193 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
5195 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
5200 Fuzz testing: Parser14-table
5205 <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>
5206 <table style="__TOC__">
5212 # Known to produce bogus xml (extra </td>)
5214 Fuzz testing: Parser16
5234 Fuzz testing: Parser21
5237 ! irc://{{ftp://a" onmouseover="alert('hello world');"
5242 <th> <a href="irc://{{ftp://a" class="external free" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
5252 Fuzz testing: Parser22
5254 http://===r:::https://b
5258 <p><a href="http://===r:::https://b" class="external free" rel="nofollow">http://===r:::https://b</a>
5266 # Known to produce bad XML for now
5268 Fuzz testing: Parser24
5275 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
5276 <br style="onmouseover='alert(document.cookie);' " />
5278 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
5283 <u class="|">}}}} >
5284 <br style="onmouseover='alert(document.cookie);'" />
5286 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
5295 # Note: the current result listed for this is not what the original one was,
5296 # but the original bug was JavaScript injection, which is fixed in any case.
5297 # It's not clear that the original result listed was any more correct than the
5298 # current one. Original result:
5301 # <li class="||">
5302 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
5304 Fuzz testing: Parser25 (bug 6055)
5310 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
5312 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
5317 Fuzz testing: URL adjacent extension (with space, clean)
5320 http://example.com <nowiki>junk</nowiki>
5322 <p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a> junk
5327 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
5330 http://example.com<nowiki>junk</nowiki>
5332 <p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>junk
5337 Fuzz testing: URL adjacent extension (no space, dirty; pre)
5340 http://example.com<pre>junk</pre>
5342 <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a><pre>junk</pre>
5347 Fuzz testing: image with bogus manual thumbnail
5349 [[Image:foobar.jpg|thumbnail= ]]
5351 <div class="thumb tright"><div class="thumbinner" style="width:1943px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
5356 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
5358 <pre dir=" "></pre>
5360 <pre dir=" "></pre>
5365 Parsing optional HTML elements (Bug 6171)
5370 <td> Some tabular data</td>
5371 <td> More tabular data ...
5372 <td> And yet som tabular data</td>
5378 <td> Some tabular data</td>
5379 <td> More tabular data ...
5380 </td><td> And yet som tabular data</td>
5387 Correct handling of <td>, <tr> (Bug 6171)
5392 <td> Some tabular data</td>
5393 <td> More tabular data ...</td>
5394 <td> And yet som tabular data</td>
5400 <td> Some tabular data</td>
5401 <td> More tabular data ...</td>
5402 <td> And yet som tabular data</td>
5410 Parsing crashing regression (fr:JavaScript)
5414 <p></body></x>
5419 Inline wiki vs wiki block nesting
5425 <p><b>Bold paragraph</b>
5426 </p><p>New wiki paragraph
5431 Inline HTML vs wiki block nesting
5439 <p><b>Bold paragraph</b>
5440 </p><p>New wiki paragraph
5444 # Original result was this:
5445 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
5447 # While that might be marginally more intuitive, maybe, the six-apostrophe
5448 # construct is clearly pathological and the result stated here (which is what
5449 # the parser actually does) is about as reasonable as anything.
5451 Mixing markup for italics and bold
5454 '''bold''''''bold''bolditalics'''''
5456 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
5464 Article for special page transclusion test
5468 Special page transclusion
5471 {{Special:Prefixindex/Xyzzyx}}
5475 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
5480 Special page transclusion twice (bug 5021)
5483 {{Special:Prefixindex/Xyzzyx}}
5484 {{Special:Prefixindex/Xyzzyx}}
5488 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
5491 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
5496 Transclusion of default MediaWiki message
5498 {{MediaWiki:Mainpage}}
5505 Transclusion of nonexistent MediaWiki message
5507 {{MediaWiki:Mainpagexxx}}
5509 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
5514 Transclusion of MediaWiki message with underscore
5516 {{MediaWiki:history_short}}
5523 Transclusion of MediaWiki message with space
5525 {{MediaWiki:history short}}
5532 Invalid header with following text
5542 Section extraction test (section 0)
5562 Section extraction test (section 1)
5584 Section extraction test (section 2)
5605 Section extraction test (section 3)
5625 Section extraction test (section 4)
5649 Section extraction test (section 5)
5669 Section extraction test (section 6)
5690 Section extraction test (section 7)
5710 Section extraction test (section 8)
5730 Section extraction test (section 9)
5751 Section extraction test (section 10)
5771 Section extraction test (nonexistent section 11)
5790 Section extraction test with bogus heading (section 1)
5795 ==bogus== not a legal section
5799 ==bogus== not a legal section
5803 Section extraction test with bogus heading (section 2)
5808 ==bogus== not a legal section
5815 Section extraction test with comment after heading (section 1)
5827 Section extraction test with comment after heading (section 2)
5839 Section extraction test with bogus <nowiki> heading (section 1)
5844 ==bogus== <nowiki>not a legal section</nowiki>
5848 ==bogus== <nowiki>not a legal section</nowiki>
5852 Section extraction test with bogus <nowiki> heading (section 2)
5857 ==bogus== <nowiki>not a legal section</nowiki>
5864 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
5865 # instead of respecting commented sections
5867 Section extraction prefixed by comment (section 1)
5878 Section extraction prefixed by comment (section 2)
5889 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
5890 # instead of respecting HTML-style headings
5892 Section extraction, mixed wiki and html (section 1)
5908 Section extraction, mixed wiki and html (section 2)
5924 # Formerly testing for bug 3342
5926 Section extraction, heading surrounded by <noinclude>
5930 <noinclude>==unmarked==</noinclude>
5936 # Test behaviour of bug 19910
5938 Sectiion with all-equals
5943 The line above must have a trailing space
5946 But just in case it doesn't...
5950 But just in case it doesn't...
5954 Section replacement test (section 0)
5985 Section replacement test (section 1)
6014 Section replacement test (section 2)
6044 Section replacement test (section 3)
6075 Section replacement test (section 4)
6102 Section replacement test (section 5)
6133 Section replacement test (section 6)
6163 Section replacement test (section 7)
6194 Section replacement test (section 8)
6225 Section replacement test (section 9)
6254 Section replacement test (section 10)
6284 Section replacement test with initial whitespace (bug 13728)
6288 Preformatted initial line
6292 Preformatted initial line
6299 Section extraction, heading followed by pre with 20 spaces (bug 6398)
6311 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
6324 Section extraction, <pre> around bogus header (bug 10309)
6341 Section replacement, <pre> around bogus header (bug 10309)
6343 noxml replace=2,"xxx"
6364 Handling of 
 in URLs
6368 <ul><li><ul><li><a href="irc://%0Aa" class="external free" rel="nofollow">irc://%0Aa</a>
6375 5 quotes, code coverage +1 line
6382 Special:Search page linking.
6386 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
6401 * {{SUBJECTPAGENAME}}
6402 * {{SUBJECTPAGENAMEE}}
6409 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
6411 <ul><li> Parser test
6412 </li><li> Parser test
6413 </li><li> Parser test
6414 </li><li> Parser_test
6415 </li><li> Parser test
6416 </li><li> Parser_test
6417 </li><li> Talk:Parser test
6418 </li><li> Talk:Parser_test
6419 </li><li> Parser test
6420 </li><li> Parser_test
6427 </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>
6431 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
6441 image4 |300px| centre
6442 image5.svg| http://///////
6447 <table class="gallery" cellspacing="0" cellpadding="0">
6449 <td><div class="gallerybox" style="width: 155px;">
6450 <div style="height: 152px;">Image1.png</div>
6451 <div class="gallerytext">
6454 <td><div class="gallerybox" style="width: 155px;">
6455 <div style="height: 152px;">Image2.gif</div>
6456 <div class="gallerytext">
6461 <td><div class="gallerybox" style="width: 155px;">
6462 <div style="height: 152px;">Image3</div>
6463 <div class="gallerytext">
6466 <td><div class="gallerybox" style="width: 155px;">
6467 <div style="height: 152px;">Image4</div>
6468 <div class="gallerytext">
6475 <td><div class="gallerybox" style="width: 155px;">
6476 <div style="height: 152px;">Image5.svg</div>
6477 <div class="gallerytext">
6478 <p><a href="http://///////" class="external free" rel="nofollow">http://///////</a>
6482 <td><div class="gallerybox" style="width: 155px;">
6483 <div style="height: 152px;">* image6</div>
6484 <div class="gallerytext">
6493 Gallery (with options)
6495 <gallery widths='60px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
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">
6503 <caption>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></caption>
6505 <td><div class="gallerybox" style="width: 95px;">
6506 <div style="height: 52px;">Nonexistant.jpg</div>
6507 <div class="gallerytext">
6512 <td><div class="gallerybox" style="width: 95px;">
6513 <div style="height: 52px;">Nonexistant.jpg</div>
6514 <div class="gallerytext">
6519 <td><div class="gallerybox" style="width: 95px;">
6520 <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>
6521 <div class="gallerytext">
6522 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6526 <td><div class="gallerybox" style="width: 95px;">
6527 <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>
6528 <div class="gallerytext">
6537 gallery (with showfilename option)
6539 <gallery showfilename>
6540 File:Nonexistant.jpg|caption
6541 File:Nonexistant.jpg
6542 image:foobar.jpg|some '''caption''' [[Main Page]]
6546 <table class="gallery" cellspacing="0" cellpadding="0">
6548 <td><div class="gallerybox" style="width: 155px;">
6549 <div style="height: 152px;">Nonexistant.jpg</div>
6550 <div class="gallerytext">
6551 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
6556 <td><div class="gallerybox" style="width: 155px;">
6557 <div style="height: 152px;">Nonexistant.jpg</div>
6558 <div class="gallerytext">
6559 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
6563 <td><div class="gallerybox" style="width: 155px;">
6564 <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>
6565 <div class="gallerytext">
6566 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
6567 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6571 <td><div class="gallerybox" style="width: 155px;">
6572 <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>
6573 <div class="gallerytext">
6574 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
6584 HTML Hex character encoding (spells the word "JavaScript")
6586 JavaScript
6588 <p>JavaScript
6593 __FORCETOC__ override
6605 ISBN 978-0-1234-56 789
6607 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
6612 ISBN followed by 5 spaces
6623 ISBN ISBN 1234567890
6625 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
6630 Bug 22905: <abbr> followed by ISBN followed by </a>
6632 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
6634 <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>
6643 <p>RFC <a href="http://tools.ietf.org/html/rfc1234" class="external mw-magiclink-rfc">RFC 1234</a>
6648 Double RFC with a wiki link
6652 <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>
6661 <p><a href="http://tools.ietf.org/html/rfc983" class="external mw-magiclink-rfc">RFC 983</a> 987
6666 Centre-aligned image
6668 [[Image:foobar.jpg|centre]]
6670 <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>
6677 [[Image:foobar.jpg|none]]
6679 <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>
6684 Width + Height sized image (using px) (height is ignored)
6686 [[Image:foobar.jpg|640x480px]]
6688 <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>
6693 Width-sized image (using px, no following whitespace)
6695 [[Image:foobar.jpg|640px]]
6697 <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>
6702 Width-sized image (using px, with following whitespace - test regression from r39467)
6704 [[Image:foobar.jpg|640px ]]
6706 <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>
6711 Width-sized image (using px, with preceding whitespace - test regression from r39467)
6713 [[Image:foobar.jpg| 640px]]
6715 <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>
6720 Another italics / bold test
6728 # Note the results may be incorrect, as parserTest output included this:
6729 # XML error: Mismatched tag at byte 6120:
6730 # ...<dd> </dt></dl> </dd...
6738 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
6749 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
6751 Images with the "|" character in the comment
6753 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
6755 <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>
6760 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
6762 <html><script>alert(1);</script></html>
6764 <p><html><script>alert(1);</script></html>
6769 HTML with raw HTML ($wgRawHtml==true)
6773 <html><script>alert(1);</script></html>
6775 <p><script>alert(1);</script>
6780 Parents of subpages, one level up
6782 subpage title=[[Subpage test/L1/L2/L3]]
6786 <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>
6792 Parents of subpages, one level up, not named
6794 subpage title=[[Subpage test/L1/L2/L3]]
6798 <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>
6805 Parents of subpages, two levels up
6807 subpage title=[[Subpage test/L1/L2/L3]]
6813 <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
6814 </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>
6819 Parents of subpages, two levels up, without trailing slash or name.
6821 subpage title=[[Subpage test/L1/L2/L3]]
6830 Parents of subpages, two levels up, with lots of extra trailing slashes.
6832 subpage title=[[Subpage test/L1/L2/L3]]
6836 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
6841 Definition list code coverage
6847 <dl><dt> title  </dt><dd> def
6848 </dd><dt> title </dt><dd> def
6849 </dd><dt>title</dt><dd> def
6855 Don't fall for the self-closing div
6857 <div>hello world</div/>
6859 <div>hello world</div>
6868 <p>[[:Template:Msg]]
6877 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
6881 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
6883 Always escape literal '>' in output, not just after '<'
6897 <p>This is a test template
6898 This is a test template
6910 Inclusion of !userCanEdit() content
6914 <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>
6920 Out-of-order TOC heading levels
6929 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
6931 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
6933 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
6934 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
6937 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
6939 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
6940 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
6944 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
6945 <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>
6946 <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>
6947 <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>
6948 <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>
6949 <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>
6950 <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>
6956 ISBN with a dummy number
6966 ISBN with space-delimited number
6970 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
6976 ISBN with multiple spaces, no number
6995 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
6996 </p><p>ISBN 12345678901
7002 ISBN with trailing year (bug 8110)
7004 ISBN 1-234-56789-0 - 2006
7006 ISBN 1 234 56789 0 - 2006
7008 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
7009 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
7017 {{anchorencode:foo bar©#%n}}
7019 <p>foo_bar.C2.A9.23.25n
7024 anchorencode trims spaces
7026 {{anchorencode: __pretty__please__}}
7033 anchorencode deals with links
7035 {{anchorencode: [[hello|world]] [[hi]]}}
7042 anchorencode deals with templates
7044 {{anchorencode: {{Foo}} }}
7051 anchorencode encodes like the TOC generator: (bug 18431)
7053 === _ +:.3A%3A&&]] ===
7054 {{anchorencode: _ +:.3A%3A&&]] }}
7057 <h3> <span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D"> _ +:.3A%3A&&]] </span></h3>
7058 <p>.2B:.3A.253A.26.26.5D.5D
7062 # Expected output in the following test is not necessarily expected (there
7063 # should probably be <p> tags inside the <blockquote> in the output) -- it's
7064 # only testing for well-formedness.
7066 Bug 6200: blockquotes and paragraph formatting
7086 Bug 8293: Use of center tag ruins paragraph formatting
7108 ### Language variants related tests
7111 Self-link in language variants
7113 title=[[Dunav]] language=sr
7115 Both [[Dunav]] and [[Дунав]] are names for this river.
7117 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
7123 Link to pages in language variants
7127 Main Page can be written as [[Маин Паге]]
7129 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
7135 Multiple links to pages in language variants
7139 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
7141 <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>.
7147 Simple template in language variants
7153 <p>This is a test template
7159 Template with explicit namespace in language variants
7165 <p>This is a test template
7171 Basic test for template parameter in language variants
7175 {{парамтест|param=foo}}
7177 <p>This is a test template with parameter foo
7183 Simple category in language variants
7187 [[Category:МедиаWики Усер'с Гуиде]]
7189 <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>
7194 Stripping -{}- tags (language variants)
7198 Latin proverb: -{Ne nuntium necare}-
7200 <p>Latin proverb: Ne nuntium necare
7206 Prevent conversion with -{}- tags (language variants)
7208 language=sr variant=sr-ec
7210 Latinski: -{Ne nuntium necare}-
7212 <p>Латински: Ne nuntium necare
7218 Prevent conversion of text with -{}- tags (language variants)
7220 language=sr variant=sr-ec
7222 Latinski: -{Ne nuntium necare}-
7224 <p>Латински: Ne nuntium necare
7230 Prevent conversion of links with -{}- tags (language variants)
7232 language=sr variant=sr-ec
7236 <p><a href="/index.php?title=Main_Page&variant=sr-ec" title="Main Page">Main Page</a>
7242 -{}- tags within headlines (within html for parserConvert())
7244 language=sr variant=sr-ec
7248 <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>
7254 Explicit definition of language variant alternatives
7256 language=zh variant=zh-tw
7258 -{zh:China;zh-tw:Taiwan}-, not China
7260 <p>Taiwan, not China
7266 Explicit session-wise language variant mapping (A flag and - flag)
7268 language=zh variant=zh-tw
7270 Taiwan is not China.
7271 But -{A|zh:China;zh-tw:Taiwan}- is China,
7272 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
7273 and -{China}- is China.
7275 <p>Taiwan is not China.
7276 But Taiwan is Taiwan,
7277 (This should be stripped!)
7283 Explicit session-wise language variant mapping (H flag for hide)
7285 language=zh variant=zh-tw
7287 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
7290 <p>(This should be stripped!)
7296 Adding explicit conversion rule for title (T flag)
7298 language=zh variant=zh-tw showtitle
7300 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
7303 <p>Should be stripped!
7308 Testing that changing the language variant here in the tests actually works
7310 language=zh variant=zh showtitle
7312 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
7315 <p>Should be stripped!
7320 Bug 24072: more test on conversion rule for title
7322 language=zh variant=zh-tw showtitle
7324 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
7325 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
7328 <p>This should be stripped!
7329 This won't take interferes with the title rule.
7334 Raw output of variant escape tags (R flag)
7336 language=zh variant=zh-tw
7338 Raw: -{R|zh:China;zh-tw:Taiwan}-
7340 <p>Raw: zh:China;zh-tw:Taiwan
7345 Nested using of manual convert syntax
7347 language=zh variant=zh-hk
7349 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
7351 <p>Nested: Hello Hong Kong!
7356 Do not convert roman numbers to language variants
7358 language=sr variant=sr-ec
7362 <p>Фридрих IV је цар.
7367 Unclosed language converter markup "-{"
7378 Don't convert raw rule "-{R|=>}-" to "=>"
7395 Bug 529: Uncovered bullet
7406 Bug 529: Uncovered table already at line-start
7429 Bug 529: Uncovered bullet in parser function result
7431 * Foo {{lc:{{bullet}} }}
7440 Bug 5678: Double-parsed template argument
7442 {{lc:{{{1}}}|hello}}
7449 Bug 5678: Double-parsed template invocation
7451 {{lc:{{paramtest {{!}} param = hello }} }}
7453 <p>{{paramtest | param = hello }}
7458 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
7484 Morwen/13: Unclosed link followed by heading
7491 <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>
7496 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
7503 <h1> <span class="mw-headline" id="heading">heading</span></h1>
7508 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
7515 <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>
7530 Paragraphs inside divs (no extra line breaks)
7542 Paragraphs inside divs (extra line break on open)
7557 Paragraphs inside divs (extra line break on close)
7572 Paragraphs inside divs (extra line break on open and close)
7589 Nesting tags, paragraphs on lines which begin with <div>
7593 <div></div><strong>A
7602 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
7604 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
7608 <blockquote>Line one
7610 Line two</blockquote>
7612 <blockquote>Line one
7613 Line two</blockquote>
7618 Bug 6200: paragraphs inside blockquotes (extra line break on open)
7625 Line two</blockquote>
7630 Line two</blockquote>
7635 Bug 6200: paragraphs inside blockquotes (extra line break on close)
7639 <blockquote>Line one
7644 <blockquote>Line one
7652 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
7671 Paragraphs inside blockquotes/divs (no extra line breaks)
7673 <blockquote><div>Line one
7675 Line two</div></blockquote>
7677 <blockquote><div>Line one
7678 Line two</div></blockquote>
7683 Paragraphs inside blockquotes/divs (extra line break on open)
7688 Line two</div></blockquote>
7693 Line two</div></blockquote>
7698 Paragraphs inside blockquotes/divs (extra line break on close)
7700 <blockquote><div>Line one
7705 <blockquote><div>Line one
7713 Paragraphs inside blockquotes/divs (extra line break on open and close)
7730 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
7732 wgLinkHolderBatchSize=0
7738 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
7739 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
7740 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
7745 Free external link invading image caption
7747 [[Image:Foobar.jpg|thumb|http://x|hello]]
7749 <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>
7754 Bug 15196: localised external link numbers
7758 [http://en.wikipedia.org/]
7760 <p><a href="http://en.wikipedia.org/" class="external autonumber" rel="nofollow">[۱]</a>
7765 Multibyte character in padleft
7767 {{padleft:-Hello|7|Æ}}
7774 Multibyte character in padright
7776 {{padright:Hello-|7|Æ}}
7789 <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>
7794 formatdate parser function
7796 {{#formatdate:2009-03-24}}
7798 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
7803 formatdate parser function, with default format
7805 {{#formatdate:2009-03-24|mdy}}
7807 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
7812 Linked date with autoformatting disabled
7814 wgUseDynamicDates=false
7818 <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>
7823 Spacing of numbers in formatted dates
7825 {{#formatdate:January 15}}
7827 <p><span class="mw-formatted-date" title="01-15">January 15</span>
7832 Spacing of numbers in formatted dates (linked)
7834 wgUseDynamicDates=true
7838 <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>
7851 Edit comment with link
7855 I like the [[Main Page]] a lot
7857 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
7861 Edit comment with link and link text
7865 I like the [[Main Page|best pages]] a lot
7867 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
7871 Edit comment with link and link text with suffix
7875 I like the [[Main Page|best page]]s a lot
7877 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
7881 Edit comment with section link (non-local, eg in history list)
7883 comment title=[[Main Page]]
7885 /* External links */ removed bogus entries
7887 <span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→</a>External links: </span> removed bogus entries
7891 Edit comment with section link (local, eg in diff view)
7893 comment local title=[[Main Page]]
7895 /* External links */ removed bogus entries
7897 <span class="autocomment"><a href="#External_links">→</a>External links: </span> removed bogus entries
7901 Edit comment with subpage link (bug 14080)
7905 title=[[Subpage test]]
7907 Poked at a [[/subpage]] here...
7909 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
7913 Edit comment with subpage link and link text (bug 14080)
7917 title=[[Subpage test]]
7919 Poked at a [[/subpage|neat little page]] here...
7921 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
7925 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
7928 title=[[Subpage test]]
7930 Poked at a [[/subpage]] here...
7932 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
7936 Edit comment with bare anchor link (local, as on diff)
7944 <a href="#section">#section</a>
7948 Edit comment with bare anchor link (non-local, as on history)
7955 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
7959 Space normalisation on autocomment (bug 22784)
7964 /* __hello__world__ */
7966 <span class="autocomment"><a href="/wiki/Main_Page#hello_world" title="Main Page">→</a>__hello__world__</span>
7970 MediaWiki:bad image list
7972 * [[File:Bad.jpg]] except [[Nasty page]]
7976 Bad images - basic functionality
7983 Bad images - bug 16039: text after bad image disappears
7995 Verify that displaytitle works (bug #22501) no displaytitle
7999 wgAllowDisplayTitle=true
8000 wgRestrictDisplayTitle=false
8002 this is not the the title
8005 <p>this is not the the title
8010 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
8015 wgAllowDisplayTitle=true
8016 wgRestrictDisplayTitle=false
8018 this is not the the title
8019 {{DISPLAYTITLE:whatever}}
8022 <p>this is not the the title
8027 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
8032 wgAllowDisplayTitle=true
8033 wgRestrictDisplayTitle=true
8035 this is not the the title
8036 {{DISPLAYTITLE:whatever}}
8039 <p>this is not the the title
8044 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
8049 wgAllowDisplayTitle=true
8050 wgRestrictDisplayTitle=true
8052 this is not the the title
8053 {{DISPLAYTITLE:screen}}
8056 <p>this is not the the title
8061 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
8066 wgAllowDisplayTitle=false
8068 this is not the the title
8069 {{DISPLAYTITLE:screen}}
8072 <p>this is not the the title
8073 <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>
8078 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
8083 wgAllowDisplayTitle=false
8085 this is not the the title
8088 <p>this is not the the title
8093 preload: check <noinclude> and <includeonly>
8097 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
8103 preload: check <onlyinclude>
8107 Goodbye <onlyinclude>Hello world</onlyinclude>
8113 preload: can pass tags through if we want to
8117 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
8119 <includeonly>Hello world</includeonly>
8123 preload: check that it doesn't try to do tricks
8127 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
8129 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
8133 Play a bit with r67090 and bug 3158
8137 <div style="width:50% !important"> </div>
8138 <div style="width:50% !important"> </div>
8139 <div style="width:50% !important"> </div>
8140 <div style="border : solid;"> </div>
8142 <div style="width:50% !important"> </div>
8143 <div style="width:50% !important"> </div>
8144 <div style="width:50% !important"> </div>
8145 <div style="border : solid;"> </div>
8150 HTML5 data attributes
8152 <span data-foo="bar">Baz</span>
8153 <p data-abc-def_hij="">Quuz</p>
8155 <p><span data-foo="bar">Baz</span>
8157 <p data-abc-def_hij="">Quuz</p>
8168 Try for 100% code coverage