1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well formdness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # showtitle make the first line the title
25 # comment run through Linker::formatComment() instead of main parser
26 # local format section links in edit comment text as local links
28 # For testing purposes, temporary articles can created:
29 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
30 # where '/' denotes a newline.
32 # This is the standard article assumed to exist.
69 This is a simple paragraph.
71 <p>This is a simple paragraph.
91 * plain''italic''plain
92 * plain''italic''plain''italic''plain
93 * plain'''bold'''plain
94 * plain'''bold'''plain'''bold'''plain
95 * plain''italic''plain'''bold'''plain
96 * plain'''bold'''plain''italic''plain
97 * plain''italic'''bold-italic'''italic''plain
98 * plain'''bold''bold-italic''bold'''plain
99 * plain'''''bold-italic'''italic''plain
100 * plain'''''bold-italic''bold'''plain
101 * plain''italic'''bold-italic'''''plain
102 * plain'''bold''bold-italic'''''plain
103 * plain l'''italic''plain
104 * plain l''''bold''' plain
107 </li><li> plain<i>italic</i>plain
108 </li><li> plain<i>italic</i>plain<i>italic</i>plain
109 </li><li> plain<b>bold</b>plain
110 </li><li> plain<b>bold</b>plain<b>bold</b>plain
111 </li><li> plain<i>italic</i>plain<b>bold</b>plain
112 </li><li> plain<b>bold</b>plain<i>italic</i>plain
113 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
114 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
115 </li><li> plain<i><b>bold-italic</b>italic</i>plain
116 </li><li> plain<b><i>bold-italic</i>bold</b>plain
117 </li><li> plain<i>italic<b>bold-italic</b></i>plain
118 </li><li> plain<b>bold<i>bold-italic</i></b>plain
119 </li><li> plain l'<i>italic</i>plain
120 </li><li> plain l'<b>bold</b> plain
126 ### <nowiki> test cases
130 <nowiki> unordered list
132 <nowiki>* This is not an unordered list item.</nowiki>
134 <p>* This is not an unordered list item.
141 <nowiki>Lorem ipsum dolor
162 :There is not nowiki.
163 :There is <nowiki>nowiki</nowiki>.
165 #There is not nowiki.
166 #There is <nowiki>nowiki</nowiki>.
168 *There is not nowiki.
169 *There is <nowiki>nowiki</nowiki>.
171 <dl><dd>There is not nowiki.
172 </dd><dd>There is nowiki.
174 <ol><li>There is not nowiki.
175 </li><li>There is nowiki.
177 <ul><li>There is not nowiki.
178 </li><li>There is nowiki.
190 <!-- comment 1 --> asdf
226 asdf<!-- comment 1 -->jkl
236 <!-- foo --> b <!-- bar -->
250 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
256 Comment semantics and delimiters
258 <!-- --><!----><!-----><!------>
264 Comment semantics and delimiters, redux
266 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
267 -- foo -- funky huh? ... -->
273 Comment semantics and delimiters: directors cut
275 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
276 everything starting with < followed by !-- until the first -- and > we see,
277 that wouldn't be valid XML however, since in XML -- has to terminate a comment
285 Comment semantics: nesting
287 <!--<!-- no, we're not going to do anything fancy here -->-->
294 Comment semantics: unclosed comment at end
296 <!--This comment will run out to the end of the document
302 Comment in template title
311 Comment on its own line post-expand
323 ### Preformatted text
332 And a [[Main Page|link]]
338 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
343 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
360 Regression with preformatted in <center>
374 <pre> with attributes (bug 3202)
376 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
378 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
383 <pre> with width attribute (bug 3202)
385 <pre width="8">Narrow screen goodies</pre>
387 <pre width="8">Narrow screen goodies</pre>
392 <pre> with forbidden attribute (bug 3202)
394 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
396 <pre width="8">Narrow screen goodies</pre>
401 <pre> with forbidden attribute values (bug 3202)
403 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
405 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
417 <dl><dt> name </dt><dd> Definition
423 Definition list for indentation only
427 <dl><dd> Indented text
433 Definition list with no space
437 <dl><dt>name</dt><dd>Definition
443 Definition list with URL link
445 ; http://example.com/ : definition
447 <dl><dt> <a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> </dt><dd> definition
453 Definition list with bracketed URL link
455 ;[http://www.example.com/ Example]:Something about it
457 <dl><dt><a href="http://www.example.com/" class="external text" rel="nofollow">Example</a></dt><dd>Something about it
463 Definition list with wikilink containing colon
465 ; [[Help:FAQ]]: The least-read page on Wikipedia
467 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt><dd> The least-read page on Wikipedia
472 # At Brion's and JeLuF's insistence... :)
474 Definition list with news link containing colon
476 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
478 <dl><dt> <a href="news:alt.wikipedia.rox" class="external free" rel="nofollow">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
484 Malformed definition list with colon
486 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
488 <dl><dt> <a href="news:alt.wikipedia.rox" class="external free" rel="nofollow">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop
494 Definition lists: colon in external link text
496 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
498 <dl><dt> <a href="http://www.wikipedia2.org/" class="external text" rel="nofollow">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up
504 Definition lists: colon in HTML attribute
506 ;<b style="display: inline">bold</b>
508 <dl><dt><b style="display: inline">bold</b>
515 Definition lists: self-closed tag
517 ;one<br/>two : two-line fun
519 <dl><dt>one<br />two </dt><dd> two-line fun
529 External links: non-bracketed
531 Non-bracketed: http://example.com
533 <p>Non-bracketed: <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>
538 External links: numbered
540 Numbered: [http://example.com]
541 Numbered: [http://example.net]
542 Numbered: [http://example.com]
544 <p>Numbered: <a href="http://example.com" class="external autonumber" rel="nofollow">[1]</a>
545 Numbered: <a href="http://example.net" class="external autonumber" rel="nofollow">[2]</a>
546 Numbered: <a href="http://example.com" class="external autonumber" rel="nofollow">[3]</a>
551 External links: specified text
553 Specified text: [http://example.com link]
555 <p>Specified text: <a href="http://example.com" class="external text" rel="nofollow">link</a>
560 External links: trail
562 Linktrails should not work for external links: [http://example.com link]s
564 <p>Linktrails should not work for external links: <a href="http://example.com" class="external text" rel="nofollow">link</a>s
569 External links: dollar sign in URL
571 http://example.com/1$2345
573 <p><a href="http://example.com/1$2345" class="external free" rel="nofollow">http://example.com/1$2345</a>
578 External links: dollar sign in URL (named)
580 [http://example.com/1$2345]
582 <p><a href="http://example.com/1$2345" class="external autonumber" rel="nofollow">[1]</a>
587 External links: open square bracket forbidden in URL (bug 4377)
589 http://example.com/1[2345
591 <p><a href="http://example.com/1" class="external free" rel="nofollow">http://example.com/1</a>[2345
596 External links: open square bracket forbidden in URL (named) (bug 4377)
598 [http://example.com/1[2345]
600 <p><a href="http://example.com/1" class="external text" rel="nofollow">[2345</a>
605 External links: nowiki in URL link text (bug 6230)
607 [http://example.com/ <nowiki>''example site''</nowiki>]
609 <p><a href="http://example.com/" class="external text" rel="nofollow">''example site''</a>
614 External links: newline forbidden in text (bug 6230 regression check)
616 [http://example.com/ first
619 <p>[<a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> first
627 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
629 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
634 External image from https
636 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
638 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
643 Link to non-http image, no img tag
645 Link to non-http image, no img tag: ftp://example.com/test.jpg
647 <p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class="external free" rel="nofollow">ftp://example.com/test.jpg</a>
652 External links: terminating separator
654 Terminating separator: http://example.com/thing,
656 <p>Terminating separator: <a href="http://example.com/thing" class="external free" rel="nofollow">http://example.com/thing</a>,
661 External links: intervening separator
663 Intervening separator: http://example.com/1,2,3
665 <p>Intervening separator: <a href="http://example.com/1,2,3" class="external free" rel="nofollow">http://example.com/1,2,3</a>
670 External links: old bug with URL in query
672 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
674 <p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class="external text" rel="nofollow">link</a>
679 External links: old URL-in-URL bug, mixed protocols
681 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
683 <p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class="external text" rel="nofollow">link</a>
688 External links: URL in text
690 URL in text: [http://example.com http://example.com]
692 <p>URL in text: <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>
697 External links: Clickable images
699 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
701 <p>ja-style clickable images: <a href="http://example.com" class="external text" rel="nofollow"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a>
706 External links: raw ampersand
708 Old & use: http://x&y
710 <p>Old & use: <a href="http://x&y" class="external free" rel="nofollow">http://x&y</a>
715 External links: encoded ampersand
717 Old & use: http://x&y
719 <p>Old & use: <a href="http://x&y" class="external free" rel="nofollow">http://x&y</a>
724 External links: encoded equals (bug 6102)
726 http://example.com/?foo=bar
728 <p><a href="http://example.com/?foo=bar" class="external free" rel="nofollow">http://example.com/?foo=bar</a>
733 External links: [raw ampersand]
735 Old & use: [http://x&y]
737 <p>Old & use: <a href="http://x&y" class="external autonumber" rel="nofollow">[1]</a>
742 External links: [encoded ampersand]
744 Old & use: [http://x&y]
746 <p>Old & use: <a href="http://x&y" class="external autonumber" rel="nofollow">[1]</a>
751 External links: [encoded equals] (bug 6102)
753 [http://example.com/?foo=bar]
755 <p><a href="http://example.com/?foo=bar" class="external autonumber" rel="nofollow">[1]</a>
760 External links: [IDN ignored character reference in hostname; strip it right off]
762 [http://e‌xample.com/]
764 <p><a href="http://example.com/" class="external autonumber" rel="nofollow">[1]</a>
769 External links: IDN ignored character reference in hostname; strip it right off
771 http://e‌xample.com/
773 <p><a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a>
778 External links: www.jpeg.org (bug 554)
782 <p><a href="http://www.jpeg.org" class="external free" rel="nofollow">http://www.jpeg.org</a>
787 External links: URL within URL (original bug 2)
789 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
791 <p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class="external autonumber" rel="nofollow">[1]</a>
796 BUG 361: URL inside bracketed URL
798 [http://www.example.com/foo http://www.example.com/bar]
800 <p><a href="http://www.example.com/foo" class="external text" rel="nofollow">http://www.example.com/bar</a>
805 BUG 361: URL within URL, not bracketed
807 http://www.example.com/foo?=http://www.example.com/bar
809 <p><a href="http://www.example.com/foo?=http://www.example.com/bar" class="external free" rel="nofollow">http://www.example.com/foo?=http://www.example.com/bar</a>
814 BUG 289: ">"-token in URL-tail
816 http://www.example.com/<hello>
818 <p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a><hello>
823 BUG 289: literal ">"-token in URL-tail
825 http://www.example.com/<b>html</b>
827 <p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a><b>html</b>
832 BUG 289: ">"-token in bracketed URL
834 [http://www.example.com/<hello> stuff]
836 <p><a href="http://www.example.com/" class="external text" rel="nofollow"><hello> stuff</a>
841 BUG 289: literal ">"-token in bracketed URL
843 [http://www.example.com/<b>html</b> stuff]
845 <p><a href="http://www.example.com/" class="external text" rel="nofollow"><b>html</b> stuff</a>
850 BUG 289: literal double quote at end of URL
852 http://www.example.com/"hello"
854 <p><a href="http://www.example.com/" class="external free" rel="nofollow">http://www.example.com/</a>"hello"
859 BUG 289: literal double quote in bracketed URL
861 [http://www.example.com/"hello" stuff]
863 <p><a href="http://www.example.com/" class="external text" rel="nofollow">"hello" stuff</a>
868 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
870 [http://www.example.com test]
872 <p><a href="http://www.example.com" class="external text" rel="nofollow">test</a>
877 External links: wiki links within external link (Bug 3695)
879 [http://example.com [[wikilink]] embedded in ext link]
881 <p><a href="http://example.com" class="external text" rel="nofollow"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a href="http://example.com" class="external text" rel="nofollow"> embedded in ext link</a>
886 BUG 787: Links with one slash after the url protocol are invalid
890 [http:/example.com title]
893 </p><p>[http:/example.com title]
898 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
900 ''[http://example.com text'']
901 [http://example.com '''text]'''
902 ''Something [http://example.com in italic'']
903 ''Something [http://example.com mixed''''', even bold]'''
904 '''''Now [http://example.com both''''']
906 <p><a href="http://example.com" class="external text" rel="nofollow"><i>text</i></a>
907 <a href="http://example.com" class="external text" rel="nofollow"><b>text</b></a>
908 <i>Something </i><a href="http://example.com" class="external text" rel="nofollow"><i>in italic</i></a>
909 <i>Something </i><a href="http://example.com" class="external text" rel="nofollow"><i>mixed</i><b>, even bold</b></a>
910 <i><b>Now </b></i><a href="http://example.com" class="external text" rel="nofollow"><i><b>both</b></i></a>
918 http://www.example.com/?title=AT%26T
920 <p><a href="http://www.example.com/?title=AT%26T" class="external free" rel="nofollow">http://www.example.com/?title=AT%26T</a>
925 Bug 4781, 5267: %26 in URL
927 http://www.example.com/?title=100%25_Bran
929 <p><a href="http://www.example.com/?title=100%25_Bran" class="external free" rel="nofollow">http://www.example.com/?title=100%25_Bran</a>
934 Bug 4781, 5267: %28, %29 in URL
936 http://www.example.com/?title=Ben-Hur_%281959_film%29
938 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external free" rel="nofollow">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
944 Bug 4781: %26 in autonumber URL
946 [http://www.example.com/?title=AT%26T]
948 <p><a href="http://www.example.com/?title=AT%26T" class="external autonumber" rel="nofollow">[1]</a>
953 Bug 4781, 5267: %26 in autonumber URL
955 [http://www.example.com/?title=100%25_Bran]
957 <p><a href="http://www.example.com/?title=100%25_Bran" class="external autonumber" rel="nofollow">[1]</a>
962 Bug 4781, 5267: %28, %29 in autonumber URL
964 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
966 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external autonumber" rel="nofollow">[1]</a>
972 Bug 4781: %26 in bracketed URL
974 [http://www.example.com/?title=AT%26T link]
976 <p><a href="http://www.example.com/?title=AT%26T" class="external text" rel="nofollow">link</a>
981 Bug 4781, 5267: %26 in bracketed URL
983 [http://www.example.com/?title=100%25_Bran link]
985 <p><a href="http://www.example.com/?title=100%25_Bran" class="external text" rel="nofollow">link</a>
990 Bug 4781, 5267: %28, %29 in bracketed URL
992 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
994 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external text" rel="nofollow">link</a>
999 External link containing double-single-quotes in text '' (bug 4598 sanity check)
1001 Some [http://example.com/ pretty ''italics'' and stuff]!
1003 <p>Some <a href="http://example.com/" class="external text" rel="nofollow">pretty <i>italics</i> and stuff</a>!
1008 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
1010 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
1012 <p><i>Some </i><a href="http://example.com/" class="external text" rel="nofollow"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
1017 URL-encoding in URL functions (single parameter)
1019 {{localurl:Some page|amp=&}}
1021 <p>/index.php?title=Some_page&amp=&
1026 URL-encoding in URL functions (multiple parameters)
1028 {{localurl:Some page|q=?&=&}}
1030 <p>/index.php?title=Some_page&q=?&amp=&
1041 Normal text. '''Bold text.''' Normal text. ''Italic text.''
1043 Normal text. '''''Bold italic text.''''' Normal text.
1045 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
1046 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
1052 Unclosed and unmatched quotes
1054 '''''Bold italic text '''with bold deactivated''' in between.'''''
1056 '''''Bold italic text ''with italic deactivated'' in between.'''''
1060 ..spanning two paragraphs (should not work).'''
1062 '''Bold tag left open
1064 ''Italic tag left open
1068 <!-- Unmatching number of opening, closing tags: -->
1069 '''This year''''s election ''should'' beat '''last year''''s.
1071 ''Tom'''s car is bigger than ''Susan'''s.
1073 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
1074 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
1075 </p><p><b>Bold text..</b>
1076 </p><p>..spanning two paragraphs (should not work).
1077 </p><p><b>Bold tag left open</b>
1078 </p><p><i>Italic tag left open</i>
1080 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
1081 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
1088 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
1091 # This should not produce <table></table> as <table><tr><td></td></tr></table>
1092 # is the bare minimun required by the spec, see:
1093 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
1095 A table with no data.
1101 # A table with nothing but a caption is invalid XHTML, we might want to render
1102 # this as <p>caption</p>
1104 A table with nothing but a caption
1112 </caption><tr><td></td></tr></table>
1136 Multiplication table
1138 {| border="1" cellpadding="2"
1139 |+Multiplication table
1141 ! × !! 1 !! 2 !! 3
1159 <table border="1" cellpadding="2">
1160 <caption>Multiplication table
1163 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1167 </th><td> 1 </td><td> 2 </td><td> 3
1171 </th><td> 2 </td><td> 4 </td><td> 6
1175 </th><td> 3 </td><td> 6 </td><td> 9
1179 </th><td> 4 </td><td> 8 </td><td> 12
1183 </th><td> 5 </td><td> 10 </td><td> 15
1191 {| align=right border=1
1193 |rowspan=2| Cell 2, row 1 (and 2)
1200 <table align="right" border="1">
1203 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1204 </td><td> Cell 3, row 1
1208 </td><td> Cell 3, row 2
1219 {| bgcolor=#ABCDEF border=2
1224 |the original table again
1231 <table bgcolor="#ABCDEF" border="2">
1238 </td><td>the original table again
1244 Invalid attributes in table cell (bug 1830)
1258 # FIXME: It's not clear at all that this is the result we want, but the actual
1259 # output right now is invalid XML, so clearly something is wrong. The result
1260 # specified here is now valid XML, which is an improvement . . .
1262 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
1267 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1271 <td><a href="ftp://|x||" class="external autonumber" title="ftp://|x||" rel="nofollow">[1]</a></td><td>" onmouseover="alert(document.cookie)">test
1283 Plain link, capitalized
1287 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1292 Plain link, uncapitalized
1296 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1303 [[Main Page|The Main Page]]
1305 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1314 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
1319 Broken link with fragment
1321 [[Zigzagzogzagzig#zug]]
1323 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
1328 Special page link with fragment
1330 [[Special:Version#anchor]]
1332 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
1337 Nonexistent special page link with fragment
1339 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
1341 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
1348 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1350 <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>
1357 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
1359 <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>!!!
1364 Link with 3 brackets
1373 Piped link with 3 brackets
1375 [[[main page|the main page]]]
1377 <p>[[[main page|the main page]]]
1382 Link with multiple pipes
1384 [[Main Page|The|Main|Page]]
1386 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1393 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1395 <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>
1400 Piped link to namespace
1402 [[Meta:Disclaimers|The disclaimers]]
1404 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
1411 [[Usually caused by a typo (oops}]]
1413 <p>[[Usually caused by a typo (oops}]]
1418 Link containing % (not as a hex sequence)
1422 <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>
1427 Link containing % as a single hex sequence interpreted to char
1431 <p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a>
1436 Link containing % as a double hex sequence interpreted to hex sequence
1440 <p>[[7%2525 Solution]]
1445 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1446 Example for such a section: == < ==
1448 [[%23%3c]][[%23%3e]]
1450 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
1455 Link containing "<#" and ">#" as a hex sequences
1457 [[%3c%23]][[%3e%23]]
1459 <p>[[%3c%23]][[%3e%23]]
1464 Link containing double-single-quotes '' (bug 4598)
1468 [[Lista d''e paise d''o munno]]
1470 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit" class="new" title="Lista d''e paise d''o munno">Lista d''e paise d''o munno</a>
1475 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1477 Some [[Link|pretty ''italics'' and stuff]]!
1479 <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>!
1484 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1486 ''Some [[Link|pretty ''italics'' and stuff]]!
1488 <p><i>Some </i><a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
1495 [[http://www.example.com]]
1497 <p>[<a href="http://www.example.com" class="external autonumber" rel="nofollow">[1]</a>]
1501 # I'm fairly sure the expected result here is wrong.
1502 # We want these to be URL links, not pseudo-pages with URLs for titles....
1503 # However the current output is also pretty screwy.
1506 # I'm changing it to match the current output--it arguably makes more
1507 # sense in the light of the test above. Old expected result was:
1508 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
1510 # But I think this test is bordering on "garbage in, garbage out" anyway.
1515 Piped link to URL: [[http://www.example.com|an example URL]]
1517 <p>Piped link to URL: [<a href="http://www.example.com%7Can" class="external text" rel="nofollow">example URL</a>]
1522 BUG 2: [[page|http://url/]] should link to page, not http://url/
1524 [[Main Page|http://url/]]
1526 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1531 BUG 337: Escaped self-links should be bold
1535 [[Bug462]] [[Bug462]]
1537 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1542 Self-link to section should not be bold
1546 [[Main Page#section]]
1548 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1559 Self-link to numeric title
1565 <p><strong class="selflink">0</strong>
1570 Link to numeric-equivalent title
1576 <p><a href="/wiki/00" title="00">00</a>
1581 <nowiki> inside a link
1583 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1585 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1590 Non-breaking spaces in title
1592 [[ Main Page ]]
1594 <p><a href="/wiki/Main_Page" title="Main Page"> Main Page </a>
1600 ### Interwiki links (see maintenance/interwiki.sql)
1604 Inline interwiki link
1606 [[MeatBall:SoftSecurity]]
1608 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1613 Inline interwiki link with empty title (bug 2372)
1617 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw" title="meatball:">MeatBall:</a>
1622 Interwiki link encoding conversion (bug 1636)
1624 *[[Wikipedia:ro:Olteniţa]]
1625 *[[Wikipedia:ro:Olteniţa]]
1627 <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>
1628 </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>
1634 Interwiki link with fragment (bug 2130)
1636 [[MeatBall:SoftSecurity#foo]]
1638 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1653 Double interlanguage link
1664 Interlanguage link, with prefix links
1676 Double interlanguage link, with prefix links (bug 8897)
1703 Incorrecly removing closing slashes from correctly formed XHTML
1705 <br style="clear:both;" />
1707 <p><br style="clear:both;" />
1712 Failing to transform badly formed HTML into correct XHTML
1718 <p><br clear="left" />
1719 <br clear="right" />
1725 Horizontal ruler (should it add that extra space?)
1739 ### Block-level elements
1762 <ol><li>Numbered list
1779 ***#Number on level 4
1781 **#Number on level 3
1782 **#Number on level 3
1787 <ol><li> with numbers
1789 <ul><li> and bullets
1791 <ol><li> and numbers
1793 </li><li>bullets again
1794 <ul><li>bullet level 2
1795 <ul><li>bullet level 3
1796 <ol><li>Number on level 4
1799 </li><li>bullet level 2
1800 <ol><li>Number on level 3
1801 </li><li>Number on level 3
1804 <ol><li>number level 2
1812 List items are not parsed correctly following a <pre> block (bug 785)
1818 <ul><li> <pre>foo</pre>
1819 </li><li> <pre>bar</pre>
1830 Magic Word: {{CURRENTDAY}}
1839 Magic Word: {{CURRENTDAY2}}
1848 Magic Word: {{CURRENTDAYNAME}}
1857 Magic Word: {{CURRENTDOW}}
1866 Magic Word: {{CURRENTMONTH}}
1875 Magic Word: {{CURRENTMONTHABBREV}}
1877 {{CURRENTMONTHABBREV}}
1884 Magic Word: {{CURRENTMONTHNAME}}
1886 {{CURRENTMONTHNAME}}
1893 Magic Word: {{CURRENTMONTHNAMEGEN}}
1895 {{CURRENTMONTHNAMEGEN}}
1902 Magic Word: {{CURRENTTIME}}
1911 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1920 Magic Word: {{CURRENTYEAR}}
1929 Magic Word: {{FULLPAGENAME}}
1931 title=[[User:Ævar Arnfjörð Bjarmason]]
1935 <p>User:Ævar Arnfjörð Bjarmason
1940 Magic Word: {{FULLPAGENAMEE}}
1942 title=[[User:Ævar Arnfjörð Bjarmason]]
1946 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1951 Magic Word: {{NAMESPACE}}
1953 title=[[User:Ævar Arnfjörð Bjarmason]]
1962 Magic Word: {{NAMESPACEE}}
1964 title=[[User:Ævar Arnfjörð Bjarmason]]
1973 Magic Word: {{NUMBEROFARTICLES}}
1975 {{NUMBEROFARTICLES}}
1982 Magic Word: {{NUMBEROFFILES}}
1991 Magic Word: {{PAGENAME}}
1993 title=[[User:Ævar Arnfjörð Bjarmason]]
1997 <p>Ævar Arnfjörð Bjarmason
2002 Magic Word: {{PAGENAMEE}}
2004 title=[[User:Ævar Arnfjörð Bjarmason]]
2008 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
2013 Magic Word: {{REVISIONID}}
2022 Magic Word: {{SCRIPTPATH}}
2031 Magic Word: {{SERVER}}
2035 <p><a href="http://localhost" class="external free" rel="nofollow">http://localhost</a>
2040 Magic Word: {{SERVERNAME}}
2049 Magic Word: {{SITENAME}}
2058 Namespace 1 {{ns:1}}
2067 Namespace 1 {{ns:01}}
2076 Namespace 0 {{ns:0}} (bug 4783)
2084 Namespace 0 {{ns:00}} (bug 4783)
2092 Namespace -1 {{ns:-1}}
2101 Namespace User {{ns:User}}
2110 Namespace User talk {{ns:User_talk}}
2119 Namespace User talk {{ns:uSeR tAlK}}
2128 Namespace File {{ns:File}}
2137 Namespace File {{ns:Image}}
2146 Namespace (lang=de) Benutzer {{ns:User}}
2157 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
2163 <p>Benutzer Diskussion
2171 {{urlencode:hi world?!}}
2172 {{urlencode:hi world?!|WIKI}}
2173 {{urlencode:hi world?!|PATH}}
2174 {{urlencode:hi world?!|QUERY}}
2187 Magic links: internal link to RFC (bug 479)
2191 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
2196 Magic links: RFC (bug 479)
2200 <p><a href="http://tools.ietf.org/html/rfc822" class="external mw-magiclink-rfc">RFC 822</a>
2205 Magic links: ISBN (bug 1937)
2209 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
2214 Magic links: PMID incorrectly converts space to underscore
2218 <p><a href="http://www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" class="external mw-magiclink-pmid">PMID 1234</a>
2227 Nonexistent template
2229 {{thistemplatedoesnotexist}}
2231 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
2238 This is a test template
2246 <p>This is a test template
2251 Template with explicit namespace
2255 <p>This is a test template
2263 This is a test template with parameter {{{param}}}
2269 {{paramtest|param=foo}}
2271 <p>This is a test template with parameter foo
2276 Template:paramtestnum
2282 Template unnamed parameter
2284 {{paramtestnum|Main Page|the main page}}
2286 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2291 Template:templatesimple
2297 Template:templateredirect
2299 #redirect [[Template:templatesimple]]
2303 Template:templateasargtestnum
2309 Template:templateasargtest
2311 {{template{{{templ}}}}}
2315 Template:templateasargtest2
2321 Template with template name as unnamed argument
2323 {{templateasargtestnum|templatesimple}}
2330 Template with template name as argument
2332 {{templateasargtest|templ=simple}}
2339 Template with template name as argument (2)
2341 {{templateasargtest2|templ=templatesimple}}
2348 Template:templateasargtestdefault
2350 {{{{{templ|templatesimple}}}}}
2360 Template with default value
2362 {{templateasargtestdefault}}
2369 Template with default value (value set)
2371 {{templateasargtestdefault|templ=templa}}
2380 {{templateredirect}}
2387 Template with argument in separate line
2389 {{ templateasargtest |
2397 Template with complex template as argument
2400 param ={{ templateasargtest |
2403 <p>This is a test template with parameter (test)
2408 Template with thumb image (with link in description)
2411 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2413 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>
2418 Template:complextemplate
2420 {{{1}}} {{paramtest|
2421 param ={{{param}}}}}
2425 Template with complex arguments
2428 param ={{ templateasargtest |
2429 templ = simple }}|[[Template:complextemplate|link]]}}
2431 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2436 BUG 553: link with two variables in a piped link
2439 |[[{{{1}}}|{{{2}}}]]
2444 <td>[[{{{1}}}|{{{2}}}]]
2450 Magic variable as template parameter
2452 {{paramtest|param={{SITENAME}}}}
2454 <p>This is a test template with parameter MediaWiki
2461 [[{{{param}}}|link]]
2465 Template parameter as link source
2467 {{linktest|param=Main Page}}
2469 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2477 including another template, {{paramtest|param={{{arg}}}}}
2481 Template passing argument to another template
2483 {{paramtest2|arg='hmm'}}
2485 <p>including another template, This is a test template with parameter 'hmm'
2496 Template as link source
2500 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2518 Template infinite loop
2522 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
2527 Template from main namespace
2546 BUG 529: Template with table, not included at beginning of line
2563 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2581 BUG 41: Template parameters shown as broken links
2593 ''None'' of '''this''' should be
2595 but rather passed unmodified
2599 # hmm, fix this or just deprecate msgnw and document its behavior?
2605 {{msgnw:MSGNW test}}
2607 <p>''None'' of '''this''' should be
2609 but rather passed unmodified
2617 {{int:youhavenewmessages|lots of money|not!}}
2619 <p>You have lots of money (not!).
2626 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2630 <includeonly> and <noinclude> being included
2641 <onlyinclude>Foo</onlyinclude>bar
2645 <onlyinclude> being included
2657 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2661 <onlyinclude> and <includeonly> being included
2670 <includeonly> and <noinclude> on a page
2672 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2679 <onlyinclude> on a page
2681 <onlyinclude>Foo</onlyinclude>bar
2688 Template:Includeonly section
2691 ==Includeonly section==
2697 Bug 6563: Edit link generation for section shown by <includeonly>
2699 {{includeonly section}}
2701 <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>
2702 <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>
2706 # Uses same input as the contents of [[Template:Includeonly section]]
2708 Bug 6563: Section extraction for section shown by <includeonly>
2713 ==Includeonly section==
2721 Bug 6563: Edit link generation for section suppressed by <includeonly>
2724 ==Includeonly section==
2728 <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>
2733 Bug 6563: Section extraction for section suppressed by <includeonly>
2738 ==Includeonly section==
2746 ### Pre-save transform tests
2749 pre-save transform: subst:
2755 This is a test template
2759 pre-save transform: normal template
2769 pre-save transform: nonexistent template
2773 {{thistemplatedoesnotexist}}
2775 {{thistemplatedoesnotexist}}
2780 pre-save transform: subst magic variables
2789 # This is bug 89, which I fixed. -- wtm
2791 pre-save transform: subst: templates with parameters
2795 {{subst:paramtest|param="something else"}}
2797 This is a test template with parameter "something else"
2803 <nowiki>'''not wiki'''</nowiki>
2807 pre-save transform: nowiki in subst (bug 1188)
2811 {{subst:nowikitest}}
2813 <nowiki>'''not wiki'''</nowiki>
2818 Template:commenttest
2820 This template has <!-- a comment --> in it.
2824 pre-save transform: comment in subst (bug 1936)
2828 {{subst:commenttest}}
2830 This template has <!-- a comment --> in it.
2834 pre-save transform: unclosed tag
2838 <nowiki>'''not wiki'''
2840 <nowiki>'''not wiki'''
2844 pre-save transform: mixed tag case
2848 <NOwiki>'''not wiki'''</noWIKI>
2850 <NOwiki>'''not wiki'''</noWIKI>
2854 pre-save transform: unclosed comment in <nowiki>
2858 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2860 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2866 <span onmouseover="alert('crap')">Oh no</span>
2870 (confirming safety of fix for subst bug 1936)
2872 {{Template:dangerous}}
2874 <p><span>Oh no</span>
2879 pre-save transform: comment containing gallery (bug 5024)
2883 <!-- <gallery>data</gallery> -->
2885 <!-- <gallery>data</gallery> -->
2889 pre-save transform: comment containing extension
2893 <!-- <tag>data</tag> -->
2895 <!-- <tag>data</tag> -->
2899 pre-save transform: comment containing nowiki
2903 <!-- <nowiki>data</nowiki> -->
2905 <!-- <nowiki>data</nowiki> -->
2909 pre-save transform: comment containing math
2913 <!-- <math>data</math> -->
2915 <!-- <math>data</math> -->
2919 pre-save transform: <noinclude> in subst (bug 3298)
2929 pre-save transform: <onlyinclude> in subst (bug 3298)
2941 {{<includeonly>subst:</includeonly>Includes}}
2945 Template:SafeSubstTest
2947 {{<includeonly>safesubst:</includeonly>Includes}}
2951 bug 22297: safesubst: works during PST
2955 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
2961 bug 22297: safesubst: works during normal parse
2970 subst: does not work during normal parse
2974 <p>{{subst:Includes}}
2979 pre-save transform: context links ("pipe trick")
2983 [[Article (context)|]]
2986 [[Bar:Article (context)|]]
2987 [[:Bar:Article (context)|]]
2989 [[|Article (context)]]
2993 [[Article (context)|Article]]
2994 [[Bar:Article|Article]]
2995 [[:Bar:Article|Article]]
2996 [[Bar:Article (context)|Article]]
2997 [[:Bar:Article (context)|Article]]
2999 [[Article (context)]]
3000 [[Bar:X (Y) Z|X (Y) Z]]
3001 [[:Bar:X (Y) Z|X (Y) Z]]
3005 pre-save transform: context links ("pipe trick") with interwiki prefix
3009 [[interwiki:Article|]]
3010 [[:interwiki:Article|]]
3011 [[interwiki:Bar:Article|]]
3012 [[:interwiki:Bar:Article|]]
3014 [[interwiki:Article|Article]]
3015 [[:interwiki:Article|Article]]
3016 [[interwiki:Bar:Article|Bar:Article]]
3017 [[:interwiki:Bar:Article|Bar:Article]]
3021 pre-save transform: context links ("pipe trick") with parens in title
3023 pst title=[[Somearticle (context)]]
3027 [[Article (context)|Article]]
3031 pre-save transform: context links ("pipe trick") with comma in title
3033 pst title=[[Someplace, Somewhere]]
3036 [[Otherplace, Elsewhere|]]
3037 [[Otherplace, Elsewhere, Anywhere|]]
3039 [[Otherplace, Somewhere|Otherplace]]
3040 [[Otherplace, Elsewhere|Otherplace]]
3041 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
3045 pre-save transform: context links ("pipe trick") with parens and comma
3047 pst title=[[Someplace (IGNORED), Somewhere]]
3050 [[Otherplace (place), Elsewhere|]]
3052 [[Otherplace, Somewhere|Otherplace]]
3053 [[Otherplace (place), Elsewhere|Otherplace]]
3057 pre-save transform: context links ("pipe trick") with comma and parens
3059 pst title=[[Who, me? (context)]]
3062 [[Me, Myself, and I (1937 song)|]]
3064 [[Yes, you. (context)|Yes, you.]]
3065 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
3069 pre-save transform: context links ("pipe trick") with namespace
3071 pst title=[[Ns:Somearticle]]
3075 [[Ns:Article|Article]]
3079 pre-save transform: context links ("pipe trick") with namespace and parens
3081 pst title=[[Ns:Somearticle (context)]]
3085 [[Ns:Article (context)|Article]]
3089 pre-save transform: context links ("pipe trick") with namespace and comma
3091 pst title=[[Ns:Somearticle, Context, Whatever]]
3095 [[Ns:Article, Context, Whatever|Article]]
3099 pre-save transform: context links ("pipe trick") with namespace, comma and parens
3101 pst title=[[Ns:Somearticle, Context (context)]]
3105 [[Ns:Article (context)|Article]]
3109 pre-save transform: context links ("pipe trick") with namespace, parens and comma
3111 pst title=[[Ns:Somearticle (IGNORED), Context]]
3115 [[Ns:Article, Context|Article]]
3120 ### Message transform tests
3123 message transform: magic variables
3133 message transform: should not transform wiki markup
3143 message transform: <noinclude> in transcluded template (bug 4926)
3153 message transform: <onlyinclude> in transcluded template (bug 4926)
3163 {{#special:}} page name, known
3167 {{#special:Recentchanges}}
3169 Special:RecentChanges
3173 {{#special:}} page name with subpage, known
3177 {{#special:Recentchanges/param}}
3179 Special:RecentChanges/param
3183 {{#special:}} page name, unknown
3187 {{#special:foobarnonexistent}}
3189 No such special page
3198 [[Image:foobar.jpg]]
3200 <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>
3207 [[Image:foobar.jpg|right]]
3209 <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>
3214 Simple image (using File: namespace, now canonical)
3218 <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>
3225 [[Image:foobar.jpg|right|Caption text]]
3227 <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>
3232 Image with link parameter, wiki target
3234 [[Image:foobar.jpg|link=Target page]]
3236 <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>
3241 Image with link parameter, URL target
3243 [[Image:foobar.jpg|link=http://example.com/]]
3245 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
3250 Image with empty link parameter
3252 [[Image:foobar.jpg|link=]]
3254 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
3259 Image with link parameter (wiki target) and unnamed parameter
3261 [[Image:foobar.jpg|link=Target page|Title]]
3263 <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>
3268 Image with link parameter (URL target) and unnamed parameter
3270 [[Image:foobar.jpg|link=http://example.com/|Title]]
3272 <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>
3279 Image with frame and link
3281 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
3283 <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>
3288 Image with frame and link and explicit alt
3290 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
3292 <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>
3297 Image with wiki markup in implicit alt
3299 [[Image:Foobar.jpg|testing '''bold''' in alt]]
3301 <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>
3306 Image with wiki markup in explicit alt
3308 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
3310 <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>
3315 Link to image page- image page normally doesn't exists, hence edit link
3316 Add test with existing image page
3317 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
3321 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
3326 bug 18784 Link to non-existent image page with caption should use caption as link text
3328 [[:Image:test|caption]]
3330 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
3335 Frameless image caption with a free URL
3337 [[Image:foobar.jpg|http://example.com]]
3339 <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>
3344 Thumbnail image caption with a free URL
3346 [[Image:foobar.jpg|thumb|http://example.com]]
3348 <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>
3353 Thumbnail image caption with a free URL and explicit alt
3355 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
3357 <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>
3362 BUG 1887: A ISBN with a thumbnail
3364 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
3366 <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>
3371 BUG 1887: A RFC with a thumbnail
3373 [[Image:foobar.jpg|thumb|This is RFC 12354]]
3375 <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>
3380 BUG 1887: A mailto link with a thumbnail
3382 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
3384 <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>
3389 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
3390 so math is not stripped and turns up as escaped <math> tags.
3392 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
3394 <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>
3399 BUG 1887, part 2: A <math> with a thumbnail- math enabled
3403 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
3405 <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>
3409 # Pending resolution to bug 368
3411 BUG 648: Frameless image caption with a link
3413 [[Image:foobar.jpg|text with a [[link]] in it]]
3415 <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>
3420 BUG 648: Frameless image caption with a link (suffix)
3422 [[Image:foobar.jpg|text with a [[link]]foo in it]]
3424 <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>
3429 BUG 648: Frameless image caption with an interwiki link
3431 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
3433 <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>
3438 BUG 648: Frameless image caption with a piped interwiki link
3440 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
3442 <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>
3447 Escape HTML special chars in image alt text
3449 [[Image:foobar.jpg|& < > "]]
3451 <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>
3456 BUG 499: Alt text should have Ӓ, not &1234;
3458 [[Image:foobar.jpg|♀]]
3460 <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>
3465 Broken image caption with link
3467 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
3469 <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.
3474 Image caption containing another image
3476 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
3478 <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>
3483 Image caption containing a newline
3485 [[Image:Foobar.jpg|This
3488 <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>
3494 Bug 3090: External links other than http: in image captions
3496 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
3498 <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>
3507 Subpage test/subpage
3515 subpage title=[[Subpage test]]
3519 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
3524 Subpage noslash link
3526 subpage title=[[Subpage test]]
3530 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
3539 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
3544 BUG 561: {{/Subpage}}
3546 subpage title=[[Page]]
3550 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
3558 Category:MediaWiki User's Guide
3566 [[:Category:MediaWiki User's Guide]]
3568 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
3577 [[Category:MediaWiki User's Guide]]
3579 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
3583 PAGESINCATEGORY invalid title fatal (r33546 fix)
3585 {{PAGESINCATEGORY:<bogus>}}
3592 ### Inter-language links
3595 Inter-language links
3601 [[zh:食品]]
3603 es:Alimento fr:Nourriture zh:食品
3610 Basic section headings
3617 ===Smaller headline===
3620 <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>
3623 <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>
3626 <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>
3632 Section headings with TOC
3635 === Subheadline 1 ===
3636 ===== Skipping a level =====
3637 ====== Skipping a level ======
3641 ===Another headline===
3643 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3645 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
3647 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
3649 <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>
3651 <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>
3658 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
3660 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
3664 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3665 <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>
3666 <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>
3667 <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>
3668 <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>
3669 <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>
3672 <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>
3676 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
3678 Handling of sections up to level 6 and beyond
3681 == Level 2 Heading==
3682 === Level 3 Heading===
3683 ==== Level 4 Heading====
3684 ===== Level 5 Heading=====
3685 ====== Level 6 Heading======
3686 ======= Level 7 Heading=======
3687 ======== Level 8 Heading========
3688 ========= Level 9 Heading=========
3689 ========== Level 10 Heading==========
3691 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3693 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
3695 <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>
3697 <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>
3699 <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>
3701 <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>
3703 <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>
3704 <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>
3705 <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>
3706 <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>
3707 <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>
3719 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3720 <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>
3721 <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>
3722 <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>
3723 <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>
3724 <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>
3725 <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>
3726 <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>
3727 <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>
3728 <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>
3729 <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>
3734 TOC regression (bug 9764)
3738 ==== title 1.1.1 ====
3743 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3745 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3747 <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>
3749 <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>
3752 <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>
3755 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
3757 <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>
3761 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3762 <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>
3763 <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>
3764 <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>
3765 <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>
3766 <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>
3767 <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>
3772 TOC with wgMaxTocLevel=3 (bug 6204)
3778 ==== title 1.1.1 ====
3783 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3785 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3787 <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>
3788 <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>
3791 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
3793 <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>
3797 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3798 <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>
3799 <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>
3800 <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>
3801 <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>
3802 <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>
3803 <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>
3808 Resolving duplicate section names
3813 <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>
3814 <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>
3819 Resolving duplicate section names with differing case (bug 10721)
3824 <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>
3825 <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>
3837 Template with sections, __NOTOC__
3844 <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>
3845 <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>
3846 <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>
3847 <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>
3852 __NOEDITSECTION__ keyword
3858 <h2> <span class="mw-headline" id="Section_1">Section 1</span></h2>
3859 <h2> <span class="mw-headline" id="Section_2">Section 2</span></h2>
3864 Link inside a section heading
3866 ==Section with a [[Main Page|link]] in it==
3868 <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>
3873 TOC regression (bug 12077)
3880 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3882 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3884 <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>
3887 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
3889 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3890 <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>
3891 <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>
3892 <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>
3897 BUG 1219 URL next to image (good)
3899 http://example.com [[Image:foobar.jpg]]
3901 <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>
3906 BUG 1219 URL next to image (broken)
3908 http://example.com[[Image:foobar.jpg]]
3910 <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>
3915 Bug 1186 news: in the middle of text
3917 http://en.wikinews.org/wiki/Wikinews:Workplace
3919 <p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class="external free" rel="nofollow">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
3925 Namespaced link must have a title
3934 Namespaced link must have a title (bad fragment version)
3936 [[Project:#fragment]]
3938 <p>[[Project:#fragment]]
3944 div with no attributes
3946 <div>HTML rocks</div>
3948 <div>HTML rocks</div>
3953 div with double-quoted attribute
3955 <div id="rock">HTML rocks</div>
3957 <div id="rock">HTML rocks</div>
3962 div with single-quoted attribute
3964 <div id='rock'>HTML rocks</div>
3966 <div id="rock">HTML rocks</div>
3971 div with unquoted attribute
3973 <div id=rock>HTML rocks</div>
3975 <div id="rock">HTML rocks</div>
3980 div with illegal double attributes
3982 <div align="center" align="right">HTML rocks</div>
3984 <div align="right">HTML rocks</div>
3989 HTML multiple attributes correction
3991 <p class="error" class="awesome">Awesome!</p>
3993 <p class="awesome">Awesome!</p>
3998 Table multiple attributes correction
4001 !+ class="error" class="awesome"| status
4006 <th class="awesome"> status
4014 <DIV ALIGN="center">HTML ROCKS</DIV>
4016 <div align="center">HTML ROCKS</div>
4022 text with amp in the middle of nowhere
4026 <p>Remember AT&T?
4031 text with character entity: eacute
4033 I always thought é was a cute letter.
4035 <p>I always thought é was a cute letter.
4040 text with undefined character entity: xacute
4042 I always thought &xacute; was a cute letter.
4044 <p>I always thought &xacute; was a cute letter.
4056 [[Media:Foobar.jpg]]
4058 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
4063 Media link with text
4065 [[Media:Foobar.jpg|A neat file to look at]]
4067 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
4071 # FIXME: this is still bad HTML tag nesting
4073 Media link with nasty text
4074 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
4076 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
4078 <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>
4083 Media link to nonexistent file (bug 1702)
4085 [[Media:No such.jpg]]
4087 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
4092 Image link to nonexistent file (bug 1850 - good)
4094 [[Image:No such.jpg]]
4096 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
4101 :Image link to nonexistent file (bug 1850 - bad)
4103 [[:Image:No such.jpg]]
4105 <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>
4112 Character reference normalization in link text (bug 1938)
4114 [[Main Page|this&that]]
4116 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
4123 Test for unicode normalization
4125 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
4129 (bug 19451) Links should refer to the normalized form.
4137 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4138 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4139 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4140 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4141 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
4146 Empty attribute crash test (bug 2067)
4148 <font color="">foo</font>
4150 <p><font color="">foo</font>
4155 Empty attribute crash test single-quotes (bug 2067)
4157 <font color=''>foo</font>
4159 <p><font color="">foo</font>
4164 Attribute test: equals, then nothing
4166 <font color=>foo</font>
4173 Attribute test: unquoted value
4175 <font color=x>foo</font>
4177 <p><font color="x">foo</font>
4182 Attribute test: unquoted but illegal value (hash)
4184 <font color=#x>foo</font>
4186 <p><font color="#x">foo</font>
4191 Attribute test: no value
4193 <font color>foo</font>
4195 <p><font color="color">foo</font>
4200 Bug 2095: link with three closing brackets
4204 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
4209 Bug 2095: link with pipe and three closing brackets
4213 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
4218 Bug 2095: link with pipe and three closing brackets, version 2
4220 [[Main Page|[http://example.com/]]]
4222 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
4232 Template:Dangerous attribute
4234 " onmouseover="alert(document.cookie)
4238 Template:Dangerous style attribute
4240 border-size: expression(alert(document.cookie))
4246 <div style="float: right; {{{1}}}">Magic div</div>
4250 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
4252 <div title="{{test}}"></div>
4254 <div title="This is a test template"></div>
4259 Bug 2304: HTML attribute safety (dangerous template; 2309)
4261 <div title="{{dangerous attribute}}"></div>
4263 <div title=""></div>
4268 Bug 2304: HTML attribute safety (dangerous style template; 2309)
4270 <div style="{{dangerous style attribute}}"></div>
4272 <div style="/* insecure input */"></div>
4277 Bug 2304: HTML attribute safety (safe parameter; 2309)
4279 {{div style|width: 200px}}
4281 <div style="float: right; width: 200px">Magic div</div>
4286 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
4288 {{div style|width: expression(alert(document.cookie))}}
4290 <div style="/* insecure input */">Magic div</div>
4295 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
4297 {{div style|"><script>alert(document.cookie)</script>}}
4299 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
4304 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
4306 {{div style|" ><script>alert(document.cookie)</script>}}
4308 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
4313 Bug 2304: HTML attribute safety (link)
4315 <div title="[[Main Page]]"></div>
4317 <div title="[[Main Page]]"></div>
4322 Bug 2304: HTML attribute safety (italics)
4324 <div title="''foobar''"></div>
4326 <div title="''foobar''"></div>
4331 Bug 2304: HTML attribute safety (bold)
4333 <div title="'''foobar'''"></div>
4335 <div title="'''foobar'''"></div>
4341 Bug 2304: HTML attribute safety (ISBN)
4343 <div title="ISBN 1234567890"></div>
4345 <div title="ISBN 1234567890"></div>
4350 Bug 2304: HTML attribute safety (RFC)
4352 <div title="RFC 1234"></div>
4354 <div title="RFC 1234"></div>
4359 Bug 2304: HTML attribute safety (PMID)
4361 <div title="PMID 1234567890"></div>
4363 <div title="PMID 1234567890"></div>
4368 Bug 2304: HTML attribute safety (web link)
4370 <div title="http://example.com/"></div>
4372 <div title="http://example.com/"></div>
4377 Bug 2304: HTML attribute safety (named web link)
4379 <div title="[http://example.com/ link]"></div>
4381 <div title="[http://example.com/ link]"></div>
4386 Bug 3244: HTML attribute safety (extension; safe)
4388 <div style="<nowiki>background:blue</nowiki>"></div>
4390 <div style="background:blue"></div>
4395 Bug 3244: HTML attribute safety (extension; unsafe)
4397 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
4399 <div style="/* insecure input */"></div>
4404 Math section safety when disabled
4406 <math><script>alert(document.cookies);</script></math>
4408 <p><math><script>alert(document.cookies);</script></math>
4412 # More MSIE fun discovered by Tom Gilder
4415 MSIE CSS safety test: spurious slash
4417 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
4419 <div style="/* insecure input */">evil</div>
4424 MSIE CSS safety test: hex code
4426 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
4428 <div style="/* insecure input */">evil</div>
4433 MSIE CSS safety test: comment in url
4435 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
4437 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
4442 MSIE CSS safety test: comment in expression
4444 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
4446 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
4452 Table attribute legitimate extension
4455 !+ style="<nowiki>color:blue</nowiki>"| status
4460 <th style="color:blue"> status
4466 Table attribute safety
4469 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
4474 <th style="/* insecure input */"> status
4480 CSS line continuation 1
4482 <div style="background-image: u\ rl(test.jpg);"></div>
4484 <div style="/* insecure input */"></div>
4489 CSS line continuation 2
4491 <div style="background-image: u\ rl(test.jpg); "></div>
4493 <div style="/* insecure input */"></div>
4504 Expansion of multi-line templates in attribute values (bug 6255)
4506 <div style="background: {{identity|#00FF00}}">-</div>
4508 <div style="background: #00FF00">-</div>
4514 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
4516 <div style="background:
4519 <div style="background: #00FF00">-</div>
4524 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
4526 <div style="background: #00FF00">-</div>
4528 <div style="background: #00FF00">-</div>
4533 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
4536 Parser hook: empty input
4549 Parser hook: empty input using terminated empty elements
4562 Parser hook: empty input using terminated empty elements (space before)
4575 Parser hook: basic input
4589 Parser hook: case insensitive
4603 Parser hook: case insensitive, redux
4616 Parser hook: nested tags
4620 <tag><tag></tag></tag>
4631 Parser hook: basic arguments
4633 <tag width=200 height = "100" depth = '50' square></tag>
4652 Parser hook: argument containing a forward slash (bug 5344)
4654 <tag filename='/tmp/bla'></tag>
4660 string(8) "/tmp/bla"
4667 Parser hook: empty input using terminated empty elements (bug 2374)
4681 # </tag> should be output literally since there is no matching tag that begins it
4683 Parser hook: basic arguments using terminated empty elements (bug 2374)
4685 <tag width=200 height = "100" depth = '50' square/>
4708 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
4712 Parser hook: static parser hook not inside a comment
4714 <statictag>hello, world</statictag>
4715 <statictag action=flush/>
4723 Parser hook: static parser hook inside a comment
4725 <!-- <statictag>hello, world</statictag> -->
4726 <statictag action=flush/>
4732 # Nested template calls; this case was broken by Parser.php rev 1.506,
4736 Template:One-parameter
4738 (My parameter is: {{{1}}})
4742 Template:Map-one-parameter
4748 Nested template calls
4750 {{Map-one-parameter|One-parameter|param}}
4752 <p>(My parameter is: param)
4761 Sanitizer: Closing of open tags
4763 <s></s><table></table>
4765 <s></s><table></table>
4770 Sanitizer: Closing of open but not closed tags
4779 Sanitizer: Closing of closed but not open tags
4788 Sanitizer: Closing of closed but not open table tags
4790 Table not started</td></tr></table>
4792 <p>Table not started</td></tr></table>
4797 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
4799 <span id="æ: v">byte</span>[[#æ: v|backlink]]
4801 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
4806 Sanitizer: Validating the contents of the id attribute (bug 4515)
4812 Something, but definitely not <br id="9" />...
4816 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
4820 <br id="foo" /><br id="foo" />
4822 Something need to be done. foo-2 ?
4826 Language converter: output gets cut off unexpectedly (bug 5757)
4830 this bit is safe: }-
4832 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
4834 then we get cut off here: }-
4836 all additional text is vanished
4838 <p>this bit is safe: }-
4839 </p><p>but if we add a conversion instance: xxx
4840 </p><p>then we get cut off here: }-
4841 </p><p>all additional text is vanished
4846 Self closed html pairs (bug 5487)
4849 <center><font id="bug" />Centered text</center>
4850 <div><font id="bug2" />In div text</div>
4852 <center><font id="bug" />Centered text</center>
4853 <div><font id="bug2" />In div text</div>
4862 Punctuation: nbsp before exclamation
4866 <p>C'est grave !
4871 Punctuation: CSS !important (bug 11874)
4873 <div style="width:50% !important">important</div>
4875 <div style="width:50% !important">important</div>
4880 Punctuation: CSS ! important (bug 11874; with space after)
4882 <div style="width:50% ! important">important</div>
4884 <div style="width:50% ! important">important</div>
4890 HTML bullet list, closed tags (bug 5497)
4905 HTML bullet list, unclosed tags (bug 5497)
4922 HTML ordered list, closed tags (bug 5497)
4937 HTML ordered list, unclosed tags (bug 5497)
4954 HTML nested bullet list, closed tags (bug 5497)
4979 HTML nested bullet list, open tags (bug 5497)
5004 HTML nested ordered list, closed tags (bug 5497)
5029 HTML nested ordered list, open tags (bug 5497)
5054 HTML ordered list item with parameters oddity
5056 <ol><li id="fragment">One</li></ol>
5058 <ol><li id="fragment">One</li></ol>
5063 bug 5918: autonumbering
5065 [http://first/] [http://second] [ftp://ftp]
5069 [mailto:enclosed@mail.tld With target]
5071 [mailto:enclosed@mail.tld]
5073 mailto:inline@mail.tld
5075 <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>
5076 </p><p><a href="ftp://inlineftp" class="external free" rel="nofollow">ftp://inlineftp</a>
5077 </p><p><a href="mailto:enclosed@mail.tld" class="external text" rel="nofollow">With target</a>
5078 </p><p><a href="mailto:enclosed@mail.tld" class="external autonumber" rel="nofollow">[4]</a>
5079 </p><p><a href="mailto:inline@mail.tld" class="external free" rel="nofollow">mailto:inline@mail.tld</a>
5085 # Security and HTML correctness
5086 # From Nick Jenkins' fuzz testing
5090 Fuzz testing: Parser13
5105 Fuzz testing: Parser14
5110 <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>
5111 http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
5113 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
5115 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
5120 Fuzz testing: Parser14-table
5125 <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>
5126 <table style="__TOC__">
5132 # Known to produce bogus xml (extra </td>)
5134 Fuzz testing: Parser16
5143 <th>https://</th><th></th><th></th><th>
5151 Fuzz testing: Parser21
5154 ! irc://{{ftp://a" onmouseover="alert('hello world');"
5159 <th> <a href="irc://{{ftp://a" class="external free" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
5168 Fuzz testing: Parser22
5170 http://===r:::https://b
5174 <p><a href="http://===r:::https://b" class="external free" rel="nofollow">http://===r:::https://b</a>
5182 # Known to produce bad XML for now
5184 Fuzz testing: Parser24
5191 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
5192 <br style="onmouseover='alert(document.cookie);' " />
5194 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
5199 <u class="|">}}}} >
5200 <br style="onmouseover='alert(document.cookie);'" />
5202 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
5211 # Note: the current result listed for this is not what the original one was,
5212 # but the original bug was JavaScript injection, which is fixed in any case.
5213 # It's not clear that the original result listed was any more correct than the
5214 # current one. Original result:
5217 # <li class="||">
5218 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
5220 Fuzz testing: Parser25 (bug 6055)
5226 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
5228 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
5233 Fuzz testing: URL adjacent extension (with space, clean)
5236 http://example.com <nowiki>junk</nowiki>
5238 <p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a> junk
5243 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
5246 http://example.com<nowiki>junk</nowiki>
5248 <p><a href="http://example.com" class="external free" rel="nofollow">http://example.com</a>junk
5253 Fuzz testing: URL adjacent extension (no space, dirty; pre)
5256 http://example.com<pre>junk</pre>
5258 <a href="http://example.com" class="external free" rel="nofollow">http://example.com</a><pre>junk</pre>
5263 Fuzz testing: image with bogus manual thumbnail
5265 [[Image:foobar.jpg|thumbnail= ]]
5267 <div class="thumb tright"><div class="thumbinner" style="width:1943px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
5272 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
5274 <pre dir=" "></pre>
5276 <pre dir=" "></pre>
5281 Parsing optional HTML elements (Bug 6171)
5286 <td> Some tabular data</td>
5287 <td> More tabular data ...
5288 <td> And yet som tabular data</td>
5294 <td> Some tabular data</td>
5295 <td> More tabular data ...
5296 </td><td> And yet som tabular data</td>
5303 Correct handling of <td>, <tr> (Bug 6171)
5308 <td> Some tabular data</td>
5309 <td> More tabular data ...</td>
5310 <td> And yet som tabular data</td>
5316 <td> Some tabular data</td>
5317 <td> More tabular data ...</td>
5318 <td> And yet som tabular data</td>
5326 Parsing crashing regression (fr:JavaScript)
5330 <p></body></x>
5335 Inline wiki vs wiki block nesting
5341 <p><b>Bold paragraph</b>
5342 </p><p>New wiki paragraph
5347 Inline HTML vs wiki block nesting
5355 <p><b>Bold paragraph</b>
5356 </p><p>New wiki paragraph
5360 # Original result was this:
5361 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
5363 # While that might be marginally more intuitive, maybe, the six-apostrophe
5364 # construct is clearly pathological and the result stated here (which is what
5365 # the parser actually does) is about as reasonable as anything.
5367 Mixing markup for italics and bold
5370 '''bold''''''bold''bolditalics'''''
5372 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
5380 Article for special page transclusion test
5384 Special page transclusion
5387 {{Special:Prefixindex/Xyzzyx}}
5391 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
5396 Special page transclusion twice (bug 5021)
5399 {{Special:Prefixindex/Xyzzyx}}
5400 {{Special:Prefixindex/Xyzzyx}}
5404 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
5407 <table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
5412 Transclusion of default MediaWiki message
5414 {{MediaWiki:Mainpage}}
5421 Transclusion of nonexistent MediaWiki message
5423 {{MediaWiki:Mainpagexxx}}
5425 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
5430 Transclusion of MediaWiki message with underscore
5432 {{MediaWiki:history_short}}
5439 Transclusion of MediaWiki message with space
5441 {{MediaWiki:history short}}
5448 Invalid header with following text
5458 Section extraction test (section 0)
5478 Section extraction test (section 1)
5500 Section extraction test (section 2)
5521 Section extraction test (section 3)
5541 Section extraction test (section 4)
5565 Section extraction test (section 5)
5585 Section extraction test (section 6)
5606 Section extraction test (section 7)
5626 Section extraction test (section 8)
5646 Section extraction test (section 9)
5667 Section extraction test (section 10)
5687 Section extraction test (nonexistent section 11)
5706 Section extraction test with bogus heading (section 1)
5711 ==bogus== not a legal section
5715 ==bogus== not a legal section
5719 Section extraction test with bogus heading (section 2)
5724 ==bogus== not a legal section
5731 Section extraction test with comment after heading (section 1)
5743 Section extraction test with comment after heading (section 2)
5755 Section extraction test with bogus <nowiki> heading (section 1)
5760 ==bogus== <nowiki>not a legal section</nowiki>
5764 ==bogus== <nowiki>not a legal section</nowiki>
5768 Section extraction test with bogus <nowiki> heading (section 2)
5773 ==bogus== <nowiki>not a legal section</nowiki>
5780 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
5781 # instead of respecting commented sections
5783 Section extraction prefixed by comment (section 1)
5794 Section extraction prefixed by comment (section 2)
5805 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
5806 # instead of respecting HTML-style headings
5808 Section extraction, mixed wiki and html (section 1)
5824 Section extraction, mixed wiki and html (section 2)
5840 # Formerly testing for bug 3342
5842 Section extraction, heading surrounded by <noinclude>
5846 <noinclude>==unmarked==</noinclude>
5854 Section replacement test (section 0)
5885 Section replacement test (section 1)
5914 Section replacement test (section 2)
5944 Section replacement test (section 3)
5975 Section replacement test (section 4)
6002 Section replacement test (section 5)
6033 Section replacement test (section 6)
6063 Section replacement test (section 7)
6094 Section replacement test (section 8)
6125 Section replacement test (section 9)
6154 Section replacement test (section 10)
6184 Section replacement test with initial whitespace (bug 13728)
6188 Preformatted initial line
6192 Preformatted initial line
6199 Section extraction, heading followed by pre with 20 spaces (bug 6398)
6211 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
6224 Section extraction, <pre> around bogus header (bug 10309)
6241 Section replacement, <pre> around bogus header (bug 10309)
6243 noxml replace=2,"xxx"
6264 Handling of 
 in URLs
6268 <ul><li><ul><li><a href="irc://%0Aa" class="external free" rel="nofollow">irc://%0Aa</a>
6275 5 quotes, code coverage +1 line
6282 Special:Search page linking.
6286 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
6301 * {{SUBJECTPAGENAME}}
6302 * {{SUBJECTPAGENAMEE}}
6309 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
6311 <ul><li> Parser test
6312 </li><li> Parser test
6313 </li><li> Parser test
6314 </li><li> Parser_test
6315 </li><li> Parser test
6316 </li><li> Parser_test
6317 </li><li> Talk:Parser test
6318 </li><li> Talk:Parser_test
6319 </li><li> Parser test
6320 </li><li> Parser_test
6327 </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>
6331 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
6341 image4 |300px| centre
6342 image5.svg| http://///////
6347 <table class="gallery" cellspacing="0" cellpadding="0">
6349 <td><div class="gallerybox" style="width: 155px;">
6350 <div style="height: 152px;">Image1.png</div>
6351 <div class="gallerytext">
6354 <td><div class="gallerybox" style="width: 155px;">
6355 <div style="height: 152px;">Image2.gif</div>
6356 <div class="gallerytext">
6361 <td><div class="gallerybox" style="width: 155px;">
6362 <div style="height: 152px;">Image3</div>
6363 <div class="gallerytext">
6366 <td><div class="gallerybox" style="width: 155px;">
6367 <div style="height: 152px;">Image4</div>
6368 <div class="gallerytext">
6375 <td><div class="gallerybox" style="width: 155px;">
6376 <div style="height: 152px;">Image5.svg</div>
6377 <div class="gallerytext">
6378 <p><a href="http://///////" class="external free" rel="nofollow">http://///////</a>
6382 <td><div class="gallerybox" style="width: 155px;">
6383 <div style="height: 152px;">* image6</div>
6384 <div class="gallerytext">
6393 Gallery (with options)
6395 <gallery widths='60px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
6396 File:Nonexistant.jpg|caption
6397 File:Nonexistant.jpg
6398 image:foobar.jpg|some '''caption''' [[Main Page]]
6402 <table class="gallery" cellspacing="0" cellpadding="0">
6403 <caption>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></caption>
6405 <td><div class="gallerybox" style="width: 95px;">
6406 <div style="height: 52px;">Nonexistant.jpg</div>
6407 <div class="gallerytext">
6412 <td><div class="gallerybox" style="width: 95px;">
6413 <div style="height: 52px;">Nonexistant.jpg</div>
6414 <div class="gallerytext">
6419 <td><div class="gallerybox" style="width: 95px;">
6420 <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>
6421 <div class="gallerytext">
6422 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6426 <td><div class="gallerybox" style="width: 95px;">
6427 <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>
6428 <div class="gallerytext">
6437 gallery (with showfilename option)
6439 <gallery showfilename>
6440 File:Nonexistant.jpg|caption
6441 File:Nonexistant.jpg
6442 image:foobar.jpg|some '''caption''' [[Main Page]]
6446 <table class="gallery" cellspacing="0" cellpadding="0">
6448 <td><div class="gallerybox" style="width: 155px;">
6449 <div style="height: 152px;">Nonexistant.jpg</div>
6450 <div class="gallerytext">
6451 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
6456 <td><div class="gallerybox" style="width: 155px;">
6457 <div style="height: 152px;">Nonexistant.jpg</div>
6458 <div class="gallerytext">
6459 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
6463 <td><div class="gallerybox" style="width: 155px;">
6464 <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>
6465 <div class="gallerytext">
6466 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
6467 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
6471 <td><div class="gallerybox" style="width: 155px;">
6472 <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>
6473 <div class="gallerytext">
6474 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
6484 HTML Hex character encoding (spells the word "JavaScript")
6486 JavaScript
6488 <p>JavaScript
6493 __FORCETOC__ override
6505 ISBN 978-0-1234-56 789
6507 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
6512 ISBN followed by 5 spaces
6523 ISBN ISBN 1234567890
6525 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
6530 Bug 22905: <abbr> followed by ISBN followed by </a>
6532 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
6534 <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>
6543 <p>RFC <a href="http://tools.ietf.org/html/rfc1234" class="external mw-magiclink-rfc">RFC 1234</a>
6548 Double RFC with a wiki link
6552 <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>
6561 <p><a href="http://tools.ietf.org/html/rfc983" class="external mw-magiclink-rfc">RFC 983</a> 987
6566 Centre-aligned image
6568 [[Image:foobar.jpg|centre]]
6570 <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>
6577 [[Image:foobar.jpg|none]]
6579 <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>
6584 Width + Height sized image (using px) (height is ignored)
6586 [[Image:foobar.jpg|640x480px]]
6588 <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>
6593 Width-sized image (using px, no following whitespace)
6595 [[Image:foobar.jpg|640px]]
6597 <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>
6602 Width-sized image (using px, with following whitespace - test regression from r39467)
6604 [[Image:foobar.jpg|640px ]]
6606 <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>
6611 Width-sized image (using px, with preceding whitespace - test regression from r39467)
6613 [[Image:foobar.jpg| 640px]]
6615 <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>
6620 Another italics / bold test
6628 # Note the results may be incorrect, as parserTest output included this:
6629 # XML error: Mismatched tag at byte 6120:
6630 # ...<dd> </dt></dl> </dd...
6638 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
6649 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
6651 Images with the "|" character in the comment
6653 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
6655 <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>
6660 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
6662 <html><script>alert(1);</script></html>
6664 <p><html><script>alert(1);</script></html>
6669 HTML with raw HTML ($wgRawHtml==true)
6673 <html><script>alert(1);</script></html>
6675 <p><script>alert(1);</script>
6680 Parents of subpages, one level up
6682 subpage title=[[Subpage test/L1/L2/L3]]
6686 <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>
6692 Parents of subpages, one level up, not named
6694 subpage title=[[Subpage test/L1/L2/L3]]
6698 <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>
6705 Parents of subpages, two levels up
6707 subpage title=[[Subpage test/L1/L2/L3]]
6713 <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
6714 </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>
6719 Parents of subpages, two levels up, without trailing slash or name.
6721 subpage title=[[Subpage test/L1/L2/L3]]
6730 Parents of subpages, two levels up, with lots of extra trailing slashes.
6732 subpage title=[[Subpage test/L1/L2/L3]]
6736 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
6741 Definition list code coverage
6747 <dl><dt> title  </dt><dd> def
6748 </dd><dt> title </dt><dd> def
6749 </dd><dt>title</dt><dd> def
6755 Don't fall for the self-closing div
6757 <div>hello world</div/>
6759 <div>hello world</div>
6768 <p>[[:Template:Msg]]
6777 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
6781 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
6783 Always escape literal '>' in output, not just after '<'
6797 <p>This is a test template
6798 This is a test template
6810 Inclusion of !userCanEdit() content
6814 <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>
6820 Out-of-order TOC heading levels
6829 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
6831 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
6833 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
6834 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
6837 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
6839 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
6840 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
6844 </td></tr></table><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
6845 <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>
6846 <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>
6847 <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>
6848 <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>
6849 <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>
6850 <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>
6856 ISBN with a dummy number
6866 ISBN with space-delimited number
6870 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
6876 ISBN with multiple spaces, no number
6895 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
6896 </p><p>ISBN 12345678901
6902 ISBN with trailing year (bug 8110)
6904 ISBN 1-234-56789-0 - 2006
6906 ISBN 1 234 56789 0 - 2006
6908 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
6909 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
6917 {{anchorencode:foo bar©#%n}}
6919 <p>foo_bar.C2.A9.23.25n
6925 Bug 8293: Use of center tag ruins paragraph formatting
6947 ### Language variants related tests
6950 Self-link in language variants
6952 title=[[Dunav]] language=sr
6954 Both [[Dunav]] and [[Дунав]] are names for this river.
6956 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
6962 Link to pages in language variants
6966 Main Page can be written as [[Маин Паге]]
6968 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
6974 Multiple links to pages in language variants
6978 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
6980 <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>.
6986 Simple template in language variants
6992 <p>This is a test template
6998 Template with explicit namespace in language variants
7004 <p>This is a test template
7010 Basic test for template parameter in language variants
7014 {{парамтест|param=foo}}
7016 <p>This is a test template with parameter foo
7022 Simple category in language variants
7026 [[Category:МедиаWики Усер'с Гуиде]]
7028 <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>
7033 Stripping -{}- tags (language variants)
7037 Latin proverb: -{Ne nuntium necare}-
7039 <p>Latin proverb: Ne nuntium necare
7045 Prevent conversion with -{}- tags (language variants)
7047 language=sr variant=sr-ec
7049 Latinski: -{Ne nuntium necare}-
7051 <p>Латински: Ne nuntium necare
7057 Prevent conversion of text with -{}- tags (language variants)
7059 language=sr variant=sr-ec
7061 Latinski: -{Ne nuntium necare}-
7063 <p>Латински: Ne nuntium necare
7069 Prevent conversion of links with -{}- tags (language variants)
7071 language=sr variant=sr-ec
7075 <p><a href="/index.php?title=Main_Page&variant=sr-ec" title="Main Page">Main Page</a>
7081 -{}- tags within headlines (within html for parserConvert())
7083 language=sr variant=sr-ec
7087 <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>
7093 Explicit definition of language variant alternatives
7095 language=zh variant=zh-tw
7097 -{zh:China;zh-tw:Taiwan}-, not China
7099 <p>Taiwan, not China
7105 Explicit session-wise language variant mapping (A flag and - flag)
7107 language=zh variant=zh-tw
7109 Taiwan is not China.
7110 But -{A|zh:China;zh-tw:Taiwan}- is China,
7111 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
7112 and -{China}- is China.
7114 <p>Taiwan is not China.
7115 But Taiwan is Taiwan,
7116 (This should be stripped!)
7122 Explicit session-wise language variant mapping (H flag for hide)
7124 language=zh variant=zh-tw
7126 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
7129 <p>(This should be stripped!)
7135 Adding explicit conversion rule for title (T flag)
7137 language=zh variant=zh-tw showtitle
7139 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
7142 <p>Should be stripped!
7147 Testing that changing the language variant here in the tests actually works
7149 language=zh variant=zh showtitle
7151 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
7154 <p>Should be stripped!
7159 Raw output of variant escape tags (R flag)
7161 language=zh variant=zh-tw
7163 Raw: -{R|zh:China;zh-tw:Taiwan}-
7165 <p>Raw: zh:China;zh-tw:Taiwan
7170 Nested using of manual convert syntax
7172 language=zh variant=zh-hk
7174 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
7176 <p>Nested: Hello Hong Kong!
7181 Do not convert roman numbers to language variants
7183 language=sr variant=sr-ec
7187 <p>Фридрих IV је цар.
7192 Unclosed language converter markup "-{"
7203 Don't convert raw rule "-{R|=>}-" to "=>"
7220 Bug 529: Uncovered bullet
7231 Bug 529: Uncovered table already at line-start
7252 Bug 529: Uncovered bullet in parser function result
7254 * Foo {{lc:{{bullet}} }}
7263 Bug 5678: Double-parsed template argument
7265 {{lc:{{{1}}}|hello}}
7272 Bug 5678: Double-parsed template invocation
7274 {{lc:{{paramtest {{!}} param = hello }} }}
7276 <p>{{paramtest | param = hello }}
7281 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
7307 Morwen/13: Unclosed link followed by heading
7314 <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>
7319 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
7326 <h1> <span class="mw-headline" id="heading">heading</span></h1>
7331 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
7338 <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>
7353 Paragraphs inside divs (no extra line breaks)
7365 Paragraphs inside divs (extra line break on open)
7380 Paragraphs inside divs (extra line break on close)
7395 Paragraphs inside divs (extra line break on open and close)
7412 Nesting tags, paragraphs on lines which begin with <div>
7416 <div></div><strong>A
7425 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
7427 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
7431 <blockquote>Line one
7433 Line two</blockquote>
7435 <blockquote>Line one
7436 Line two</blockquote>
7441 Bug 6200: paragraphs inside blockquotes (extra line break on open)
7448 Line two</blockquote>
7453 Line two</blockquote>
7458 Bug 6200: paragraphs inside blockquotes (extra line break on close)
7462 <blockquote>Line one
7467 <blockquote>Line one
7475 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
7494 Paragraphs inside blockquotes/divs (no extra line breaks)
7496 <blockquote><div>Line one
7498 Line two</div></blockquote>
7500 <blockquote><div>Line one
7501 Line two</div></blockquote>
7506 Paragraphs inside blockquotes/divs (extra line break on open)
7511 Line two</div></blockquote>
7516 Line two</div></blockquote>
7521 Paragraphs inside blockquotes/divs (extra line break on close)
7523 <blockquote><div>Line one
7528 <blockquote><div>Line one
7536 Paragraphs inside blockquotes/divs (extra line break on open and close)
7553 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
7555 wgLinkHolderBatchSize=0
7561 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
7562 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
7563 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
7568 Free external link invading image caption
7570 [[Image:Foobar.jpg|thumb|http://x|hello]]
7572 <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>
7577 Bug 15196: localised external link numbers
7581 [http://en.wikipedia.org/]
7583 <p><a href="http://en.wikipedia.org/" class="external autonumber" rel="nofollow">[۱]</a>
7588 Multibyte character in padleft
7590 {{padleft:-Hello|7|Æ}}
7597 Multibyte character in padright
7599 {{padright:Hello-|7|Æ}}
7612 <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>
7617 formatdate parser function
7619 {{#formatdate:2009-03-24}}
7621 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
7626 formatdate parser function, with default format
7628 {{#formatdate:2009-03-24|mdy}}
7630 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
7635 Linked date with autoformatting disabled
7637 wgUseDynamicDates=false
7641 <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>
7646 Spacing of numbers in formatted dates
7648 {{#formatdate:January 15}}
7650 <p><span class="mw-formatted-date" title="01-15">January 15</span>
7655 Spacing of numbers in formatted dates (linked)
7657 wgUseDynamicDates=true
7661 <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>
7674 Edit comment with link
7678 I like the [[Main Page]] a lot
7680 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
7684 Edit comment with link and link text
7688 I like the [[Main Page|best pages]] a lot
7690 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
7694 Edit comment with link and link text with suffix
7698 I like the [[Main Page|best page]]s a lot
7700 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
7704 Edit comment with section link (non-local, eg in history list)
7706 comment title=[[Main Page]]
7708 /* External links */ removed bogus entries
7710 <span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→</a>External links: </span> removed bogus entries
7714 Edit comment with section link (local, eg in diff view)
7716 comment local title=[[Main Page]]
7718 /* External links */ removed bogus entries
7720 <span class="autocomment"><a href="#External_links">→</a>External links: </span> removed bogus entries
7724 Edit comment with subpage link (bug 14080)
7728 title=[[Subpage test]]
7730 Poked at a [[/subpage]] here...
7732 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
7736 Edit comment with subpage link and link text (bug 14080)
7740 title=[[Subpage test]]
7742 Poked at a [[/subpage|neat little page]] here...
7744 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
7748 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
7751 title=[[Subpage test]]
7753 Poked at a [[/subpage]] here...
7755 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
7759 Edit comment with bare anchor link (local, as on diff)
7767 <a href="#section">#section</a>
7771 Edit comment with bare anchor link (non-local, as on history)
7778 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
7782 MediaWiki:bad image list
7784 * [[File:Bad.jpg]] except [[Nasty page]]
7788 Bad images - basic functionality
7795 Bad images - bug 16039: text after bad image disappears
7807 Verify that displaytitle works (bug #22501) no displaytitle
7811 wgAllowDisplayTitle=true
7812 wgRestrictDisplayTitle=false
7814 this is not the the title
7817 <p>this is not the the title
7822 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
7827 wgAllowDisplayTitle=true
7828 wgRestrictDisplayTitle=false
7830 this is not the the title
7831 {{DISPLAYTITLE:whatever}}
7834 <p>this is not the the title
7839 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
7844 wgAllowDisplayTitle=true
7845 wgRestrictDisplayTitle=true
7847 this is not the the title
7848 {{DISPLAYTITLE:whatever}}
7851 <p>this is not the the title
7856 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
7861 wgAllowDisplayTitle=true
7862 wgRestrictDisplayTitle=true
7864 this is not the the title
7865 {{DISPLAYTITLE:screen}}
7868 <p>this is not the the title
7873 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
7878 wgAllowDisplayTitle=false
7880 this is not the the title
7881 {{DISPLAYTITLE:screen}}
7884 <p>this is not the the title
7885 <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>
7890 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
7895 wgAllowDisplayTitle=false
7897 this is not the the title
7900 <p>this is not the the title
7905 preload: check <noinclude> and <includeonly>
7909 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
7915 preload: check <onlyinclude>
7919 Goodbye <onlyinclude>Hello world</onlyinclude>
7925 preload: can pass tags through if we want to
7929 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
7931 <includeonly>Hello world</includeonly>
7935 preload: check that it doesn't try to do tricks
7939 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
7941 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
7945 Play a bit with r67090 and bug 3158
7949 <div style="width:50% !important"> </div>
7950 <div style="width:50% !important"> </div>
7951 <div style="width:50% !important"> </div>
7952 <div style="border : solid;"> </div>
7954 <div style="width:50% !important"> </div>
7955 <div style="width:50% !important"> </div>
7956 <div style="width:50% !important"> </div>
7957 <div style="border : solid;"> </div>
7968 Try for 100% code coverage