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
25 # For testing purposes, temporary articles can created:
26 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
27 # where '/' denotes a newline.
29 # This is the standard article assumed to exist.
49 This is a simple paragraph.
51 <p>This is a simple paragraph.
71 * plain''italic''plain
72 * plain''italic''plain''italic''plain
73 * plain'''bold'''plain
74 * plain'''bold'''plain'''bold'''plain
75 * plain''italic''plain'''bold'''plain
76 * plain'''bold'''plain''italic''plain
77 * plain''italic'''bold-italic'''italic''plain
78 * plain'''bold''bold-italic''bold'''plain
79 * plain'''''bold-italic'''italic''plain
80 * plain'''''bold-italic''bold'''plain
81 * plain''italic'''bold-italic'''''plain
82 * plain'''bold''bold-italic'''''plain
83 * plain l'''italic''plain
84 * plain l''''bold''' plain
87 </li><li> plain<i>italic</i>plain
88 </li><li> plain<i>italic</i>plain<i>italic</i>plain
89 </li><li> plain<b>bold</b>plain
90 </li><li> plain<b>bold</b>plain<b>bold</b>plain
91 </li><li> plain<i>italic</i>plain<b>bold</b>plain
92 </li><li> plain<b>bold</b>plain<i>italic</i>plain
93 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
94 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
95 </li><li> plain<i><b>bold-italic</b>italic</i>plain
96 </li><li> plain<b><i>bold-italic</i>bold</b>plain
97 </li><li> plain<i>italic<b>bold-italic</b></i>plain
98 </li><li> plain<b>bold<i>bold-italic</i></b>plain
99 </li><li> plain l'<i>italic</i>plain
100 </li><li> plain l'<b>bold</b> plain
106 ### <nowiki> test cases
110 <nowiki> unordered list
112 <nowiki>* This is not an unordered list item.</nowiki>
114 <p>* This is not an unordered list item.
121 <nowiki>Lorem ipsum dolor
142 :There is not nowiki.
143 :There is <nowiki>nowiki</nowiki>.
145 #There is not nowiki.
146 #There is <nowiki>nowiki</nowiki>.
148 *There is not nowiki.
149 *There is <nowiki>nowiki</nowiki>.
151 <dl><dd>There is not nowiki.
152 </dd><dd>There is nowiki.
154 <ol><li>There is not nowiki.
155 </li><li>There is nowiki.
157 <ul><li>There is not nowiki.
158 </li><li>There is nowiki.
170 <!-- comment 1 --> asdf
206 asdf<!-- comment 1 -->jkl
216 <!-- foo --> b <!-- bar -->
230 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
236 Comment semantics and delimiters
238 <!-- --><!----><!-----><!------>
244 Comment semantics and delimiters, redux
246 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
247 -- foo -- funky huh? ... -->
253 Comment semantics and delimiters: directors cut
255 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
256 everything starting with < followed by !-- until the first -- and > we see,
257 that wouldn't be valid XML however, since in XML -- has to terminate a comment
265 Comment semantics: nesting
267 <!--<!-- no, we're not going to do anything fancy here -->-->
274 Comment semantics: unclosed comment at end
276 <!--This comment will run out to the end of the document
283 ### Preformatted text
292 And a [[Main Page|link]]
298 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
303 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
320 Regression with preformatted in <center>
334 <pre> with attributes (bug 3202)
336 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
338 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
343 <pre> with width attribute (bug 3202)
345 <pre width="8">Narrow screen goodies</pre>
347 <pre width="8">Narrow screen goodies</pre>
352 <pre> with forbidden attribute (bug 3202)
354 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
356 <pre width="8">Narrow screen goodies</pre>
361 <pre> with forbidden attribute values (bug 3202)
363 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
365 <pre width="8">Narrow screen goodies</pre>
377 <dl><dt> name </dt><dd> Definition
383 Definition list for indentation only
387 <dl><dd> Indented text
393 Definition list with no space
397 <dl><dt>name</dt><dd>Definition
403 Definition list with URL link
405 ; http://example.com/ : definition
407 <dl><dt> <a href="http://example.com/" class="external free" title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
413 Definition list with bracketed URL link
415 ;[http://www.example.com/ Example]:Something about it
417 <dl><dt><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow">Example</a></dt><dd>Something about it
423 Definition list with wikilink containing colon
425 ; [[Help:FAQ]]: The least-read page on Wikipedia
427 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit" class="new" title="Help:FAQ">Help:FAQ</a></dt><dd> The least-read page on Wikipedia
432 # At Brion's and JeLuF's insistence... :)
434 Definition list with news link containing colon
436 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
438 <dl><dt> <a href="news:alt.wikipedia.rox" class="external free" title="news:alt.wikipedia.rox" rel="nofollow">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
444 Malformed definition list with colon
446 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
448 <dl><dt> <a href="news:alt.wikipedia.rox" class="external free" title="news:alt.wikipedia.rox" rel="nofollow">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop
454 Definition lists: colon in external link text
456 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
458 <dl><dt> <a href="http://www.wikipedia2.org/" class="external text" title="http://www.wikipedia2.org/" rel="nofollow">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up
464 Definition lists: colon in HTML attribute
466 ;<b style="display: inline">bold</b>
468 <dl><dt><b style="display: inline">bold</b>
475 Definition lists: self-closed tag
477 ;one<br/>two : two-line fun
479 <dl><dt>one<br />two </dt><dd> two-line fun
489 External links: non-bracketed
491 Non-bracketed: http://example.com
493 <p>Non-bracketed: <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>
498 External links: numbered
500 Numbered: [http://example.com]
501 Numbered: [http://example.net]
502 Numbered: [http://example.org]
504 <p>Numbered: <a href="http://example.com" class="external autonumber" title="http://example.com" rel="nofollow">[1]</a>
505 Numbered: <a href="http://example.net" class="external autonumber" title="http://example.net" rel="nofollow">[2]</a>
506 Numbered: <a href="http://example.org" class="external autonumber" title="http://example.org" rel="nofollow">[3]</a>
511 External links: specified text
513 Specified text: [http://example.com link]
515 <p>Specified text: <a href="http://example.com" class="external text" title="http://example.com" rel="nofollow">link</a>
520 External links: trail
522 Linktrails should not work for external links: [http://example.com link]s
524 <p>Linktrails should not work for external links: <a href="http://example.com" class="external text" title="http://example.com" rel="nofollow">link</a>s
529 External links: dollar sign in URL
531 http://example.com/1$2345
533 <p><a href="http://example.com/1$2345" class="external free" title="http://example.com/1$2345" rel="nofollow">http://example.com/1$2345</a>
538 External links: dollar sign in URL (named)
540 [http://example.com/1$2345]
542 <p><a href="http://example.com/1$2345" class="external autonumber" title="http://example.com/1$2345" rel="nofollow">[1]</a>
547 External links: open square bracket forbidden in URL (bug 4377)
549 http://example.com/1[2345
551 <p><a href="http://example.com/1" class="external free" title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
556 External links: open square bracket forbidden in URL (named) (bug 4377)
558 [http://example.com/1[2345]
560 <p><a href="http://example.com/1" class="external text" title="http://example.com/1" rel="nofollow">[2345</a>
565 External links: nowiki in URL link text (bug 6230)
567 [http://example.com/ <nowiki>''example site''</nowiki>]
569 <p><a href="http://example.com/" class="external text" title="http://example.com/" rel="nofollow">''example site''</a>
574 External links: newline forbidden in text (bug 6230 regression check)
576 [http://example.com/ first
579 <p>[<a href="http://example.com/" class="external free" title="http://example.com/" rel="nofollow">http://example.com/</a> first
587 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
589 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
594 External image from https
596 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
598 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
603 Link to non-http image, no img tag
605 Link to non-http image, no img tag: ftp://example.com/test.jpg
607 <p>Link to non-http image, no img tag: <a href="ftp://example.com/test.jpg" class="external free" title="ftp://example.com/test.jpg" rel="nofollow">ftp://example.com/test.jpg</a>
612 External links: terminating separator
614 Terminating separator: http://example.com/thing,
616 <p>Terminating separator: <a href="http://example.com/thing" class="external free" title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
621 External links: intervening separator
623 Intervening separator: http://example.com/1,2,3
625 <p>Intervening separator: <a href="http://example.com/1,2,3" class="external free" title="http://example.com/1,2,3" rel="nofollow">http://example.com/1,2,3</a>
630 External links: old bug with URL in query
632 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
634 <p>Old bug with URL in query: <a href="http://example.com/thing?url=http://example.com" class="external text" title="http://example.com/thing?url=http://example.com" rel="nofollow">link</a>
639 External links: old URL-in-URL bug, mixed protocols
641 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
643 <p>And again with mixed protocols: <a href="ftp://example.com?url=http://example.com" class="external text" title="ftp://example.com?url=http://example.com" rel="nofollow">link</a>
648 External links: URL in text
650 URL in text: [http://example.com http://example.com]
652 <p>URL in text: <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>
657 External links: Clickable images
659 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
661 <p>ja-style clickable images: <a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a>
666 External links: raw ampersand
668 Old & use: http://x&y
670 <p>Old & use: <a href="http://x&y" class="external free" title="http://x&y" rel="nofollow">http://x&y</a>
675 External links: encoded ampersand
677 Old & use: http://x&y
679 <p>Old & use: <a href="http://x&y" class="external free" title="http://x&y" rel="nofollow">http://x&y</a>
684 External links: encoded equals (bug 6102)
686 http://example.com/?foo=bar
688 <p><a href="http://example.com/?foo=bar" class="external free" title="http://example.com/?foo=bar" rel="nofollow">http://example.com/?foo=bar</a>
693 External links: [raw ampersand]
695 Old & use: [http://x&y]
697 <p>Old & use: <a href="http://x&y" class="external autonumber" title="http://x&y" rel="nofollow">[1]</a>
702 External links: [encoded ampersand]
704 Old & use: [http://x&y]
706 <p>Old & use: <a href="http://x&y" class="external autonumber" title="http://x&y" rel="nofollow">[1]</a>
711 External links: [encoded equals] (bug 6102)
713 [http://example.com/?foo=bar]
715 <p><a href="http://example.com/?foo=bar" class="external autonumber" title="http://example.com/?foo=bar" rel="nofollow">[1]</a>
720 External links: [IDN ignored character reference in hostname; strip it right off]
722 [http://e‌xample.com/]
724 <p><a href="http://example.com/" class="external autonumber" title="http://example.com/" rel="nofollow">[1]</a>
729 External links: IDN ignored character reference in hostname; strip it right off
731 http://e‌xample.com/
733 <p><a href="http://example.com/" class="external free" title="http://example.com/" rel="nofollow">http://example.com/</a>
738 External links: www.jpeg.org (bug 554)
742 <p><a href="http://www.jpeg.org" class="external free" title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
747 External links: URL within URL (original bug 2)
749 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
751 <p><a href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" class="external autonumber" title="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp" rel="nofollow">[1]</a>
756 BUG 361: URL inside bracketed URL
758 [http://www.example.com/foo http://www.example.com/bar]
760 <p><a href="http://www.example.com/foo" class="external text" title="http://www.example.com/foo" rel="nofollow">http://www.example.com/bar</a>
765 BUG 361: URL within URL, not bracketed
767 http://www.example.com/foo?=http://www.example.com/bar
769 <p><a href="http://www.example.com/foo?=http://www.example.com/bar" class="external free" title="http://www.example.com/foo?=http://www.example.com/bar" rel="nofollow">http://www.example.com/foo?=http://www.example.com/bar</a>
774 BUG 289: ">"-token in URL-tail
776 http://www.example.com/<hello>
778 <p><a href="http://www.example.com/" class="external free" title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
783 BUG 289: literal ">"-token in URL-tail
785 http://www.example.com/<b>html</b>
787 <p><a href="http://www.example.com/" class="external free" title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><b>html</b>
792 BUG 289: ">"-token in bracketed URL
794 [http://www.example.com/<hello> stuff]
796 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
801 BUG 289: literal ">"-token in bracketed URL
803 [http://www.example.com/<b>html</b> stuff]
805 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
810 BUG 289: literal double quote at end of URL
812 http://www.example.com/"hello"
814 <p><a href="http://www.example.com/" class="external free" title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
819 BUG 289: literal double quote in bracketed URL
821 [http://www.example.com/"hello" stuff]
823 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
828 External links: invalid character
829 Fixme: the missing char seems to have gone missing
833 [http://www.example.com test]
835 <p>[<a href="http://www.example.com" class="external free" title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
840 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
842 [http://www.example.com test]
844 <p><a href="http://www.example.com" class="external text" title="http://www.example.com" rel="nofollow">test</a>
849 External links: wiki links within external link (Bug 3695)
851 [http://example.com [[wikilink]] embedded in ext link]
853 <p><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"></a><a href="/index.php?title=Wikilink&action=edit" class="new" title="Wikilink">wikilink</a><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"> embedded in ext link</a>
858 BUG 787: Links with one slash after the url protocol are invalid
862 [http:/example.com title]
865 </p><p>[http:/example.com title]
870 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
872 ''[http://example.com text'']
873 [http://example.com '''text]'''
874 ''Something [http://example.com in italic'']
875 ''Something [http://example.com mixed''''', even bold]'''
876 '''''Now [http://example.com both''''']
878 <p><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i>text</i></a>
879 <a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><b>text</b></a>
880 <i>Something </i><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i>in italic</i></a>
881 <i>Something </i><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i>mixed</i><b>, even bold</b></a>
882 <i><b>Now </b></i><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i><b>both</b></i></a>
890 http://www.example.com/?title=AT%26T
892 <p><a href="http://www.example.com/?title=AT%26T" class="external free" title="http://www.example.com/?title=AT%26T" rel="nofollow">http://www.example.com/?title=AT%26T</a>
897 Bug 4781, 5267: %26 in URL
899 http://www.example.com/?title=100%25_Bran
901 <p><a href="http://www.example.com/?title=100%25_Bran" class="external free" title="http://www.example.com/?title=100%25_Bran" rel="nofollow">http://www.example.com/?title=100%25_Bran</a>
906 Bug 4781, 5267: %28, %29 in URL
908 http://www.example.com/?title=Ben-Hur_%281959_film%29
910 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external free" title="http://www.example.com/?title=Ben-Hur_%281959_film%29" rel="nofollow">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
916 Bug 4781: %26 in autonumber URL
918 [http://www.example.com/?title=AT%26T]
920 <p><a href="http://www.example.com/?title=AT%26T" class="external autonumber" title="http://www.example.com/?title=AT%26T" rel="nofollow">[1]</a>
925 Bug 4781, 5267: %26 in autonumber URL
927 [http://www.example.com/?title=100%25_Bran]
929 <p><a href="http://www.example.com/?title=100%25_Bran" class="external autonumber" title="http://www.example.com/?title=100%25_Bran" rel="nofollow">[1]</a>
934 Bug 4781, 5267: %28, %29 in autonumber 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 autonumber" title="http://www.example.com/?title=Ben-Hur_%281959_film%29" rel="nofollow">[1]</a>
944 Bug 4781: %26 in bracketed URL
946 [http://www.example.com/?title=AT%26T link]
948 <p><a href="http://www.example.com/?title=AT%26T" class="external text" title="http://www.example.com/?title=AT%26T" rel="nofollow">link</a>
953 Bug 4781, 5267: %26 in bracketed URL
955 [http://www.example.com/?title=100%25_Bran link]
957 <p><a href="http://www.example.com/?title=100%25_Bran" class="external text" title="http://www.example.com/?title=100%25_Bran" rel="nofollow">link</a>
962 Bug 4781, 5267: %28, %29 in bracketed URL
964 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
966 <p><a href="http://www.example.com/?title=Ben-Hur_%281959_film%29" class="external text" title="http://www.example.com/?title=Ben-Hur_%281959_film%29" rel="nofollow">link</a>
971 External link containing double-single-quotes in text '' (bug 4598 sanity check)
973 Some [http://example.com/ pretty ''italics'' and stuff]!
975 <p>Some <a href="http://example.com/" class="external text" title="http://example.com/" rel="nofollow">pretty <i>italics</i> and stuff</a>!
980 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
982 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
984 <p><i>Some </i><a href="http://example.com/" class="external text" title="http://example.com/" rel="nofollow"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
989 URL-encoding in URL functions (single parameter)
991 {{localurl:Some page|amp=&}}
993 <p>/index.php?title=Some_page&amp=%26
998 URL-encoding in URL functions (multiple parameters)
1000 {{localurl:Some page|q=?&=&}}
1002 <p>/index.php?title=Some_page&q=%3F&amp=%26
1013 Normal text. '''Bold text.''' Normal text. ''Italic text.''
1015 Normal text. '''''Bold italic text.''''' Normal text.
1017 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
1018 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
1024 Unclosed and unmatched quotes
1026 '''''Bold italic text '''with bold deactivated''' in between.'''''
1028 '''''Bold italic text ''with italic deactivated'' in between.'''''
1032 ..spanning two paragraphs (should not work).'''
1034 '''Bold tag left open
1036 ''Italic tag left open
1040 <!-- Unmatching number of opening, closing tags: -->
1041 '''This year''''s election ''should'' beat '''last year''''s.
1043 ''Tom'''s car is bigger than ''Susan'''s.
1045 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
1046 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
1047 </p><p><b>Bold text..</b>
1048 </p><p>..spanning two paragraphs (should not work).
1049 </p><p><b>Bold tag left open</b>
1050 </p><p><i>Italic tag left open</i>
1052 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
1053 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
1060 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
1063 # This should not produce <table></table> as <table><tr><td></td></tr></table>
1064 # is the bare minimun required by the spec, see:
1065 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
1067 A table with no data.
1073 # A table with nothing but a caption is invalid XHTML, we might want to render
1074 # this as <p>caption</p>
1076 A table with nothing but a caption
1084 </caption><tr><td></td></tr></table>
1108 Multiplication table
1110 {| border="1" cellpadding="2"
1111 |+Multiplication table
1113 ! × !! 1 !! 2 !! 3
1131 <table border="1" cellpadding="2">
1132 <caption>Multiplication table
1135 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1139 </th><td> 1 </td><td> 2 </td><td> 3
1143 </th><td> 2 </td><td> 4 </td><td> 6
1147 </th><td> 3 </td><td> 6 </td><td> 9
1151 </th><td> 4 </td><td> 8 </td><td> 12
1155 </th><td> 5 </td><td> 10 </td><td> 15
1163 {| align=right border=1
1165 |rowspan=2| Cell 2, row 1 (and 2)
1172 <table align="right" border="1">
1175 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1176 </td><td> Cell 3, row 1
1180 </td><td> Cell 3, row 2
1191 {| bgcolor=#ABCDEF border=2
1196 |the original table again
1203 <table bgcolor="#ABCDEF" border="2">
1210 </td><td>the original table again
1216 Invalid attributes in table cell (bug 1830)
1230 # FIXME: this one has incorrect tag nesting still.
1232 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
1235 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1239 <td><a href="ftp://|x||" class="external autonumber" title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1251 Plain link, capitalized
1255 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1260 Plain link, uncapitalized
1264 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1271 [[Main Page|The Main Page]]
1273 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1282 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1289 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1291 <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>
1298 [[Main Page]]xxx, [[Main Page]]XXX
1300 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1305 Link with 3 brackets
1314 Piped link with 3 brackets
1316 [[[main page|the main page]]]
1318 <p>[[[main page|the main page]]]
1323 Link with multiple pipes
1325 [[Main Page|The|Main|Page]]
1327 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1334 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1336 <p><a href="/index.php?title=Talk:Parser_testing&action=edit" class="new" title="Talk:Parser testing">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">Meta:Disclaimers</a>
1341 Piped link to namespace
1343 [[Meta:Disclaimers|The disclaimers]]
1345 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1352 [[Usually caused by a typo (oops}]]
1354 <p>[[Usually caused by a typo (oops}]]
1359 Link containing % (not as a hex sequence)
1363 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1368 Link containing % as a single hex sequence interpreted to char
1372 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1377 Link containing % as a double hex sequence interpreted to hex sequence
1381 <p>[[7%2525 Solution]]
1386 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1387 Example for such a section: == < ==
1389 [[%23%3c]][[%23%3e]]
1391 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1396 Link containing "<#" and ">#" as a hex sequences
1398 [[%3c%23]][[%3e%23]]
1400 <p>[[%3c%23]][[%3e%23]]
1405 Link containing double-single-quotes '' (bug 4598)
1407 [[Lista d''e paise d''o munno]]
1409 <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>
1414 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1416 Some [[Link|pretty ''italics'' and stuff]]!
1418 <p>Some <a href="/index.php?title=Link&action=edit" class="new" title="Link">pretty <i>italics</i> and stuff</a>!
1423 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1425 ''Some [[Link|pretty ''italics'' and stuff]]!
1427 <p><i>Some </i><a href="/index.php?title=Link&action=edit" class="new" title="Link"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
1434 [[http://www.example.org]]
1436 <p>[<a href="http://www.example.org" class="external autonumber" title="http://www.example.org" rel="nofollow">[1]</a>]
1440 # I'm fairly sure the expected result here is wrong.
1441 # We want these to be URL links, not pseudo-pages with URLs for titles....
1442 # However the current output is also pretty screwy.
1445 # I'm changing it to match the current output--it arguably makes more
1446 # sense in the light of the test above. Old expected result was:
1447 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.org&action=edit" class="new" title="Http://www.example.org">an example URL</a>
1449 # But I think this test is bordering on "garbage in, garbage out" anyway.
1454 Piped link to URL: [[http://www.example.org|an example URL]]
1456 <p>Piped link to URL: [<a href="http://www.example.org|an" class="external text" title="http://www.example.org|an" rel="nofollow">example URL</a>]
1461 BUG 2: [[page|http://url/]] should link to page, not http://url/
1463 [[Main Page|http://url/]]
1465 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1470 BUG 337: Escaped self-links should be bold
1474 [[Bug462]] [[Bug462]]
1476 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1481 Self-link to section should not be bold
1485 [[Main Page#section]]
1487 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1498 Self-link to numeric title
1504 <p><strong class="selflink">0</strong>
1509 Link to numeric-equivalent title
1515 <p><a href="/wiki/00" title="00">00</a>
1520 <nowiki> inside a link
1522 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1524 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1529 ### Interwiki links (see maintenance/interwiki.sql)
1533 Inline interwiki link
1535 [[MeatBall:SoftSecurity]]
1537 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1542 Inline interwiki link with empty title (bug 2372)
1546 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw" title="meatball:">MeatBall:</a>
1551 Interwiki link encoding conversion (bug 1636)
1553 *[[Wikipedia:ro:Olteniţa]]
1554 *[[Wikipedia:ro:Olteniţa]]
1556 <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>
1557 </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>
1563 Interwiki link with fragment (bug 2130)
1565 [[MeatBall:SoftSecurity#foo]]
1567 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1582 Double interlanguage link
1593 Interlanguage link, with prefix links
1605 Double interlanguage link, with prefix links (bug 8897)
1632 Incorrecly removing closing slashes from correctly formed XHTML
1634 <br style="clear:both;" />
1636 <p><br style="clear:both;" />
1641 Failing to transform badly formed HTML into correct XHTML
1647 <p><br clear="left" />
1648 <br clear="right" />
1654 Horizontal ruler (should it add that extra space?)
1668 ### Block-level elements
1691 <ol><li>Numbered list
1708 ***#Number on level 4
1710 **#Number on level 3
1711 **#Number on level 3
1716 <ol><li> with numbers
1718 <ul><li> and bullets
1720 <ol><li> and numbers
1722 </li><li>bullets again
1723 <ul><li>bullet level 2
1724 <ul><li>bullet level 3
1725 <ol><li>Number on level 4
1728 </li><li>bullet level 2
1729 <ol><li>Number on level 3
1730 </li><li>Number on level 3
1733 <ol><li>number level 2
1741 List items are not parsed correctly following a <pre> block (bug 785)
1747 <ul><li> <pre>foo</pre>
1748 </li><li> <pre>bar</pre>
1759 Magic Word: {{CURRENTDAY}}
1768 Magic Word: {{CURRENTDAY2}}
1777 Magic Word: {{CURRENTDAYNAME}}
1786 Magic Word: {{CURRENTDOW}}
1795 Magic Word: {{CURRENTMONTH}}
1804 Magic Word: {{CURRENTMONTHABBREV}}
1806 {{CURRENTMONTHABBREV}}
1813 Magic Word: {{CURRENTMONTHNAME}}
1815 {{CURRENTMONTHNAME}}
1822 Magic Word: {{CURRENTMONTHNAMEGEN}}
1824 {{CURRENTMONTHNAMEGEN}}
1831 Magic Word: {{CURRENTTIME}}
1840 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1849 Magic Word: {{CURRENTYEAR}}
1858 Magic Word: {{FULLPAGENAME}}
1860 title=[[User:Ævar Arnfjörð Bjarmason]]
1864 <p>User:Ævar Arnfjörð Bjarmason
1869 Magic Word: {{FULLPAGENAMEE}}
1871 title=[[User:Ævar Arnfjörð Bjarmason]]
1875 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1880 Magic Word: {{NAMESPACE}}
1882 title=[[User:Ævar Arnfjörð Bjarmason]]
1892 Magic Word: {{NAMESPACEE}}
1894 title=[[User:Ævar Arnfjörð Bjarmason]]
1904 Magic Word: {{NUMBEROFARTICLES}}
1906 {{NUMBEROFARTICLES}}
1913 Magic Word: {{NUMBEROFFILES}}
1922 Magic Word: {{PAGENAME}}
1924 title=[[User:Ævar Arnfjörð Bjarmason]]
1929 <p>Ævar Arnfjörð Bjarmason
1934 Magic Word: {{PAGENAMEE}}
1936 title=[[User:Ævar Arnfjörð Bjarmason]]
1940 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1945 Magic Word: {{REVISIONID}}
1954 Magic Word: {{SCRIPTPATH}}
1963 Magic Word: {{SERVER}}
1967 <p><a href="http://localhost" class="external free" title="http://localhost" rel="nofollow">http://localhost</a>
1972 Magic Word: {{SERVERNAME}}
1981 Magic Word: {{SITENAME}}
1990 Namespace 1 {{ns:1}}
1999 Namespace 1 {{ns:01}}
2008 Namespace 0 {{ns:0}} (bug 4783)
2016 Namespace 0 {{ns:00}} (bug 4783)
2024 Namespace -1 {{ns:-1}}
2033 Namespace Project {{ns:User}}
2046 Magic links: internal link to RFC (bug 479)
2050 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
2055 Magic links: RFC (bug 479)
2059 <p><a href="http://tools.ietf.org/html/rfc822" class="external" title="http://tools.ietf.org/html/rfc822">RFC 822</a>
2064 Magic links: ISBN (bug 1937)
2068 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
2073 Magic links: PMID incorrectly converts space to underscore
2077 <p><a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=1234" class="external" title="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=1234">PMID 1234</a>
2086 Nonexistant template
2088 {{thistemplatedoesnotexist}}
2090 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
2097 This is a test template
2105 <p>This is a test template
2110 Template with explicit namespace
2114 <p>This is a test template
2122 This is a test template with parameter {{{param}}}
2128 {{paramtest|param=foo}}
2130 <p>This is a test template with parameter foo
2135 Template:paramtestnum
2141 Template unnamed parameter
2143 {{paramtestnum|Main Page|the main page}}
2145 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2150 Template:templatesimple
2156 Template:templateredirect
2158 #redirect [[Template:templatesimple]]
2162 Template:templateasargtestnum
2168 Template:templateasargtest
2170 {{template{{{templ}}}}}
2174 Template:templateasargtest2
2180 Template with template name as unnamed argument
2182 {{templateasargtestnum|templatesimple}}
2189 Template with template name as argument
2191 {{templateasargtest|templ=simple}}
2198 Template with template name as argument (2)
2200 {{templateasargtest2|templ=templatesimple}}
2207 Template:templateasargtestdefault
2209 {{{{{templ|templatesimple}}}}}
2219 Template with default value
2221 {{templateasargtestdefault}}
2228 Template with default value (value set)
2230 {{templateasargtestdefault|templ=templa}}
2239 {{templateredirect}}
2246 Template with argument in separate line
2248 {{ templateasargtest |
2256 Template with complex template as argument
2259 param ={{ templateasargtest |
2262 <p>This is a test template with parameter (test)
2267 Template with thumb image (with link in description)
2270 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2272 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="Image:Noimage.png">Image:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit" class="new" title="No link">link</a> <a href="/index.php?title=No_link&action=edit" class="new" title="No link">caption</a></div></div></div>
2277 Template:complextemplate
2279 {{{1}}} {{paramtest|
2280 param ={{{param}}}}}
2284 Template with complex arguments
2287 param ={{ templateasargtest |
2288 templ = simple }}|[[Template:complextemplate|link]]}}
2290 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2295 BUG 553: link with two variables in a piped link
2298 |[[{{{1}}}|{{{2}}}]]
2303 <td>[[{{{1}}}|{{{2}}}]]
2309 Magic variable as template parameter
2311 {{paramtest|param={{SITENAME}}}}
2313 <p>This is a test template with parameter MediaWiki
2320 [[{{{param}}}|link]]
2324 Template parameter as link source
2326 {{linktest|param=Main Page}}
2328 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2336 including another template, {{paramtest|param={{{arg}}}}}
2340 Template passing argument to another template
2342 {{paramtest2|arg='hmm'}}
2344 <p>including another template, This is a test template with parameter 'hmm'
2355 Template as link source
2359 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2377 Template infinite loop
2381 <p><a href="/index.php?title=Loop1&action=edit" class="new" title="Loop1">loop1</a><!-- WARNING: template loop detected -->
2386 Template from main namespace
2405 BUG 529: Template with table, not included at beginning of line
2422 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2440 BUG 41: Template parameters shown as broken links
2452 ''None'' of '''this''' should be
2454 but rather passed unmodified
2458 # hmm, fix this or just deprecate msgnw and document its behavior?
2464 {{msgnw:MSGNW test}}
2466 <p>''None'' of '''this''' should be
2468 but rather passed unmodified
2476 {{int:youhavenewmessages|lots of money|not!}}
2478 <p>You have lots of money (not!).
2485 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2489 <includeonly> and <noinclude> being included
2500 <onlyinclude>Foo</onlyinclude>bar
2504 <onlyinclude> being included
2516 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2520 <onlyinclude> and <includeonly> being included
2529 <includeonly> and <noinclude> on a page
2531 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2538 <onlyinclude> on a page
2540 <onlyinclude>Foo</onlyinclude>bar
2547 ### Pre-save transform tests
2550 pre-save transform: subst:
2556 This is a test template
2560 pre-save transform: normal template
2570 pre-save transform: nonexistant template
2574 {{thistemplatedoesnotexist}}
2576 {{thistemplatedoesnotexist}}
2581 pre-save transform: subst magic variables
2590 # This is bug 89, which I fixed. -- wtm
2592 pre-save transform: subst: templates with parameters
2596 {{subst:paramtest|param="something else"}}
2598 This is a test template with parameter "something else"
2604 <nowiki>'''not wiki'''</nowiki>
2608 pre-save transform: nowiki in subst (bug 1188)
2612 {{subst:nowikitest}}
2614 <nowiki>'''not wiki'''</nowiki>
2619 Template:commenttest
2621 This template has <!-- a comment --> in it.
2625 pre-save transform: comment in subst (bug 1936)
2629 {{subst:commenttest}}
2631 This template has <!-- a comment --> in it.
2635 pre-save transform: unclosed tag
2639 <nowiki>'''not wiki'''
2641 <nowiki>'''not wiki'''
2645 pre-save transform: mixed tag case
2649 <NOwiki>'''not wiki'''</noWIKI>
2651 <NOwiki>'''not wiki'''</noWIKI>
2655 pre-save transform: unclosed comment in <nowiki>
2659 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2661 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2667 <span onmouseover="alert('crap')">Oh no</span>
2671 (confirming safety of fix for subst bug 1936)
2673 {{Template:dangerous}}
2675 <p><span>Oh no</span>
2680 pre-save transform: comment containing gallery (bug 5024)
2684 <!-- <gallery>data</gallery> -->
2686 <!-- <gallery>data</gallery> -->
2690 pre-save transform: comment containing extension
2694 <!-- <tag>data</tag> -->
2696 <!-- <tag>data</tag> -->
2700 pre-save transform: comment containing nowiki
2704 <!-- <nowiki>data</nowiki> -->
2706 <!-- <nowiki>data</nowiki> -->
2710 pre-save transform: comment containing math
2714 <!-- <math>data</math> -->
2716 <!-- <math>data</math> -->
2720 pre-save transform: <noinclude> in subst (bug 3298)
2730 pre-save transform: <onlyinclude> in subst (bug 3298)
2740 pre-save transform: context links ("pipe trick")
2744 [[Article (context)|]]
2747 [[Bar:Article (context)|]]
2748 [[:Bar:Article (context)|]]
2750 [[|Article (context)]]
2754 [[Article (context)|Article]]
2755 [[Bar:Article|Article]]
2756 [[:Bar:Article|Article]]
2757 [[Bar:Article (context)|Article]]
2758 [[:Bar:Article (context)|Article]]
2760 [[Article (context)]]
2761 [[Bar:X (Y) Z|X (Y) Z]]
2762 [[:Bar:X (Y) Z|X (Y) Z]]
2766 pre-save transform: context links ("pipe trick") with interwiki prefix
2770 [[interwiki:Article|]]
2771 [[:interwiki:Article|]]
2772 [[interwiki:Bar:Article|]]
2773 [[:interwiki:Bar:Article|]]
2775 [[interwiki:Article|Article]]
2776 [[:interwiki:Article|Article]]
2777 [[interwiki:Bar:Article|Bar:Article]]
2778 [[:interwiki:Bar:Article|Bar:Article]]
2782 pre-save transform: context links ("pipe trick") with parens in title
2784 pst title=[[Somearticle (context)]]
2788 [[Article (context)|Article]]
2792 pre-save transform: context links ("pipe trick") with comma in title
2794 pst title=[[Someplace, Somewhere]]
2797 [[Otherplace, Elsewhere|]]
2798 [[Otherplace, Elsewhere, Anywhere|]]
2800 [[Otherplace, Somewhere|Otherplace]]
2801 [[Otherplace, Elsewhere|Otherplace]]
2802 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
2806 pre-save transform: context links ("pipe trick") with parens and comma
2808 pst title=[[Someplace (IGNORED), Somewhere]]
2811 [[Otherplace (place), Elsewhere|]]
2813 [[Otherplace, Somewhere|Otherplace]]
2814 [[Otherplace (place), Elsewhere|Otherplace]]
2818 pre-save transform: context links ("pipe trick") with comma and parens
2820 pst title=[[Who, me? (context)]]
2823 [[Me, Myself, and I (1937 song)|]]
2825 [[Yes, you. (context)|Yes, you.]]
2826 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
2830 pre-save transform: context links ("pipe trick") with namespace
2832 pst title=[[Ns:Somearticle]]
2836 [[Ns:Article|Article]]
2840 pre-save transform: context links ("pipe trick") with namespace and parens
2842 pst title=[[Ns:Somearticle (context)]]
2846 [[Ns:Article (context)|Article]]
2850 pre-save transform: context links ("pipe trick") with namespace and comma
2852 pst title=[[Ns:Somearticle, Context, Whatever]]
2856 [[Ns:Article, Context, Whatever|Article]]
2860 pre-save transform: context links ("pipe trick") with namespace, comma and parens
2862 pst title=[[Ns:Somearticle, Context (context)]]
2866 [[Ns:Article (context)|Article]]
2870 pre-save transform: context links ("pipe trick") with namespace, parens and comma
2872 pst title=[[Ns:Somearticle (IGNORED), Context]]
2876 [[Ns:Article, Context|Article]]
2881 ### Message transform tests
2884 message transform: magic variables
2894 message transform: should not transform wiki markup
2904 message transform: <noinclude> in transcluded template (bug 4926)
2914 message transform: <onlyinclude> in transcluded template (bug 4926)
2924 {{#special:}} page name, known
2928 {{#special:Recentchanges}}
2930 Special:Recentchanges
2934 {{#special:}} page name, unknown
2938 {{#special:foobarnonexistent}}
2940 No such special page
2949 [[Image:foobar.jpg]]
2951 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img alt="Image:foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" /></a>
2958 [[Image:foobar.jpg|right]]
2960 <div class="floatright"><span><a href="/wiki/Image:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" /></a></span></div>
2967 [[Image:foobar.jpg|right|Caption text]]
2969 <div class="floatright"><span><a href="/wiki/Image:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" /></a></span></div>
2974 Image with frame and link
2976 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2978 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="This is a test image Main Page"><img alt="This is a test image Main Page" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" 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>
2983 Link to image page- image page normally doesn't exists, hence edit link
2984 Add test with existing image page
2985 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2989 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2994 Frameless image caption with a free URL
2996 [[Image:foobar.jpg|http://example.com]]
2998 <p><a href="/wiki/Image: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" border="0" /></a>
3003 Thumbnail image caption with a free URL
3005 [[Image:foobar.jpg|thumb|http://example.com]]
3007 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a></div></div></div>
3012 BUG 1887: A ISBN with a thumbnail
3014 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
3016 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="ISBN 1235467890"><img alt="ISBN 1235467890" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="/index.php?title=Special:Booksources&isbn=1235467890" class="internal">ISBN 1235467890</a></div></div></div>
3021 BUG 1887: A RFC with a thumbnail
3023 [[Image:foobar.jpg|thumb|This is RFC 12354]]
3025 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="This is RFC 12354"><img alt="This is RFC 12354" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is <a href="http://tools.ietf.org/html/rfc12354" class="external" title="http://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
3030 BUG 1887: A mailto link with a thumbnail
3032 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
3034 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="Please mailto:nobody@example.com"><img alt="Please mailto:nobody@example.com" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Please <a href="mailto:nobody@example.com" class="external free" title="mailto:nobody@example.com" rel="nofollow">mailto:nobody@example.com</a></div></div></div>
3039 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
3040 so math is not stripped and turns up as escaped <math> tags.
3042 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
3044 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="<math>2+2</math>"><img alt="<math>2+2</math>" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><math>2+2</math></div></div></div>
3049 BUG 1887, part 2: A <math> with a thumbnail- math enabled
3053 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
3055 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="2 + 2"><img alt="2 + 2" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><span class="texhtml">2 + 2</span></div></div></div>
3059 # Pending resolution to bug 368
3061 BUG 648: Frameless image caption with a link
3063 [[Image:foobar.jpg|text with a [[link]] in it]]
3065 <p><a href="/wiki/Image: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" border="0" /></a>
3070 BUG 648: Frameless image caption with a link (suffix)
3072 [[Image:foobar.jpg|text with a [[link]]foo in it]]
3074 <p><a href="/wiki/Image: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" border="0" /></a>
3079 BUG 648: Frameless image caption with an interwiki link
3081 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
3083 <p><a href="/wiki/Image: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" border="0" /></a>
3088 BUG 648: Frameless image caption with a piped interwiki link
3090 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
3092 <p><a href="/wiki/Image: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" border="0" /></a>
3097 Escape HTML special chars in image alt text
3099 [[Image:foobar.jpg|& < > "]]
3101 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" /></a>
3106 BUG 499: Alt text should have Ӓ, not &1234;
3108 [[Image:foobar.jpg|♀]]
3110 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" /></a>
3115 Broken image caption with link
3117 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
3119 <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.
3124 Image caption containing another image
3126 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
3128 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="This is a caption with another Image:Icon.png inside it!"><img alt="This is a caption with another Image:Icon.png inside it!" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is a caption with another <a href="/index.php?title=Special:Upload&wpDestFile=Icon.png" class="new" title="Image:Icon.png">Image:Icon.png</a> inside it!</div></div></div>
3133 Image caption containing a newline
3135 [[Image:Foobar.jpg|This
3138 <p><a href="/wiki/Image: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" border="0" /></a>
3144 Bug 3090: External links other than http: in image captions
3146 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
3148 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="This caption has irc and Secure ext links in it."><img alt="This caption has irc and Secure ext links in it." src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This caption has <a href="irc://example.net" class="external text" title="irc://example.net" rel="nofollow">irc</a> and <a href="https://example.com" class="external text" title="https://example.com" rel="nofollow">Secure</a> ext links in it.</div></div></div>
3157 Subpage test/subpage
3165 subpage title=[[Subpage test]]
3169 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
3174 Subpage noslash link
3176 subpage title=[[Subpage test]]
3180 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
3189 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
3194 BUG 561: {{/Subpage}}
3196 subpage title=[[Page]]
3200 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
3208 Category:MediaWiki User's Guide
3216 [[:Category:MediaWiki User's Guide]]
3218 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
3227 [[Category:MediaWiki User's Guide]]
3229 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
3233 ### Inter-language links
3236 Inter-language links
3242 [[zh:食品]]
3244 es:Alimento fr:Nourriture zh:食品
3251 Basic section headings
3258 ===Smaller headline===
3261 <a name="Headline_1"></a><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"> Headline 1 </span></h2>
3264 <a name="Headline_2"></a><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">Headline 2</span></h2>
3267 <a name="Smaller_headline"></a><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">Smaller headline</span></h3>
3273 Section headings with TOC
3276 === Subheadline 1 ===
3277 ===== Skipping a level =====
3278 ====== Skipping a level ======
3282 ===Another headline===
3284 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3286 <li class="toclevel-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
3288 <li class="toclevel-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
3290 <li class="toclevel-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
3292 <li class="toclevel-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
3299 <li class="toclevel-1"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
3301 <li class="toclevel-2"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
3305 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3306 <a name="Headline_1"></a><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"> Headline 1 </span></h2>
3307 <a name="Subheadline_1"></a><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"> Subheadline 1 </span></h3>
3308 <a name="Skipping_a_level"></a><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"> Skipping a level </span></h5>
3309 <a name="Skipping_a_level_2"></a><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"> Skipping a level </span></h6>
3310 <a name="Headline_2"></a><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"> Headline 2 </span></h2>
3313 <a name="Another_headline"></a><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">Another headline</span></h3>
3317 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
3319 Handling of sections up to level 6 and beyond
3322 == Level 2 Heading==
3323 === Level 3 Heading===
3324 ==== Level 4 Heading====
3325 ===== Level 5 Heading=====
3326 ====== Level 6 Heading======
3327 ======= Level 7 Heading=======
3328 ======== Level 8 Heading========
3329 ========= Level 9 Heading=========
3330 ========== Level 10 Heading==========
3332 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3334 <li class="toclevel-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
3336 <li class="toclevel-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
3338 <li class="toclevel-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
3340 <li class="toclevel-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a>
3342 <li class="toclevel-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a>
3344 <li class="toclevel-6"><a href="#Level_6_Heading"><span class="tocnumber">1.1.1.1.1.1</span> <span class="toctext">Level 6 Heading</span></a></li>
3345 <li class="toclevel-6"><a href="#.3D_Level_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">= Level 7 Heading=</span></a></li>
3346 <li class="toclevel-6"><a href="#.3D.3D_Level_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">== Level 8 Heading==</span></a></li>
3347 <li class="toclevel-6"><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">=== Level 9 Heading===</span></a></li>
3348 <li class="toclevel-6"><a href="#.3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.5</span> <span class="toctext">==== Level 10 Heading====</span></a></li>
3360 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3361 <a name="Level_1_Heading"></a><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"> Level 1 Heading</span></h1>
3362 <a name="Level_2_Heading"></a><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"> Level 2 Heading</span></h2>
3363 <a name="Level_3_Heading"></a><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"> Level 3 Heading</span></h3>
3364 <a name="Level_4_Heading"></a><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"> Level 4 Heading</span></h4>
3365 <a name="Level_5_Heading"></a><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"> Level 5 Heading</span></h5>
3366 <a name="Level_6_Heading"></a><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"> Level 6 Heading</span></h6>
3367 <a name=".3D_Level_7_Heading.3D"></a><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">= Level 7 Heading=</span></h6>
3368 <a name=".3D.3D_Level_8_Heading.3D.3D"></a><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">== Level 8 Heading==</span></h6>
3369 <a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><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">=== Level 9 Heading===</span></h6>
3370 <a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><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">==== Level 10 Heading====</span></h6>
3375 TOC regression (bug 9764)
3379 ==== title 1.1.1 ====
3384 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3386 <li class="toclevel-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3388 <li class="toclevel-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
3390 <li class="toclevel-3"><a href="#title_1.1.1"><span class="tocnumber">1.1.1</span> <span class="toctext">title 1.1.1</span></a></li>
3393 <li class="toclevel-2"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
3396 <li class="toclevel-1"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
3398 <li class="toclevel-2"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
3402 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3403 <a name="title_1"></a><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"> title 1 </span></h2>
3404 <a name="title_1.1"></a><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"> title 1.1 </span></h3>
3405 <a name="title_1.1.1"></a><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"> title 1.1.1 </span></h4>
3406 <a name="title_1.2"></a><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"> title 1.2 </span></h3>
3407 <a name="title_2"></a><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"> title 2 </span></h2>
3408 <a name="title_2.1"></a><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"> title 2.1 </span></h3>
3413 TOC with wgMaxTocLevel=3 (bug 6204)
3419 ==== title 1.1.1 ====
3424 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3426 <li class="toclevel-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
3428 <li class="toclevel-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
3429 <li class="toclevel-2"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
3432 <li class="toclevel-1"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
3434 <li class="toclevel-2"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
3438 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3439 <a name="title_1"></a><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"> title 1 </span></h2>
3440 <a name="title_1.1"></a><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"> title 1.1 </span></h3>
3441 <a name="title_1.1.1"></a><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"> title 1.1.1 </span></h4>
3442 <a name="title_1.2"></a><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"> title 1.2 </span></h3>
3443 <a name="title_2"></a><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"> title 2 </span></h2>
3444 <a name="title_2.1"></a><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"> title 2.1 </span></h3>
3449 Resolving duplicate section names
3454 <a name="Foo_bar"></a><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"> Foo bar </span></h2>
3455 <a name="Foo_bar_2"></a><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"> Foo bar </span></h2>
3467 Template with sections, __NOTOC__
3474 <a name="Section_0"></a><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">Section 0</span></h2>
3475 <a name="Section_1"></a><h3><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 1</span></h3>
3476 <a name="Section_2"></a><h2><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 2</span></h2>
3477 <a name="Section_4"></a><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">Section 4</span></h2>
3482 __NOEDITSECTION__ keyword
3488 <a name="Section_1"></a><h2> <span class="mw-headline">Section 1</span></h2>
3489 <a name="Section_2"></a><h2> <span class="mw-headline">Section 2</span></h2>
3494 Link inside a section heading
3496 ==Section with a [[Main Page|link]] in it==
3498 <a name="Section_with_a_link_in_it"></a><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">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span></h2>
3504 BUG 1219 URL next to image (good)
3506 http://example.com [[Image:foobar.jpg]]
3508 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a> <a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img alt="Image:foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" /></a>
3513 BUG 1219 URL next to image (broken)
3515 http://example.com[[Image:foobar.jpg]]
3517 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img alt="Image:foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" /></a>
3522 Bug 1186 news: in the middle of text
3524 http://en.wikinews.org/wiki/Wikinews:Workplace
3526 <p><a href="http://en.wikinews.org/wiki/Wikinews:Workplace" class="external free" title="http://en.wikinews.org/wiki/Wikinews:Workplace" rel="nofollow">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
3532 Namespaced link must have a title
3541 Namespaced link must have a title (bad fragment version)
3543 [[Project:#fragment]]
3545 <p>[[Project:#fragment]]
3551 div with no attributes
3553 <div>HTML rocks</div>
3555 <div>HTML rocks</div>
3560 div with double-quoted attribute
3562 <div id="rock">HTML rocks</div>
3564 <div id="rock">HTML rocks</div>
3569 div with single-quoted attribute
3571 <div id='rock'>HTML rocks</div>
3573 <div id="rock">HTML rocks</div>
3578 div with unquoted attribute
3580 <div id=rock>HTML rocks</div>
3582 <div id="rock">HTML rocks</div>
3587 div with illegal double attributes
3589 <div align="center" align="right">HTML rocks</div>
3591 <div align="right">HTML rocks</div>
3596 HTML multiple attributes correction
3598 <p class="error" class="awesome">Awesome!</p>
3600 <p class="awesome">Awesome!</p>
3605 Table multiple attributes correction
3608 !+ class="error" class="awesome"| status
3613 <th class="awesome"> status
3621 <DIV ALIGN="center">HTML ROCKS</DIV>
3623 <div align="center">HTML ROCKS</div>
3629 text with amp in the middle of nowhere
3633 <p>Remember AT&T?
3638 text with character entity: eacute
3640 I always thought é was a cute letter.
3642 <p>I always thought é was a cute letter.
3647 text with undefined character entity: xacute
3649 I always thought &xacute; was a cute letter.
3651 <p>I always thought &xacute; was a cute letter.
3663 [[Media:Foobar.jpg]]
3665 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
3670 Media link with text
3672 [[Media:Foobar.jpg|A neat file to look at]]
3674 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
3678 # FIXME: this is still bad HTML tag nesting
3680 Media link with nasty text
3681 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3683 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3685 <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>
3690 Media link to nonexistent file (bug 1702)
3692 [[Media:No such.jpg]]
3694 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
3699 Image link to nonexistent file (bug 1850 - good)
3701 [[Image:No such.jpg]]
3703 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3708 :Image link to nonexistent file (bug 1850 - bad)
3710 [[:Image:No such.jpg]]
3712 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3719 Character reference normalization in link text (bug 1938)
3721 [[Main Page|this&that]]
3723 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3728 Empty attribute crash test (bug 2067)
3730 <font color="">foo</font>
3732 <p><font color="">foo</font>
3737 Empty attribute crash test single-quotes (bug 2067)
3739 <font color=''>foo</font>
3741 <p><font color="">foo</font>
3746 Attribute test: equals, then nothing
3748 <font color=>foo</font>
3755 Attribute test: unquoted value
3757 <font color=x>foo</font>
3759 <p><font color="x">foo</font>
3764 Attribute test: unquoted but illegal value (hash)
3766 <font color=#x>foo</font>
3768 <p><font color="#x">foo</font>
3773 Attribute test: no value
3775 <font color>foo</font>
3777 <p><font color="color">foo</font>
3782 Bug 2095: link with three closing brackets
3786 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3791 Bug 2095: link with pipe and three closing brackets
3795 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3800 Bug 2095: link with pipe and three closing brackets, version 2
3802 [[Main Page|[http://example.com/]]]
3804 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3814 Template:Dangerous attribute
3816 " onmouseover="alert(document.cookie)
3820 Template:Dangerous style attribute
3822 border-size: expression(alert(document.cookie))
3828 <div style="float: right; {{{1}}}">Magic div</div>
3832 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3834 <div title="{{test}}"></div>
3836 <div title="This is a test template"></div>
3841 Bug 2304: HTML attribute safety (dangerous template; 2309)
3843 <div title="{{dangerous attribute}}"></div>
3845 <div title=""></div>
3850 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3852 <div style="{{dangerous style attribute}}"></div>
3859 Bug 2304: HTML attribute safety (safe parameter; 2309)
3861 {{div style|width: 200px}}
3863 <div style="float: right; width: 200px">Magic div</div>
3868 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3870 {{div style|width: expression(alert(document.cookie))}}
3872 <div>Magic div</div>
3877 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3879 {{div style|"><script>alert(document.cookie)</script>}}
3881 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
3886 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3888 {{div style|" ><script>alert(document.cookie)</script>}}
3890 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
3895 Bug 2304: HTML attribute safety (link)
3897 <div title="[[Main Page]]"></div>
3899 <div title="[[Main Page]]"></div>
3904 Bug 2304: HTML attribute safety (italics)
3906 <div title="''foobar''"></div>
3908 <div title="''foobar''"></div>
3913 Bug 2304: HTML attribute safety (bold)
3915 <div title="'''foobar'''"></div>
3917 <div title="'''foobar'''"></div>
3923 Bug 2304: HTML attribute safety (ISBN)
3925 <div title="ISBN 1234567890"></div>
3927 <div title="ISBN 1234567890"></div>
3932 Bug 2304: HTML attribute safety (RFC)
3934 <div title="RFC 1234"></div>
3936 <div title="RFC 1234"></div>
3941 Bug 2304: HTML attribute safety (PMID)
3943 <div title="PMID 1234567890"></div>
3945 <div title="PMID 1234567890"></div>
3950 Bug 2304: HTML attribute safety (web link)
3952 <div title="http://example.com/"></div>
3954 <div title="http://example.com/"></div>
3959 Bug 2304: HTML attribute safety (named web link)
3961 <div title="[http://example.com/ link]"></div>
3963 <div title="[http://example.com/ link]"></div>
3968 Bug 3244: HTML attribute safety (extension; safe)
3970 <div style="<nowiki>background:blue</nowiki>"></div>
3972 <div style="background:blue"></div>
3977 Bug 3244: HTML attribute safety (extension; unsafe)
3979 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3986 Math section safety when disabled
3988 <math><script>alert(document.cookies);</script></math>
3990 <p><math><script>alert(document.cookies);</script></math>
3994 # More MSIE fun discovered by Tom Gilder
3997 MSIE CSS safety test: spurious slash
3999 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
4006 MSIE CSS safety test: hex code
4008 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
4015 MSIE CSS safety test: comment in url
4017 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
4019 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
4024 MSIE CSS safety test: comment in expression
4026 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
4028 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
4034 Table attribute legitimate extension
4037 !+ style="<nowiki>color:blue</nowiki>"| status
4042 <th style="color:blue"> status
4048 Table attribute safety
4051 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
4069 Expansion of multi-line templates in attribute values (bug 6255)
4071 <div style="background: {{identity|#00FF00}}">-</div>
4073 <div style="background: #00FF00">-</div>
4079 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
4081 <div style="background:
4084 <div style="background: #00FF00">-</div>
4089 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
4091 <div style="background: #00FF00">-</div>
4093 <div style="background: #00FF00">-</div>
4098 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
4101 Parser hook: empty input
4114 Parser hook: empty input using terminated empty elements
4127 Parser hook: empty input using terminated empty elements (space before)
4140 Parser hook: basic input
4154 Parser hook: case insensitive
4168 Parser hook: case insensitive, redux
4181 Parser hook: nested tags
4185 <tag><tag></tag></tag>
4196 Parser hook: basic arguments
4198 <tag width=200 height = "100" depth = '50' square></tag>
4217 Parser hook: argument containing a forward slash (bug 5344)
4219 <tag filename='/tmp/bla'></tag>
4225 string(8) "/tmp/bla"
4232 Parser hook: empty input using terminated empty elements (bug 2374)
4246 # </tag> should be output literally since there is no matching tag that begins it
4248 Parser hook: basic arguments using terminated empty elements (bug 2374)
4250 <tag width=200 height = "100" depth = '50' square/>
4273 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
4277 Parser hook: static parser hook not inside a comment
4279 <statictag>hello, world</statictag>
4280 <statictag action=flush/>
4288 Parser hook: static parser hook inside a comment
4290 <!-- <statictag>hello, world</statictag> -->
4291 <statictag action=flush/>
4297 # Nested template calls; this case was broken by Parser.php rev 1.506,
4301 Template:One-parameter
4303 (My parameter is: {{{1}}})
4307 Template:Map-one-parameter
4313 Nested template calls
4315 {{Map-one-parameter|One-parameter|param}}
4317 <p>(My parameter is: param)
4326 Sanitizer: Closing of open tags
4328 <s></s><table></table>
4330 <s></s><table></table>
4335 Sanitizer: Closing of open but not closed tags
4344 Sanitizer: Closing of closed but not open tags
4353 Sanitizer: Closing of closed but not open table tags
4355 Table not started</td></tr></table>
4357 <p>Table not started</td></tr></table>
4362 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
4364 <span id="æ: v">byte</span>[[#æ: v|backlink]]
4366 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
4371 Sanitizer: Validating the contents of the id attribute (bug 4515)
4377 Something, but defenetly not <br id="9" />...
4381 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
4385 <br id="foo" /><br id="foo" />
4387 Something need to be done. foo-2 ?
4391 Language converter: output gets cut off unexpectedly (bug 5757)
4395 this bit is safe: }-
4397 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
4399 then we get cut off here: }-
4401 all additional text is vanished
4403 <p>this bit is safe: }-
4404 </p><p>but if we add a conversion instance: xxx
4405 </p><p>then we get cut off here: }-
4406 </p><p>all additional text is vanished
4411 Self closed html pairs (bug 5487)
4414 <center><font id="bug" />Centered text</center>
4415 <div><font id="bug2" />In div text</div>
4417 <center><font id="bug" />Centered text</center>
4418 <div><font id="bug2" />In div text</div>
4427 HTML bullet list, closed tags (bug 5497)
4442 HTML bullet list, unclosed tags (bug 5497)
4457 HTML ordered list, closed tags (bug 5497)
4472 HTML ordered list, unclosed tags (bug 5497)
4487 HTML nested bullet list, closed tags (bug 5497)
4512 HTML nested bullet list, open tags (bug 5497)
4535 HTML nested ordered list, closed tags (bug 5497)
4560 HTML nested ordered list, open tags (bug 5497)
4583 HTML ordered list item with parameters oddity
4585 <ol><li id="fragment">One</li></ol>
4587 <ol><li id="fragment">One</li></ol>
4592 bug 5918: autonumbering
4594 [http://first/] [http://second] [ftp://ftp]
4598 [mailto:enclosed@mail.tld With target]
4600 [mailto:enclosed@mail.tld]
4602 mailto:inline@mail.tld
4604 <p><a href="http://first/" class="external autonumber" title="http://first/" rel="nofollow">[1]</a> <a href="http://second" class="external autonumber" title="http://second" rel="nofollow">[2]</a> <a href="ftp://ftp" class="external autonumber" title="ftp://ftp" rel="nofollow">[3]</a>
4605 </p><p><a href="ftp://inlineftp" class="external free" title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4606 </p><p><a href="mailto:enclosed@mail.tld" class="external text" title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4607 </p><p><a href="mailto:enclosed@mail.tld" class="external autonumber" title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4608 </p><p><a href="mailto:inline@mail.tld" class="external free" title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4614 # Security and HTML correctness
4615 # From Nick Jenkins' fuzz testing
4619 Fuzz testing: Parser13
4634 Fuzz testing: Parser14
4639 <a name="onmouseover.3D"></a><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"> onmouseover= </span></h2>
4640 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4642 <li class="toclevel-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4644 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4649 Fuzz testing: Parser14-table
4654 <a name="a"></a><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">a</span></h2>
4655 <table style="__TOC__">
4661 # Known to produce bogus xml (extra </td>)
4663 Fuzz testing: Parser16
4672 <th>https://</th><th></th><th></th><th>
4680 Fuzz testing: Parser21
4683 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4688 <th> <a href="irc://{{ftp://a" class="external free" title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4697 Fuzz testing: Parser22
4699 http://===r:::https://b
4703 <p><a href="http://===r:::https://b" class="external free" title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4711 # Known to produce bad XML for now
4713 Fuzz testing: Parser24
4720 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4721 <br style="onmouseover='alert(document.cookie);' " />
4723 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4728 <u class="|">}}}} >
4729 <br style="onmouseover='alert(document.cookie);'" />
4731 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4740 # Known to produce bad XML for now
4742 Fuzz testing: Parser25 (bug 6055)
4750 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4754 <li class="||">
4755 }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4760 Fuzz testing: URL adjacent extension (with space, clean)
4763 http://example.com <nowiki>junk</nowiki>
4765 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a> junk
4770 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4773 http://example.com<nowiki>junk</nowiki>
4775 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>junk
4780 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4783 http://example.com<pre>junk</pre>
4785 <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>
4790 Fuzz testing: image with bogus manual thumbnail
4792 [[Image:foobar.jpg|thumbnail= ]]
4794 <div class="thumb tright"><div class="thumbinner" style="width:1943px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
4799 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
4801 <pre dir=" "></pre>
4803 <pre dir=" "></pre>
4808 Parsing optional HTML elements (Bug 6171)
4813 <td> Some tabular data</td>
4814 <td> More tabular data ...
4815 <td> And yet som tabular data</td>
4821 <td> Some tabular data</td>
4822 <td> More tabular data ...
4823 </td><td> And yet som tabular data</td>
4830 Correct handling of <td>, <tr> (Bug 6171)
4835 <td> Some tabular data</td>
4836 <td> More tabular data ...</td>
4837 <td> And yet som tabular data</td>
4843 <td> Some tabular data</td>
4844 <td> More tabular data ...</td>
4845 <td> And yet som tabular data</td>
4853 Parsing crashing regression (fr:JavaScript)
4857 <p></body></x>
4862 Inline wiki vs wiki block nesting
4868 <p><b>Bold paragraph</b>
4869 </p><p>New wiki paragraph
4874 Inline HTML vs wiki block nesting
4880 <p><b>Bold paragraph</b>
4881 </p><p>New wiki paragraph
4887 Mixing markup for italics and bold
4890 '''bold''''''bold''bolditalics'''''
4892 <p><b>bold</b><b>bold<i>bolditalics</i></b>
4900 Article for special page transclusion test
4904 Special page transclusion
4907 {{Special:Prefixindex/Xyzzyx}}
4911 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4916 Special page transclusion twice (bug 5021)
4919 {{Special:Prefixindex/Xyzzyx}}
4920 {{Special:Prefixindex/Xyzzyx}}
4924 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4927 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4932 Transclusion of default MediaWiki message
4934 {{MediaWiki:Mainpage}}
4941 Transclusion of nonexistent MediaWiki message
4943 {{MediaWiki:Mainpagexxx}}
4945 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit" class="new" title="MediaWiki:Mainpagexxx">MediaWiki:Mainpagexxx</a>
4950 Transclusion of MediaWiki message with underscore
4952 {{MediaWiki:history_short}}
4959 Transclusion of MediaWiki message with space
4961 {{MediaWiki:history short}}
4968 Invalid header with following text
4978 Section extraction test (section 0)
4998 Section extraction test (section 1)
5020 Section extraction test (section 2)
5041 Section extraction test (section 3)
5061 Section extraction test (section 4)
5085 Section extraction test (section 5)
5105 Section extraction test (section 6)
5126 Section extraction test (section 7)
5146 Section extraction test (section 8)
5166 Section extraction test (section 9)
5187 Section extraction test (section 10)
5207 Section extraction test (nonexistent section 11)
5226 Section extraction test with bogus heading (section 1)
5231 ==bogus== not a legal section
5235 ==bogus== not a legal section
5239 Section extraction test with bogus heading (section 2)
5244 ==bogus== not a legal section
5251 Section extraction test with comment after heading (section 1)
5256 ==unmarked== <!-- an unmarked section -->
5260 ==unmarked== <!-- an unmarked section -->
5264 Section extraction test with comment after heading (section 2)
5269 ==unmarked== <!-- an unmarked section -->
5276 Section extraction test with bogus <nowiki> heading (section 1)
5281 ==bogus== <nowiki>not a legal section</nowiki>
5285 ==bogus== <nowiki>not a legal section</nowiki>
5289 Section extraction test with bogus <nowiki> heading (section 2)
5294 ==bogus== <nowiki>not a legal section</nowiki>
5301 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
5302 # instead of respecting commented sections
5304 Section extraction prefixed by comment (section 1)
5315 Section extraction prefixed by comment (section 2)
5326 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
5327 # instead of respecting HTML-style headings
5329 Section extraction, mixed wiki and html (section 1)
5345 Section extraction, mixed wiki and html (section 2)
5361 # Formerly testing for bug 3342
5363 Section extraction, heading surrounded by <noinclude>
5367 <noinclude>==unmarked==</noinclude>
5375 Section replacement test (section 0)
5406 Section replacement test (section 1)
5435 Section replacement test (section 2)
5465 Section replacement test (section 3)
5496 Section replacement test (section 4)
5523 Section replacement test (section 5)
5554 Section replacement test (section 6)
5584 Section replacement test (section 7)
5615 Section replacement test (section 8)
5646 Section replacement test (section 9)
5675 Section replacement test (section 10)
5706 Section extraction, heading followed by pre with 20 spaces (bug 6398)
5718 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
5731 Section extraction, <pre> around bogus header (bug 10309)
5748 Section replacement, <pre> around bogus header (bug 10309)
5750 noxml replace=2,"xxx"
5771 Handling of 
 in URLs
5775 <ul><li><ul><li><a href="irc://%0Aa" class="external free" title="irc://%0Aa" rel="nofollow">irc://%0Aa</a>
5782 5 quotes, code coverage +1 line
5789 Special:Search page linking.
5793 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
5808 * {{SUBJECTPAGENAME}}
5809 * {{SUBJECTPAGENAMEE}}
5816 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
5818 <ul><li> Parser test
5819 </li><li> Parser test
5820 </li><li> Parser test
5821 </li><li> Parser_test
5822 </li><li> Parser test
5823 </li><li> Parser_test
5824 </li><li> Talk:Parser test
5825 </li><li> Talk:Parser_test
5826 </li><li> Parser test
5827 </li><li> Parser_test
5834 </li><li> <a href="/index.php?title=Template:Dynamic&action=edit" class="new" title="Template:Dynamic">Template:Dynamic</a>
5838 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
5848 image4 |300px| centre
5849 image5.svg| http://///////
5854 <table class="gallery" cellspacing="0" cellpadding="0">
5856 <td><div class="gallerybox" style="width: 155px;">
5857 <div style="height: 152px;">Image1.png</div>
5858 <div class="gallerytext">
5861 <td><div class="gallerybox" style="width: 155px;">
5862 <div style="height: 152px;">Image2.gif</div>
5863 <div class="gallerytext">
5868 <td><div class="gallerybox" style="width: 155px;">
5869 <div style="height: 152px;">Image3</div>
5870 <div class="gallerytext">
5873 <td><div class="gallerybox" style="width: 155px;">
5874 <div style="height: 152px;">Image4</div>
5875 <div class="gallerytext">
5882 <td><div class="gallerybox" style="width: 155px;">
5883 <div style="height: 152px;">Image5.svg</div>
5884 <div class="gallerytext">
5885 <pre><a href="http://///////" class="external free" title="http://///////" rel="nofollow">http://///////</a>
5889 <td><div class="gallerybox" style="width: 155px;">
5890 <div style="height: 152px;">* image6</div>
5891 <div class="gallerytext">
5900 HTML Hex character encoding (spells the word "JavaScript")
5902 JavaScript
5904 <p>JavaScript
5909 __FORCETOC__ override
5921 ISBN 978-0-1234-56 789
5923 <p><a href="/index.php?title=Special:Booksources&isbn=9780123456" class="internal">ISBN 978-0-1234-56</a> 789
5928 ISBN followed by 5 spaces
5939 ISBN ISBN 1234567890
5941 <p>ISBN <a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1234567890</a>
5950 <p>RFC <a href="http://tools.ietf.org/html/rfc1234" class="external" title="http://tools.ietf.org/html/rfc1234">RFC 1234</a>
5955 Double RFC with a wiki link
5959 <p>RFC <a href="/index.php?title=RFC_1234&action=edit" class="new" title="RFC 1234">RFC 1234</a>
5968 <p><a href="http://tools.ietf.org/html/rfc983" class="external" title="http://tools.ietf.org/html/rfc983">RFC 983</a> 987
5973 Centre-aligned image
5975 [[Image:foobar.jpg|centre]]
5977 <div class="center"><div class="floatnone"><span><a href="/wiki/Image:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" /></a></span></div></div>
5984 [[Image:foobar.jpg|none]]
5986 <div class="floatnone"><span><a href="/wiki/Image:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" border="0" /></a></span></div>
5991 Width + Height sized image (using px) (height is ignored)
5993 [[Image:foobar.jpg|640x480px]]
5995 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" border="0" /></a>
6000 Another italics / bold test
6008 # Note the results may be incorrect, as parserTest output included this:
6009 # XML error: Mismatched tag at byte 6120:
6010 # ...<dd> </dt></dl> </dd...
6016 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
6027 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
6029 Images with the "|" character in the comment
6031 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
6033 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="image" title="An external URL"><img alt="An external URL" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify" style="float:right"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a href="http://test/?param1=|left|&param2=|x" class="external text" title="http://test/?param1=|left|&param2=|x" rel="nofollow">external</a> URL</div></div></div>
6038 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
6040 <html><script>alert(1);</script></html>
6042 <p><html><script>alert(1);</script></html>
6047 HTML with raw HTML ($wgRawHtml==true)
6051 <html><script>alert(1);</script></html>
6053 <p><script>alert(1);</script>
6058 Parents of subpages, one level up
6060 subpage title=[[Subpage test/L1/L2/L3]]
6064 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit" class="new" title="Subpage test/L1/L2">L2</a>
6070 Parents of subpages, one level up, not named
6072 subpage title=[[Subpage test/L1/L2/L3]]
6076 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit" class="new" title="Subpage test/L1/L2">Subpage test/L1/L2</a>
6083 Parents of subpages, two levels up
6086 subpage title=[[Subpage test/L1/L2/L3]]
6090 <p><a href="/index.php?title=Subpage_test/L1&action=edit" class="new" title="Subpage test/L1">L1</a>
6095 # Question: should result be "/index.php?title=Subpage_test/L1&action=edit" instead?
6097 Parents of subpages, two levels up, without trailing slash or name.
6099 subpage title=[[Subpage test/L1/L2/L3]]
6103 <p><a href="/index.php?title=Subpage_test/L1/L2/..&action=edit" class="new" title="Subpage test/L1">../..</a>
6107 # Question: Why should the link text in the above test be "../..", yet in this test the "../.." part is silently dropped?
6108 # Current result: <p><a href="/index.php?title=Subpage_test/L1////&action=edit" class="new" title="Subpage test/L1////">///
6110 Parents of subpages, two levels up, with lots of extra trailing slashes.
6112 subpage title=[[Subpage test/L1/L2/L3]]
6116 <p><a href="/index.php?title=Subpage_test/L1&action=edit" class="new" title="Subpage test/L1">Subpage test/L1</a>
6121 Definition list code coverage
6127 <dl><dt> title </dt><dd> def
6128 </dd><dt> title </dt><dd> def
6129 </dd><dt>title</dt><dd> def
6135 Don't fall for the self-closing div
6137 <div>hello world</div/>
6139 <div>hello world</div>
6148 <p>[[:Template:Msg]]
6157 <p><a href="/index.php?title=Template:QUERTY&action=edit" class="new" title="Template:QUERTY">Template:QUERTY</a>
6161 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
6163 Always escape literal '>' in output, not just after '<'
6177 <p>This is a test template
6178 This is a test template
6190 Inclusion of !userCanEdit() content
6194 <a name="header"></a><h2><span class="editsection">[<a href="/index.php?title=MediaWiki:Fake&action=edit&section=1" title="MediaWiki:Fake">edit</a>]</span> <span class="mw-headline">header</span></h2>
6200 Out-of-order TOC heading levels
6209 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
6211 <li class="toclevel-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
6213 <li class="toclevel-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
6214 <li class="toclevel-2"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
6217 <li class="toclevel-1"><a href="#1_7"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
6219 <li class="toclevel-2"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
6220 <li class="toclevel-2"><a href="#2_4"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
6224 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
6225 <a name="2"></a><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">2</span></h2>
6226 <a name="6"></a><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">6</span></h6>
6227 <a name="3"></a><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">3</span></h3>
6228 <a name="1_7"></a><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">1</span></h1>
6229 <a name="5"></a><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">5</span></h5>
6230 <a name="2_4"></a><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">2</span></h2>
6236 ISBN with a dummy number
6246 ISBN with space-delimited number
6250 <p><a href="/index.php?title=Special:Booksources&isbn=9290170328" class="internal">ISBN 92 9017 032 8</a>
6256 ISBN with multiple spaces, no number
6275 </p><p><a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1234567890</a>
6276 </p><p>ISBN 12345678901
6282 ISBN with trailing year (bug 8110)
6284 ISBN 1-234-56789-0 - 2006
6286 ISBN 1 234 56789 0 - 2006
6288 <p><a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1-234-56789-0</a> - 2006
6289 </p><p><a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1 234 56789 0</a> - 2006
6295 Pages in namespace (Magic word disabled currently)
6297 {{PAGESINNAMESPACE:}}
6306 {{anchorencode:foo bar©#%n}}
6308 <p>foo_bar.C2.A9.23.25n
6314 Bug 8293: Use of center tag ruins paragraph formatting
6336 ### Language variants related tests
6339 Self-link in language variants
6341 title=[[Dunav]] language=sr
6343 Both [[Dunav]] and [[Дунав]] are names for this river.
6345 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
6351 Link to pages in language variants
6355 Main Page can be written as [[Маин Паге]]
6357 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
6363 Multiple links to pages in language variants
6367 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
6369 <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>.
6375 Simple template in language variants
6381 <p>This is a test template
6387 Template with explicit namespace in language variants
6393 <p>This is a test template
6399 Basic test for template parameter in language variants
6403 {{парамтест|param=foo}}
6405 <p>This is a test template with parameter foo
6411 Simple category in language variants
6415 [[:Category:МедиаWики Усер'с Гуиде]]
6417 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
6422 Stripping -{}- tags (language variants)
6426 Latin proverb: -{Ne nuntium necare}-
6428 <p>Latin proverb: Ne nuntium necare
6434 Prevent conversion with -{}- tags (language variants)
6436 language=sr variant=sr-ec
6438 Latinski: -{Ne nuntium necare}-
6440 <p>Латински: Ne nuntium necare
6446 Prevent conversion of text with -{}- tags (language variants)
6448 language=sr variant=sr-ec
6450 Latinski: -{Ne nuntium necare}-
6452 <p>Латински: Ne nuntium necare
6458 Prevent conversion of links with -{}- tags (language variants)
6460 language=sr variant=sr-ec
6464 <p><a href="/index.php?title=Main_Page&variant=sr-ec" title="Main Page">Main Page</a>
6470 -{}- tags within headlines (within html for parserConvert())
6472 language=sr variant=sr-ec
6476 <a name="-.7BNaslov.7D-"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Уреди део: Naslov">уреди</a>]</span> <span class="mw-headline"> Naslov </span></h2>
6482 Explicit definition of language variant alternatives
6484 language=zh variant=zh-tw
6486 -{zh:China;zh-tw:Taiwan}-, not China
6488 <p>Taiwan, not China
6494 Adding explicit session-wise language variant mapping (A flag)
6496 language=zh variant=zh-tw
6498 -{A|zh:China;zh-tw:Taiwan}- is China
6506 Adding explicit conversion rule for title (T flag)
6508 language=zh variant=zh-tw
6510 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
6512 <p>Should be stripped!
6518 Raw output of variant escape tags (R flag)
6520 language=zh variant=zh-tw
6522 Raw: -{R|zh:China;zh-tw:Taiwan}-
6524 <p>Raw: zh:China;zh-tw:Taiwan
6530 Do not convert roman numbers to language variants
6532 language=sr variant=sr-ec
6536 <p>Фридрих IV је цар.
6551 Try for 100% code coverage