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
86 </li><li> plain<i>italic</i>plain
87 </li><li> plain<i>italic</i>plain<i>italic</i>plain
88 </li><li> plain<b>bold</b>plain
89 </li><li> plain<b>bold</b>plain<b>bold</b>plain
90 </li><li> plain<i>italic</i>plain<b>bold</b>plain
91 </li><li> plain<b>bold</b>plain<i>italic</i>plain
92 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
93 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
94 </li><li> plain<i><b>bold-italic</b>italic</i>plain
95 </li><li> plain<b><i>bold-italic</i>bold</b>plain
96 </li><li> plain<i>italic<b>bold-italic</b></i>plain
97 </li><li> plain<b>bold<i>bold-italic</i></b>plain
98 </li><li> plain l'<i>italic</i>plain
104 ### <nowiki> test cases
108 <nowiki> unordered list
110 <nowiki>* This is not an unordered list item.</nowiki>
112 <p>* This is not an unordered list item.
119 <nowiki>Lorem ipsum dolor
140 :There is not nowiki.
141 :There is <nowiki>nowiki</nowiki>.
143 #There is not nowiki.
144 #There is <nowiki>nowiki</nowiki>.
146 *There is not nowiki.
147 *There is <nowiki>nowiki</nowiki>.
149 <dl><dd>There is not nowiki.
150 </dd><dd>There is nowiki.
152 <ol><li>There is not nowiki.
153 </li><li>There is nowiki.
155 <ul><li>There is not nowiki.
156 </li><li>There is nowiki.
168 <!-- comment 1 --> asdf
204 asdf<!-- comment 1 -->jkl
214 <!-- foo --> b <!-- bar -->
228 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
234 Comment semantics and delimiters
236 <!-- --><!----><!-----><!------>
242 Comment semantics and delimiters, redux
244 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
245 -- foo -- funky huh? ... -->
251 Comment semantics and delimiters: directors cut
253 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
254 everything starting with < followed by !-- until the first -- and > we see,
255 that wouldn't be valid XML however, since in XML -- has to terminate a comment
263 Comment semantics: nesting
265 <!--<!-- no, we're not going to do anything fancy here -->-->
272 Comment semantics: unclosed comment at end
274 <!--This comment will run out to the end of the document
281 ### Preformatted text
290 And a [[Main Page|link]]
296 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
301 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
318 Regression with preformatted in <center>
332 <pre> with attributes (bug 3202)
334 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
336 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
341 <pre> with width attribute (bug 3202)
343 <pre width="8">Narrow screen goodies</pre>
345 <pre width="8">Narrow screen goodies</pre>
350 <pre> with forbidden attribute (bug 3202)
352 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
354 <pre width="8">Narrow screen goodies</pre>
359 <pre> with forbidden attribute values (bug 3202)
361 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
363 <pre width="8">Narrow screen goodies</pre>
375 <dl><dt> name </dt><dd> Definition
381 Definition list for indentation only
385 <dl><dd> Indented text
391 Definition list with no space
395 <dl><dt>name</dt><dd>Definition
401 Definition list with URL link
403 ; http://example.com/ : definition
405 <dl><dt> <a href="http://example.com/" class="external free" title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
411 Definition list with bracketed URL link
413 ;[http://www.example.com/ Example]:Something about it
415 <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
421 Definition list with wikilink containing colon
423 ; [[Help:FAQ]]: The least-read page on Wikipedia
425 <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
430 # At Brion's and JeLuF's insistence... :)
432 Definition list with news link containing colon
434 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
436 <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!
442 Malformed definition list with colon
444 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
446 <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
452 Definition lists: colon in external link text
454 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
456 <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
462 Definition lists: colon in HTML attribute
464 ;<b style="display: inline">bold</b>
466 <dl><dt><b style="display: inline">bold</b>
473 Definition lists: self-closed tag
475 ;one<br/>two : two-line fun
477 <dl><dt>one<br />two </dt><dd> two-line fun
487 External links: non-bracketed
489 Non-bracketed: http://example.com
491 <p>Non-bracketed: <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>
496 External links: numbered
498 Numbered: [http://example.com]
499 Numbered: [http://example.net]
500 Numbered: [http://example.org]
502 <p>Numbered: <a href="http://example.com" class="external autonumber" title="http://example.com" rel="nofollow">[1]</a>
503 Numbered: <a href="http://example.net" class="external autonumber" title="http://example.net" rel="nofollow">[2]</a>
504 Numbered: <a href="http://example.org" class="external autonumber" title="http://example.org" rel="nofollow">[3]</a>
509 External links: specified text
511 Specified text: [http://example.com link]
513 <p>Specified text: <a href="http://example.com" class="external text" title="http://example.com" rel="nofollow">link</a>
518 External links: trail
520 Linktrails should not work for external links: [http://example.com link]s
522 <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
527 External links: dollar sign in URL
529 http://example.com/1$2345
531 <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>
536 External links: dollar sign in URL (named)
538 [http://example.com/1$2345]
540 <p><a href="http://example.com/1$2345" class="external autonumber" title="http://example.com/1$2345" rel="nofollow">[1]</a>
545 External links: open square bracket forbidden in URL (bug 4377)
547 http://example.com/1[2345
549 <p><a href="http://example.com/1" class="external free" title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
554 External links: open square bracket forbidden in URL (named) (bug 4377)
556 [http://example.com/1[2345]
558 <p><a href="http://example.com/1" class="external text" title="http://example.com/1" rel="nofollow">[2345</a>
563 External links: nowiki in URL link text (bug 6230)
565 [http://example.com/ <nowiki>''example site''</nowiki>]
567 <p><a href="http://example.com/" class="external text" title="http://example.com/" rel="nofollow">''example site''</a>
572 External links: newline forbidden in text (bug 6230 regression check)
574 [http://example.com/ first
577 <p>[<a href="http://example.com/" class="external free" title="http://example.com/" rel="nofollow">http://example.com/</a> first
585 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
587 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
592 External image from https
594 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
596 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
601 Link to non-http image, no img tag
603 Link to non-http image, no img tag: ftp://example.com/test.jpg
605 <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>
610 External links: terminating separator
612 Terminating separator: http://example.com/thing,
614 <p>Terminating separator: <a href="http://example.com/thing" class="external free" title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
619 External links: intervening separator
621 Intervening separator: http://example.com/1,2,3
623 <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>
628 External links: old bug with URL in query
630 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
632 <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>
637 External links: old URL-in-URL bug, mixed protocols
639 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
641 <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>
646 External links: URL in text
648 URL in text: [http://example.com http://example.com]
650 <p>URL in text: <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>
655 External links: Clickable images
657 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
659 <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>
664 External links: raw ampersand
666 Old & use: http://x&y
668 <p>Old & use: <a href="http://x&y" class="external free" title="http://x&y" rel="nofollow">http://x&y</a>
673 External links: encoded ampersand
675 Old & use: http://x&y
677 <p>Old & use: <a href="http://x&y" class="external free" title="http://x&y" rel="nofollow">http://x&y</a>
682 External links: encoded equals (bug 6102)
684 http://example.com/?foo=bar
686 <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>
691 External links: [raw ampersand]
693 Old & use: [http://x&y]
695 <p>Old & use: <a href="http://x&y" class="external autonumber" title="http://x&y" rel="nofollow">[1]</a>
700 External links: [encoded ampersand]
702 Old & use: [http://x&y]
704 <p>Old & use: <a href="http://x&y" class="external autonumber" title="http://x&y" rel="nofollow">[1]</a>
709 External links: [encoded equals] (bug 6102)
711 [http://example.com/?foo=bar]
713 <p><a href="http://example.com/?foo=bar" class="external autonumber" title="http://example.com/?foo=bar" rel="nofollow">[1]</a>
718 External links: [IDN ignored character reference in hostname; strip it right off]
720 [http://e‌xample.com/]
722 <p><a href="http://example.com/" class="external autonumber" title="http://example.com/" rel="nofollow">[1]</a>
727 External links: IDN ignored character reference in hostname; strip it right off
729 http://e‌xample.com/
731 <p><a href="http://example.com/" class="external free" title="http://example.com/" rel="nofollow">http://example.com/</a>
736 External links: www.jpeg.org (bug 554)
740 <p><a href="http://www.jpeg.org" class="external free" title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
745 External links: URL within URL (original bug 2)
747 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
749 <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>
754 BUG 361: URL inside bracketed URL
756 [http://www.example.com/foo http://www.example.com/bar]
758 <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>
763 BUG 361: URL within URL, not bracketed
765 http://www.example.com/foo?=http://www.example.com/bar
767 <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>
772 BUG 289: ">"-token in URL-tail
774 http://www.example.com/<hello>
776 <p><a href="http://www.example.com/" class="external free" title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
781 BUG 289: literal ">"-token in URL-tail
783 http://www.example.com/<b>html</b>
785 <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>
790 BUG 289: ">"-token in bracketed URL
792 [http://www.example.com/<hello> stuff]
794 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
799 BUG 289: literal ">"-token in bracketed URL
801 [http://www.example.com/<b>html</b> stuff]
803 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
808 BUG 289: literal double quote at end of URL
810 http://www.example.com/"hello"
812 <p><a href="http://www.example.com/" class="external free" title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
817 BUG 289: literal double quote in bracketed URL
819 [http://www.example.com/"hello" stuff]
821 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
826 External links: invalid character
827 Fixme: the missing char seems to have gone missing
831 [http://www.example.com test]
833 <p>[<a href="http://www.example.com" class="external free" title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
838 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
840 [http://www.example.com test]
842 <p><a href="http://www.example.com" class="external text" title="http://www.example.com" rel="nofollow">test</a>
847 External links: wiki links within external link (Bug 3695)
849 [http://example.com [[wikilink]] embedded in ext link]
851 <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>
856 BUG 787: Links with one slash after the url protocol are invalid
860 [http:/example.com title]
863 </p><p>[http:/example.com title]
868 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
870 ''[http://example.com text'']
871 [http://example.com '''text]'''
872 ''Something [http://example.com in italic'']
873 ''Something [http://example.com mixed''''', even bold]'''
874 '''''Now [http://example.com both''''']
876 <p><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i>text</i></a>
877 <a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><b>text</b></a>
878 <i>Something </i><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i>in italic</i></a>
879 <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>
880 <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>
888 http://www.example.com/?title=AT%26T
890 <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>
895 Bug 4781, 5267: %26 in URL
897 http://www.example.com/?title=100%25_Bran
899 <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>
904 Bug 4781, 5267: %28, %29 in URL
906 http://www.example.com/?title=Ben-Hur_%281959_film%29
908 <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>
914 Bug 4781: %26 in autonumber URL
916 [http://www.example.com/?title=AT%26T]
918 <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>
923 Bug 4781, 5267: %26 in autonumber URL
925 [http://www.example.com/?title=100%25_Bran]
927 <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>
932 Bug 4781, 5267: %28, %29 in autonumber URL
934 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
936 <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>
942 Bug 4781: %26 in bracketed URL
944 [http://www.example.com/?title=AT%26T link]
946 <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>
951 Bug 4781, 5267: %26 in bracketed URL
953 [http://www.example.com/?title=100%25_Bran link]
955 <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>
960 Bug 4781, 5267: %28, %29 in bracketed URL
962 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
964 <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>
969 External link containing double-single-quotes in text '' (bug 4598 sanity check)
971 Some [http://example.com/ pretty ''italics'' and stuff]!
973 <p>Some <a href="http://example.com/" class="external text" title="http://example.com/" rel="nofollow">pretty <i>italics</i> and stuff</a>!
978 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
980 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
982 <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>
987 URL-encoding in URL functions (single parameter)
989 {{localurl:Some page|amp=&}}
991 <p>/index.php?title=Some_page&amp=%26
996 URL-encoding in URL functions (multiple parameters)
998 {{localurl:Some page|q=?&=&}}
1000 <p>/index.php?title=Some_page&q=%3F&amp=%26
1011 Normal text. '''Bold text.''' Normal text. ''Italic text.''
1013 Normal text. '''''Bold italic text.''''' Normal text.
1015 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
1016 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
1022 Unclosed and unmatched quotes
1024 '''''Bold italic text '''with bold deactivated''' in between.'''''
1026 '''''Bold italic text ''with italic deactivated'' in between.'''''
1030 ..spanning two paragraphs (should not work).'''
1032 '''Bold tag left open
1034 ''Italic tag left open
1038 <!-- Unmatching number of opening, closing tags: -->
1039 '''This year''''s election ''should'' beat '''last year''''s.
1041 ''Tom'''s car is bigger than ''Susan'''s.
1043 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
1044 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
1045 </p><p><b>Bold text..</b>
1046 </p><p>..spanning two paragraphs (should not work).
1047 </p><p><b>Bold tag left open</b>
1048 </p><p><i>Italic tag left open</i>
1050 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
1051 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
1058 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
1061 # This should not produce <table></table> as <table><tr><td></td></tr></table>
1062 # is the bare minimun required by the spec, see:
1063 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
1065 A table with no data.
1071 # A table with nothing but a caption is invalid XHTML, we might want to render
1072 # this as <p>caption</p>
1074 A table with nothing but a caption
1082 </caption><tr><td></td></tr></table>
1106 Multiplication table
1108 {| border="1" cellpadding="2"
1109 |+Multiplication table
1111 ! × !! 1 !! 2 !! 3
1129 <table border="1" cellpadding="2">
1130 <caption>Multiplication table
1133 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1137 </th><td> 1 </td><td> 2 </td><td> 3
1141 </th><td> 2 </td><td> 4 </td><td> 6
1145 </th><td> 3 </td><td> 6 </td><td> 9
1149 </th><td> 4 </td><td> 8 </td><td> 12
1153 </th><td> 5 </td><td> 10 </td><td> 15
1161 {| align=right border=1
1163 |rowspan=2| Cell 2, row 1 (and 2)
1170 <table align="right" border="1">
1173 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1174 </td><td> Cell 3, row 1
1178 </td><td> Cell 3, row 2
1189 {| bgcolor=#ABCDEF border=2
1194 |the original table again
1201 <table bgcolor="#ABCDEF" border="2">
1208 </td><td>the original table again
1214 Invalid attributes in table cell (bug 1830)
1228 # FIXME: this one has incorrect tag nesting still.
1230 TODO: Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)
1233 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1237 <td><a href="ftp://|x||" class="external autonumber" title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1249 Plain link, capitalized
1253 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1258 Plain link, uncapitalized
1262 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1269 [[Main Page|The Main Page]]
1271 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1280 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1287 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1289 <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>
1296 [[Main Page]]xxx, [[Main Page]]XXX
1298 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1303 Link with 3 brackets
1312 Piped link with 3 brackets
1314 [[[main page|the main page]]]
1316 <p>[[[main page|the main page]]]
1321 Link with multiple pipes
1323 [[Main Page|The|Main|Page]]
1325 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1332 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1334 <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>
1339 Piped link to namespace
1341 [[Meta:Disclaimers|The disclaimers]]
1343 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1350 [[Usually caused by a typo (oops}]]
1352 <p>[[Usually caused by a typo (oops}]]
1357 Link containing % (not as a hex sequence)
1361 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1366 Link containing % as a single hex sequence interpreted to char
1370 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1375 Link containing % as a double hex sequence interpreted to hex sequence
1379 <p>[[7%2525 Solution]]
1384 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1385 Example for such a section: == < ==
1387 [[%23%3c]][[%23%3e]]
1389 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1394 Link containing "<#" and ">#" as a hex sequences
1396 [[%3c%23]][[%3e%23]]
1398 <p>[[%3c%23]][[%3e%23]]
1403 TODO: Link containing double-single-quotes '' (bug 4598)
1405 [[Lista d''e paise d''o munno]]
1407 <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>
1412 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1414 Some [[Link|pretty ''italics'' and stuff]]!
1416 <p>Some <a href="/index.php?title=Link&action=edit" class="new" title="Link">pretty <i>italics</i> and stuff</a>!
1421 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1423 ''Some [[Link|pretty ''italics'' and stuff]]!
1425 <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>
1432 [[http://www.example.org]]
1434 <p>[<a href="http://www.example.org" class="external autonumber" title="http://www.example.org" rel="nofollow">[1]</a>]
1438 # I'm fairly sure the expected result here is wrong.
1439 # We want these to be URL links, not pseudo-pages with URLs for titles....
1440 # However the current output is also pretty screwy.
1443 # I'm changing it to match the current output--it arguably makes more
1444 # sense in the light of the test above. Old expected result was:
1445 #<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>
1447 # But I think this test is bordering on "garbage in, garbage out" anyway.
1452 Piped link to URL: [[http://www.example.org|an example URL]]
1454 <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>]
1459 BUG 2: [[page|http://url/]] should link to page, not http://url/
1461 [[Main Page|http://url/]]
1463 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1468 BUG 337: Escaped self-links should be bold
1472 [[Bug462]] [[Bug462]]
1474 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1479 Self-link to section should not be bold
1483 [[Main Page#section]]
1485 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1496 Self-link to numeric title
1502 <p><strong class="selflink">0</strong>
1507 Link to numeric-equivalent title
1513 <p><a href="/wiki/00" title="00">00</a>
1518 <nowiki> inside a link
1520 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1522 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1527 ### Interwiki links (see maintenance/interwiki.sql)
1531 Inline interwiki link
1533 [[MeatBall:SoftSecurity]]
1535 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1540 Inline interwiki link with empty title (bug 2372)
1544 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw" title="meatball:">MeatBall:</a>
1549 Interwiki link encoding conversion (bug 1636)
1551 *[[Wikipedia:ro:Olteniţa]]
1552 *[[Wikipedia:ro:Olteniţa]]
1554 <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>
1555 </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>
1561 Interwiki link with fragment (bug 2130)
1563 [[MeatBall:SoftSecurity#foo]]
1565 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1583 Incorrecly removing closing slashes from correctly formed XHTML
1585 <br style="clear:both;" />
1587 <p><br style="clear:both;" />
1592 Failing to transform badly formed HTML into correct XHTML
1598 <p><br clear="left" />
1599 <br clear="right" />
1605 Horizontal ruler (should it add that extra space?)
1619 ### Block-level elements
1642 <ol><li>Numbered list
1659 ***#Number on level 4
1661 **#Number on level 3
1662 **#Number on level 3
1667 <ol><li> with numbers
1669 <ul><li> and bullets
1671 <ol><li> and numbers
1673 </li><li>bullets again
1674 <ul><li>bullet level 2
1675 <ul><li>bullet level 3
1676 <ol><li>Number on level 4
1679 </li><li>bullet level 2
1680 <ol><li>Number on level 3
1681 </li><li>Number on level 3
1684 <ol><li>number level 2
1692 List items are not parsed correctly following a <pre> block (bug 785)
1698 <ul><li> <pre>foo</pre>
1699 </li><li> <pre>bar</pre>
1710 Magic Word: {{CURRENTDAY}}
1719 Magic Word: {{CURRENTDAY2}}
1728 Magic Word: {{CURRENTDAYNAME}}
1737 Magic Word: {{CURRENTDOW}}
1746 Magic Word: {{CURRENTMONTH}}
1755 Magic Word: {{CURRENTMONTHABBREV}}
1757 {{CURRENTMONTHABBREV}}
1764 Magic Word: {{CURRENTMONTHNAME}}
1766 {{CURRENTMONTHNAME}}
1773 Magic Word: {{CURRENTMONTHNAMEGEN}}
1775 {{CURRENTMONTHNAMEGEN}}
1782 Magic Word: {{CURRENTTIME}}
1791 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1800 Magic Word: {{CURRENTYEAR}}
1809 Magic Word: {{FULLPAGENAME}}
1811 title=[[User:Ævar Arnfjörð Bjarmason]]
1815 <p>User:Ævar Arnfjörð Bjarmason
1820 Magic Word: {{FULLPAGENAMEE}}
1822 title=[[User:Ævar Arnfjörð Bjarmason]]
1826 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1831 Magic Word: {{NAMESPACE}}
1833 title=[[User:Ævar Arnfjörð Bjarmason]]
1843 Magic Word: {{NAMESPACEE}}
1845 title=[[User:Ævar Arnfjörð Bjarmason]]
1855 Magic Word: {{NUMBEROFARTICLES}}
1857 {{NUMBEROFARTICLES}}
1864 Magic Word: {{NUMBEROFFILES}}
1873 Magic Word: {{PAGENAME}}
1875 title=[[User:Ævar Arnfjörð Bjarmason]]
1880 <p>Ævar Arnfjörð Bjarmason
1885 Magic Word: {{PAGENAMEE}}
1887 title=[[User:Ævar Arnfjörð Bjarmason]]
1891 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1896 Magic Word: {{REVISIONID}}
1905 Magic Word: {{SCRIPTPATH}}
1914 Magic Word: {{SERVER}}
1918 <p><a href="http://localhost" class="external free" title="http://localhost" rel="nofollow">http://localhost</a>
1923 Magic Word: {{SERVERNAME}}
1932 Magic Word: {{SITENAME}}
1941 Namespace 1 {{ns:1}}
1950 Namespace 1 {{ns:01}}
1959 Namespace 0 {{ns:0}} (bug 4783)
1967 Namespace 0 {{ns:00}} (bug 4783)
1975 Namespace -1 {{ns:-1}}
1984 Namespace Project {{ns:User}}
1997 Magic links: internal link to RFC (bug 479)
2001 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
2006 Magic links: RFC (bug 479)
2010 <p><a href="http://tools.ietf.org/html/rfc822" class="external" title="http://tools.ietf.org/html/rfc822">RFC 822</a>
2015 Magic links: ISBN (bug 1937)
2019 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
2024 Magic links: PMID incorrectly converts space to underscore
2028 <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>
2037 Nonexistant template
2039 {{thistemplatedoesnotexist}}
2041 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
2048 This is a test template
2056 <p>This is a test template
2061 Template with explicit namespace
2065 <p>This is a test template
2073 This is a test template with parameter {{{param}}}
2079 {{paramtest|param=foo}}
2081 <p>This is a test template with parameter foo
2086 Template:paramtestnum
2092 Template unnamed parameter
2094 {{paramtestnum|Main Page|the main page}}
2096 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2101 Template:templatesimple
2107 Template:templateredirect
2109 #redirect [[Template:templatesimple]]
2113 Template:templateasargtestnum
2119 Template:templateasargtest
2121 {{template{{{templ}}}}}
2125 Template:templateasargtest2
2131 Template with template name as unnamed argument
2133 {{templateasargtestnum|templatesimple}}
2140 Template with template name as argument
2142 {{templateasargtest|templ=simple}}
2149 Template with template name as argument (2)
2151 {{templateasargtest2|templ=templatesimple}}
2158 Template:templateasargtestdefault
2160 {{{{{templ|templatesimple}}}}}
2170 Template with default value
2172 {{templateasargtestdefault}}
2179 Template with default value (value set)
2181 {{templateasargtestdefault|templ=templa}}
2190 {{templateredirect}}
2197 Template with argument in separate line
2199 {{ templateasargtest |
2207 Template with complex template as argument
2210 param ={{ templateasargtest |
2213 <p>This is a test template with parameter (test)
2218 Template with thumb image (with link in description)
2221 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2223 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:122px;"><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>
2228 Template:complextemplate
2230 {{{1}}} {{paramtest|
2231 param ={{{param}}}}}
2235 Template with complex arguments
2238 param ={{ templateasargtest |
2239 templ = simple }}|[[Template:complextemplate|link]]}}
2241 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2246 BUG 553: link with two variables in a piped link
2249 |[[{{{1}}}|{{{2}}}]]
2254 <td>[[{{{1}}}|{{{2}}}]]
2260 Magic variable as template parameter
2262 {{paramtest|param={{SITENAME}}}}
2264 <p>This is a test template with parameter MediaWiki
2271 [[{{{param}}}|link]]
2275 Template parameter as link source
2277 {{linktest|param=Main Page}}
2279 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2287 including another template, {{paramtest|param={{{arg}}}}}
2291 Template passing argument to another template
2293 {{paramtest2|arg='hmm'}}
2295 <p>including another template, This is a test template with parameter 'hmm'
2306 Template as link source
2310 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2328 Template infinite loop
2332 <p><a href="/index.php?title=Loop1&action=edit" class="new" title="Loop1">loop1</a><!-- WARNING: template loop detected -->
2337 Template from main namespace
2356 BUG 529: Template with table, not included at beginning of line
2373 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2391 BUG 41: Template parameters shown as broken links
2403 ''None'' of '''this''' should be
2405 but rather passed unmodified
2409 # hmm, fix this or just deprecate msgnw and document its behavior?
2415 {{msgnw:MSGNW test}}
2417 <p>''None'' of '''this''' should be
2419 but rather passed unmodified
2427 {{int:youhavenewmessages|lots of money|not!}}
2429 <p>You have lots of money (not!).
2436 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2440 <includeonly> and <noinclude> being included
2451 <onlyinclude>Foo</onlyinclude>bar
2455 <onlyinclude> being included
2467 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2471 <onlyinclude> and <includeonly> being included
2480 <includeonly> and <noinclude> on a page
2482 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2489 <onlyinclude> on a page
2491 <onlyinclude>Foo</onlyinclude>bar
2498 ### Pre-save transform tests
2501 pre-save transform: subst:
2507 This is a test template
2511 pre-save transform: normal template
2521 pre-save transform: nonexistant template
2525 {{thistemplatedoesnotexist}}
2527 {{thistemplatedoesnotexist}}
2532 pre-save transform: subst magic variables
2541 # This is bug 89, which I fixed. -- wtm
2543 pre-save transform: subst: templates with parameters
2547 {{subst:paramtest|param="something else"}}
2549 This is a test template with parameter "something else"
2555 <nowiki>'''not wiki'''</nowiki>
2559 pre-save transform: nowiki in subst (bug 1188)
2563 {{subst:nowikitest}}
2565 <nowiki>'''not wiki'''</nowiki>
2570 Template:commenttest
2572 This template has <!-- a comment --> in it.
2576 pre-save transform: comment in subst (bug 1936)
2580 {{subst:commenttest}}
2582 This template has <!-- a comment --> in it.
2586 pre-save transform: unclosed tag
2590 <nowiki>'''not wiki'''
2592 <nowiki>'''not wiki'''
2596 pre-save transform: mixed tag case
2600 <NOwiki>'''not wiki'''</noWIKI>
2602 <NOwiki>'''not wiki'''</noWIKI>
2606 pre-save transform: unclosed comment in <nowiki>
2610 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2612 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2618 <span onmouseover="alert('crap')">Oh no</span>
2622 (confirming safety of fix for subst bug 1936)
2624 {{Template:dangerous}}
2626 <p><span>Oh no</span>
2631 pre-save transform: comment containing gallery (bug 5024)
2635 <!-- <gallery>data</gallery> -->
2637 <!-- <gallery>data</gallery> -->
2641 pre-save transform: comment containing extension
2645 <!-- <tag>data</tag> -->
2647 <!-- <tag>data</tag> -->
2651 pre-save transform: comment containing nowiki
2655 <!-- <nowiki>data</nowiki> -->
2657 <!-- <nowiki>data</nowiki> -->
2661 pre-save transform: comment containing math
2665 <!-- <math>data</math> -->
2667 <!-- <math>data</math> -->
2671 pre-save transform: <noinclude> in subst (bug 3298)
2681 pre-save transform: <onlyinclude> in subst (bug 3298)
2691 pre-save transform: context links ("pipe trick")
2695 [[Article (context)|]]
2698 [[Bar:Article (context)|]]
2699 [[:Bar:Article (context)|]]
2701 [[|Article (context)]]
2705 [[Article (context)|Article]]
2706 [[Bar:Article|Article]]
2707 [[:Bar:Article|Article]]
2708 [[Bar:Article (context)|Article]]
2709 [[:Bar:Article (context)|Article]]
2711 [[Article (context)]]
2712 [[Bar:X (Y) Z|X (Y) Z]]
2713 [[:Bar:X (Y) Z|X (Y) Z]]
2717 pre-save transform: context links ("pipe trick") with interwiki prefix
2721 [[interwiki:Article|]]
2722 [[:interwiki:Article|]]
2723 [[interwiki:Bar:Article|]]
2724 [[:interwiki:Bar:Article|]]
2726 [[interwiki:Article|Article]]
2727 [[:interwiki:Article|Article]]
2728 [[interwiki:Bar:Article|Bar:Article]]
2729 [[:interwiki:Bar:Article|Bar:Article]]
2733 pre-save transform: context links ("pipe trick") with parens in title
2735 pst title=[[Somearticle (context)]]
2739 [[Article (context)|Article]]
2743 pre-save transform: context links ("pipe trick") with comma in title
2745 pst title=[[Someplace, Somewhere]]
2748 [[Otherplace, Elsewhere|]]
2749 [[Otherplace, Elsewhere, Anywhere|]]
2751 [[Otherplace, Somewhere|Otherplace]]
2752 [[Otherplace, Elsewhere|Otherplace]]
2753 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
2757 pre-save transform: context links ("pipe trick") with parens and comma
2759 pst title=[[Someplace (IGNORED), Somewhere]]
2762 [[Otherplace (place), Elsewhere|]]
2764 [[Otherplace, Somewhere|Otherplace]]
2765 [[Otherplace (place), Elsewhere|Otherplace]]
2769 pre-save transform: context links ("pipe trick") with comma and parens
2771 pst title=[[Who, me? (context)]]
2774 [[Me, Myself, and I (1937 song)|]]
2776 [[Yes, you. (context)|Yes, you.]]
2777 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
2781 pre-save transform: context links ("pipe trick") with namespace
2783 pst title=[[Ns:Somearticle]]
2787 [[Ns:Article|Article]]
2791 pre-save transform: context links ("pipe trick") with namespace and parens
2793 pst title=[[Ns:Somearticle (context)]]
2797 [[Ns:Article (context)|Article]]
2801 pre-save transform: context links ("pipe trick") with namespace and comma
2803 pst title=[[Ns:Somearticle, Context, Whatever]]
2807 [[Ns:Article, Context, Whatever|Article]]
2811 pre-save transform: context links ("pipe trick") with namespace, comma and parens
2813 pst title=[[Ns:Somearticle, Context (context)]]
2817 [[Ns:Article (context)|Article]]
2821 pre-save transform: context links ("pipe trick") with namespace, parens and comma
2823 pst title=[[Ns:Somearticle (IGNORED), Context]]
2827 [[Ns:Article, Context|Article]]
2832 ### Message transform tests
2835 message transform: magic variables
2845 message transform: should not transform wiki markup
2855 TODO: message transform: <noinclude> in transcluded template (bug 4926)
2865 TODO: message transform: <onlyinclude> in transcluded template (bug 4926)
2875 {{#special:}} page name, known
2879 {{#special:Recentchanges}}
2881 Special:Recentchanges
2885 {{#special:}} page name, unknown
2889 {{#special:foobarnonexistent}}
2891 No such special page
2900 [[Image:foobar.jpg]]
2902 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2909 [[Image:foobar.jpg|right]]
2911 <div class="floatright"><span><a href="/wiki/Image:Foobar.jpg" class="image" title=""><img src="http://example.com/images/3/3a/Foobar.jpg" alt="" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div>
2918 [[Image:foobar.jpg|right|Caption text]]
2920 <div class="floatright"><span><a href="/wiki/Image:Foobar.jpg" class="image" title="Caption text"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="Caption text" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div>
2925 Image with frame and link
2927 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2929 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="This is a test image Main Page"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="This is a test image Main Page" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" 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>
2934 Link to image page- image page normally doesn't exists, hence edit link
2935 TODO: Add test with existing image page
2936 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2940 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2945 Frameless image caption with a free URL
2947 [[Image:foobar.jpg|http://example.com]]
2949 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="http://example.com"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="http://example.com" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
2954 Thumbnail image caption with a free URL
2956 [[Image:foobar.jpg|thumb|http://example.com]]
2958 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="http://example.com"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="http://example.com" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" 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>
2963 BUG 1887: A ISBN with a thumbnail
2965 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
2967 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="ISBN 1235467890"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="ISBN 1235467890" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" 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>
2972 BUG 1887: A RFC with a thumbnail
2974 [[Image:foobar.jpg|thumb|This is RFC 12354]]
2976 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="This is RFC 12354"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="This is RFC 12354" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" 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>
2981 BUG 1887: A mailto link with a thumbnail
2983 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
2985 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="Please mailto:nobody@example.com"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="Please mailto:nobody@example.com" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" 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>
2990 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
2991 so math is not stripped and turns up as escaped <math> tags.
2993 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2995 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="<math>2+2</math>"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="<math>2+2</math>" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" 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>
3000 BUG 1887, part 2: A <math> with a thumbnail- math enabled
3004 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
3006 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="2 + 2"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="2 + 2" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" 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>
3010 # Pending resolution to bug 368
3012 BUG 648: Frameless image caption with a link
3014 [[Image:foobar.jpg|text with a [[link]] in it]]
3016 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a link in it"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="text with a link in it" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
3021 BUG 648: Frameless image caption with a link (suffix)
3023 [[Image:foobar.jpg|text with a [[link]]foo in it]]
3025 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a linkfoo in it"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="text with a linkfoo in it" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
3030 BUG 648: Frameless image caption with an interwiki link
3032 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
3034 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="text with a MeatBall:Link in it" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
3039 BUG 648: Frameless image caption with a piped interwiki link
3041 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
3043 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="text with a link in it"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="text with a link in it" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
3048 Escape HTML special chars in image alt text
3050 [[Image:foobar.jpg|& < > "]]
3052 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="& < > ""><img src="http://example.com/images/3/3a/Foobar.jpg" alt="& < > "" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
3057 BUG 499: Alt text should have Ӓ, not &1234;
3059 [[Image:foobar.jpg|♀]]
3061 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="♀"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="♀" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
3066 Broken image caption with link
3068 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
3070 <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.
3075 Image caption containing another image
3077 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
3079 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="This is a caption with another Image:Icon.png inside it!"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="This is a caption with another Image:Icon.png inside it!" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" 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>
3084 Image caption containing a newline
3086 [[Image:Foobar.jpg|This
3089 <p><a href="/wiki/Image:Foobar.jpg" class="image" title="This *is some text"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="This *is some text" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
3095 Bug 3090: External links other than http: in image captions
3097 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
3099 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="This caption has irc and Secure ext links in it."><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" alt="This caption has irc and Secure ext links in it." width="200" height="23" longdesc="/wiki/Image:Foobar.jpg" 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>
3108 Subpage test/subpage
3116 subpage title=[[Subpage test]]
3120 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
3125 Subpage noslash link
3127 subpage title=[[Subpage test]]
3131 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
3140 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
3145 BUG 561: {{/Subpage}}
3147 subpage title=[[Page]]
3151 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
3159 Category:MediaWiki User's Guide
3167 [[:Category:MediaWiki User's Guide]]
3169 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
3178 [[Category:MediaWiki User's Guide]]
3180 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
3184 ### Inter-language links
3187 Inter-language links
3193 [[zh:食品]]
3195 es:Alimento fr:Nourriture zh:食品
3202 Basic section headings
3209 ===Smaller headline===
3212 <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>
3215 <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>
3218 <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>
3224 Section headings with TOC
3227 === Subheadline 1 ===
3228 ===== Skipping a level =====
3229 ====== Skipping a level ======
3233 ===Another headline===
3235 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3237 <li class="toclevel-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
3239 <li class="toclevel-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
3241 <li class="toclevel-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
3243 <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>
3250 <li class="toclevel-1"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
3252 <li class="toclevel-2"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
3256 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3257 <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>
3258 <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>
3259 <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>
3260 <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>
3261 <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>
3264 <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>
3268 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
3270 Handling of sections up to level 6 and beyond
3273 == Level 2 Heading==
3274 === Level 3 Heading===
3275 ==== Level 4 Heading====
3276 ===== Level 5 Heading=====
3277 ====== Level 6 Heading======
3278 ======= Level 7 Heading=======
3279 ======== Level 8 Heading========
3280 ========= Level 9 Heading=========
3281 ========== Level 10 Heading==========
3283 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3285 <li class="toclevel-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
3287 <li class="toclevel-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
3289 <li class="toclevel-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
3291 <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>
3293 <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>
3295 <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>
3296 <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>
3297 <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>
3298 <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>
3299 <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>
3311 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3312 <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>
3313 <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>
3314 <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>
3315 <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>
3316 <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>
3317 <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>
3318 <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>
3319 <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>
3320 <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>
3321 <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>
3326 Resolving duplicate section names
3331 <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>
3332 <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>
3344 Template with sections, __NOTOC__
3351 <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>
3352 <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>
3353 <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>
3354 <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>
3359 __NOEDITSECTION__ keyword
3365 <a name="Section_1"></a><h2> <span class="mw-headline">Section 1</span></h2>
3366 <a name="Section_2"></a><h2> <span class="mw-headline">Section 2</span></h2>
3371 Link inside a section heading
3373 ==Section with a [[Main Page|link]] in it==
3375 <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>
3381 BUG 1219 URL next to image (good)
3383 http://example.com [[Image:foobar.jpg]]
3385 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a> <a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
3390 BUG 1219 URL next to image (broken)
3392 http://example.com[[Image:foobar.jpg]]
3394 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a><a href="/wiki/Image:Foobar.jpg" class="image" title="Image:foobar.jpg"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="Image:foobar.jpg" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a>
3399 Bug 1186 news: in the middle of text
3401 http://en.wikinews.org/wiki/Wikinews:Workplace
3403 <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>
3409 Namespaced link must have a title
3418 Namespaced link must have a title (bad fragment version)
3420 [[Project:#fragment]]
3422 <p>[[Project:#fragment]]
3428 div with no attributes
3430 <div>HTML rocks</div>
3432 <div>HTML rocks</div>
3437 div with double-quoted attribute
3439 <div id="rock">HTML rocks</div>
3441 <div id="rock">HTML rocks</div>
3446 div with single-quoted attribute
3448 <div id='rock'>HTML rocks</div>
3450 <div id="rock">HTML rocks</div>
3455 div with unquoted attribute
3457 <div id=rock>HTML rocks</div>
3459 <div id="rock">HTML rocks</div>
3464 div with illegal double attributes
3466 <div align="center" align="right">HTML rocks</div>
3468 <div align="right">HTML rocks</div>
3473 HTML multiple attributes correction
3475 <p class="error" class="awesome">Awesome!</p>
3477 <p class="awesome">Awesome!</p>
3482 Table multiple attributes correction
3485 !+ class="error" class="awesome"| status
3490 <th class="awesome"> status
3498 <DIV ALIGN="center">HTML ROCKS</DIV>
3500 <div align="center">HTML ROCKS</div>
3506 text with amp in the middle of nowhere
3510 <p>Remember AT&T?
3515 text with character entity: eacute
3517 I always thought é was a cute letter.
3519 <p>I always thought é was a cute letter.
3524 text with undefined character entity: xacute
3526 I always thought &xacute; was a cute letter.
3528 <p>I always thought &xacute; was a cute letter.
3540 [[Media:Foobar.jpg]]
3542 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
3547 Media link with text
3549 [[Media:Foobar.jpg|A neat file to look at]]
3551 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
3555 # FIXME: this is still bad HTML tag nesting
3557 Media link with nasty text
3558 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3560 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3562 <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>
3567 Media link to nonexistent file (bug 1702)
3569 [[Media:No such.jpg]]
3571 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
3576 Image link to nonexistent file (bug 1850 - good)
3578 [[Image:No such.jpg]]
3580 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3585 :Image link to nonexistent file (bug 1850 - bad)
3587 [[:Image:No such.jpg]]
3589 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3596 Character reference normalization in link text (bug 1938)
3598 [[Main Page|this&that]]
3600 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3605 Empty attribute crash test (bug 2067)
3607 <font color="">foo</font>
3609 <p><font color="">foo</font>
3614 Empty attribute crash test single-quotes (bug 2067)
3616 <font color=''>foo</font>
3618 <p><font color="">foo</font>
3623 Attribute test: equals, then nothing
3625 <font color=>foo</font>
3632 Attribute test: unquoted value
3634 <font color=x>foo</font>
3636 <p><font color="x">foo</font>
3641 Attribute test: unquoted but illegal value (hash)
3643 <font color=#x>foo</font>
3645 <p><font color="#x">foo</font>
3650 Attribute test: no value
3652 <font color>foo</font>
3654 <p><font color="color">foo</font>
3659 Bug 2095: link with three closing brackets
3663 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3668 Bug 2095: link with pipe and three closing brackets
3672 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3677 Bug 2095: link with pipe and three closing brackets, version 2
3679 [[Main Page|[http://example.com/]]]
3681 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3691 Template:Dangerous attribute
3693 " onmouseover="alert(document.cookie)
3697 Template:Dangerous style attribute
3699 border-size: expression(alert(document.cookie))
3705 <div style="float: right; {{{1}}}">Magic div</div>
3709 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3711 <div title="{{test}}"></div>
3713 <div title="This is a test template"></div>
3718 Bug 2304: HTML attribute safety (dangerous template; 2309)
3720 <div title="{{dangerous attribute}}"></div>
3722 <div title=""></div>
3727 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3729 <div style="{{dangerous style attribute}}"></div>
3736 Bug 2304: HTML attribute safety (safe parameter; 2309)
3738 {{div style|width: 200px}}
3740 <div style="float: right; width: 200px">Magic div</div>
3745 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3747 {{div style|width: expression(alert(document.cookie))}}
3749 <div>Magic div</div>
3754 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3756 {{div style|"><script>alert(document.cookie)</script>}}
3758 <div>Magic div</div>
3763 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3765 {{div style|" ><script>alert(document.cookie)</script>}}
3767 <div style="float: right;">Magic div</div>
3772 Bug 2304: HTML attribute safety (link)
3774 <div title="[[Main Page]]"></div>
3776 <div title="[[Main Page]]"></div>
3781 Bug 2304: HTML attribute safety (italics)
3783 <div title="''foobar''"></div>
3785 <div title="''foobar''"></div>
3790 Bug 2304: HTML attribute safety (bold)
3792 <div title="'''foobar'''"></div>
3794 <div title="'''foobar'''"></div>
3800 Bug 2304: HTML attribute safety (ISBN)
3802 <div title="ISBN 1234567890"></div>
3804 <div title="ISBN 1234567890"></div>
3809 Bug 2304: HTML attribute safety (RFC)
3811 <div title="RFC 1234"></div>
3813 <div title="RFC 1234"></div>
3818 Bug 2304: HTML attribute safety (PMID)
3820 <div title="PMID 1234567890"></div>
3822 <div title="PMID 1234567890"></div>
3827 Bug 2304: HTML attribute safety (web link)
3829 <div title="http://example.com/"></div>
3831 <div title="http://example.com/"></div>
3836 Bug 2304: HTML attribute safety (named web link)
3838 <div title="[http://example.com/ link]"></div>
3840 <div title="[http://example.com/ link]"></div>
3845 Bug 3244: HTML attribute safety (extension; safe)
3847 <div style="<nowiki>background:blue</nowiki>"></div>
3849 <div style="background:blue"></div>
3854 Bug 3244: HTML attribute safety (extension; unsafe)
3856 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3863 Math section safety when disabled
3865 <math><script>alert(document.cookies);</script></math>
3867 <p><math><script>alert(document.cookies);</script></math>
3871 # More MSIE fun discovered by Tom Gilder
3874 MSIE CSS safety test: spurious slash
3876 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3883 MSIE CSS safety test: hex code
3885 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3892 MSIE CSS safety test: comment in url
3894 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3896 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3901 MSIE CSS safety test: comment in expression
3903 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3905 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3911 Table attribute legitimate extension
3914 !+ style="<nowiki>color:blue</nowiki>"| status
3919 <th style="color:blue"> status
3925 Table attribute safety
3928 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3946 Expansion of multi-line templates in attribute values (bug 6255)
3948 <div style="background: {{identity|#00FF00}}">-</div>
3950 <div style="background: #00FF00">-</div>
3956 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
3958 <div style="background:
3961 <div style="background: #00FF00">-</div>
3966 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
3968 <div style="background: #00FF00">-</div>
3970 <div style="background: #00FF00">-</div>
3975 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3978 Parser hook: empty input
3991 Parser hook: empty input using terminated empty elements
4004 Parser hook: empty input using terminated empty elements (space before)
4017 Parser hook: basic input
4031 Parser hook: case insensetive
4045 Parser hook: case insensetive, redux
4058 Parser hook: nested tags
4062 <tag><tag></tag></tag>
4073 Parser hook: basic arguments
4075 <tag width=200 height = "100" depth = '50' square></tag>
4094 Parser hook: argument containing a forward slash (bug 5344)
4096 <tag filename='/tmp/bla'></tag>
4102 string(8) "/tmp/bla"
4109 Parser hook: empty input using terminated empty elements (bug 2374)
4123 # </tag> should be output literally since there is no matching tag that begins it
4125 Parser hook: basic arguments using terminated empty elements (bug 2374)
4127 <tag width=200 height = "100" depth = '50' square/>
4150 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
4154 Parser hook: static parser hook not inside a comment
4156 <statictag>hello, world</statictag>
4157 <statictag action=flush/>
4165 Parser hook: static parser hook inside a comment
4167 <!-- <statictag>hello, world</statictag> -->
4168 <statictag action=flush/>
4174 # Nested template calls; this case was broken by Parser.php rev 1.506,
4178 Template:One-parameter
4180 (My parameter is: {{{1}}})
4184 Template:Map-one-parameter
4190 Nested template calls
4192 {{Map-one-parameter|One-parameter|param}}
4194 <p>(My parameter is: param)
4203 Sanitizer: Closing of open tags
4205 <s></s><table></table>
4207 <s></s><table></table>
4212 Sanitizer: Closing of open but not closed tags
4221 Sanitizer: Closing of closed but not open tags
4230 Sanitizer: Closing of closed but not open table tags
4232 Table not started</td></tr></table>
4234 <p>Table not started</td></tr></table>
4239 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
4241 <span id="æ: v">byte</span>[[#æ: v|backlink]]
4243 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
4248 Sanitizer: Validating the contents of the id attribute (bug 4515)
4254 Something, but defenetly not <br id="9" />...
4258 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
4262 <br id="foo" /><br id="foo" />
4264 Something need to be done. foo-2 ?
4268 Language converter: output gets cut off unexpectedly (bug 5757)
4272 this bit is safe: }-
4274 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
4276 then we get cut off here: }-
4278 all additional text is vanished
4280 <p>this bit is safe: }-
4281 </p><p>but if we add a conversion instance: xxx
4282 </p><p>then we get cut off here: }-
4283 </p><p>all additional text is vanished
4288 Self closed html pairs (bug 5487)
4291 <center><font id="bug" />Centered text</center>
4292 <div><font id="bug2" />In div text</div>
4294 <center><font id="bug" />Centered text</center>
4295 <div><font id="bug2" />In div text</div>
4304 HTML bullet list, closed tags (bug 5497)
4319 TODO: HTML bullet list, unclosed tags (bug 5497)
4334 HTML ordered list, closed tags (bug 5497)
4349 TODO: HTML ordered list, unclosed tags (bug 5497)
4364 HTML nested bullet list, closed tags (bug 5497)
4389 TODO: HTML nested bullet list, open tags (bug 5497)
4412 HTML nested ordered list, closed tags (bug 5497)
4437 TODO: HTML nested ordered list, open tags (bug 5497)
4460 HTML ordered list item with parameters oddity
4462 <ol><li id="fragment">One</li></ol>
4464 <ol><li id="fragment">One</li></ol>
4469 bug 5918: autonumbering
4471 [http://first/] [http://second] [ftp://ftp]
4475 [mailto:enclosed@mail.tld With target]
4477 [mailto:enclosed@mail.tld]
4479 mailto:inline@mail.tld
4481 <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>
4482 </p><p><a href="ftp://inlineftp" class="external free" title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4483 </p><p><a href="mailto:enclosed@mail.tld" class="external text" title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4484 </p><p><a href="mailto:enclosed@mail.tld" class="external autonumber" title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4485 </p><p><a href="mailto:inline@mail.tld" class="external free" title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4491 # Security and HTML correctness
4492 # From Nick Jenkins' fuzz testing
4496 Fuzz testing: Parser13
4511 Fuzz testing: Parser14
4516 <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>
4517 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4519 <li class="toclevel-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4521 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4526 Fuzz testing: Parser14-table
4531 <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>
4532 <table style="__TOC__">
4538 # Known to produce bogus xml (extra </td>)
4540 Fuzz testing: Parser16
4549 <th>https://</th><th></th><th></th><th>
4557 Fuzz testing: Parser21
4560 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4565 <th> <a href="irc://{{ftp://a" class="external free" title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4574 Fuzz testing: Parser22
4576 http://===r:::https://b
4580 <p><a href="http://===r:::https://b" class="external free" title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4588 # Known to produce bad XML for now
4590 Fuzz testing: Parser24
4597 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4598 <br style="onmouseover='alert(document.cookie);' " />
4600 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4605 <u class="|">} >
4606 <br style="onmouseover='alert(document.cookie);'" />
4608 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4617 # Known to produce bad XML for now
4619 Fuzz testing: Parser25 (bug 6055)
4627 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4629 <li class="||">
4630 blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4635 Fuzz testing: URL adjacent extension (with space, clean)
4638 http://example.com <nowiki>junk</nowiki>
4640 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a> junk
4645 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4648 http://example.com<nowiki>junk</nowiki>
4650 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>junk
4655 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4658 http://example.com<pre>junk</pre>
4660 <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>
4665 Fuzz testing: image with bogus manual thumbnail
4667 [[Image:foobar.jpg|thumbnail= ]]
4669 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title=""><img src="http://example.com/images/3/3a/Foobar.jpg" alt="" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" 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></div></div></div>
4674 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
4676 <pre dir=" "></pre>
4678 <pre dir=" "></pre>
4683 TODO: Parsing optional HTML elements (Bug 6171)
4688 <td> Some tabular data</td>
4689 <td> More tabular data ...
4690 <td> And yet som tabular data</td>
4696 <td> Some tabular data</td>
4697 <td> More tabular data ...
4698 </td><td> And yet som tabular data</td>
4705 Correct handling of <td>, <tr> (Bug 6171)
4710 <td> Some tabular data</td>
4711 <td> More tabular data ...</td>
4712 <td> And yet som tabular data</td>
4718 <td> Some tabular data</td>
4719 <td> More tabular data ...</td>
4720 <td> And yet som tabular data</td>
4728 Parsing crashing regression (fr:JavaScript)
4732 <p></body></x>
4737 Inline wiki vs wiki block nesting
4743 <p><b>Bold paragraph</b>
4744 </p><p>New wiki paragraph
4749 TODO: Inline HTML vs wiki block nesting
4755 <p><b>Bold paragraph</b>
4756 </p><p>New wiki paragraph
4762 TODO: Mixing markup for italics and bold
4765 '''bold''''''bold''bolditalics'''''
4767 <p><b>bold</b><b>bold<i>bolditalics</i></b>
4775 Article for special page transclusion test
4779 Special page transclusion
4782 {{Special:Prefixindex/Xyzzyx}}
4786 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4791 Special page transclusion twice (bug 5021)
4794 {{Special:Prefixindex/Xyzzyx}}
4795 {{Special:Prefixindex/Xyzzyx}}
4799 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4802 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4807 Transclusion of default MediaWiki message
4809 {{MediaWiki:Mainpage}}
4816 Transclusion of nonexistent MediaWiki message
4818 {{MediaWiki:Mainpagexxx}}
4820 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit" class="new" title="MediaWiki:Mainpagexxx">MediaWiki:Mainpagexxx</a>
4825 Transclusion of MediaWiki message with underscore
4827 {{MediaWiki:history_short}}
4834 Transclusion of MediaWiki message with space
4836 {{MediaWiki:history short}}
4843 Invalid header with following text
4853 Section extraction test (section 0)
4873 Section extraction test (section 1)
4895 Section extraction test (section 2)
4916 Section extraction test (section 3)
4936 Section extraction test (section 4)
4960 Section extraction test (section 5)
4980 Section extraction test (section 6)
5001 Section extraction test (section 7)
5021 Section extraction test (section 8)
5041 Section extraction test (section 9)
5062 Section extraction test (section 10)
5082 Section extraction test (nonexistent section 11)
5101 Section extraction test with bogus heading (section 1)
5106 ==bogus== not a legal section
5110 ==bogus== not a legal section
5114 Section extraction test with bogus heading (section 2)
5119 ==bogus== not a legal section
5126 Section extraction test with comment after heading (section 1)
5131 ==legal== <!-- a legal section -->
5138 Section extraction test with comment after heading (section 2)
5143 ==legal== <!-- a legal section -->
5146 ==legal== <!-- a legal section -->
5150 Section extraction test with bogus <nowiki> heading (section 1)
5155 ==bogus== <nowiki>not a legal section</nowiki>
5159 ==bogus== <nowiki>not a legal section</nowiki>
5163 Section extraction test with bogus <nowiki> heading (section 2)
5168 ==bogus== <nowiki>not a legal section</nowiki>
5176 Section extraction prefixed by comment (section 1) (bug 2587)
5187 Section extraction prefixed by comment (section 2) (bug 2587)
5199 Section extraction, mixed wiki and html (section 1) (bug 2607)
5215 Section extraction, mixed wiki and html (section 2) (bug 2607)
5232 Section extraction, heading surrounded by <noinclude> (bug 3342)
5236 <noinclude>==a==</noinclude>
5239 <noinclude>==a==</noinclude>
5245 Section extraction, HTML heading subsections (bug 5272)
5258 Section extraction, HTML headings should be ignored in extensions (bug 3476)
5272 Section replacement test (section 0)
5303 Section replacement test (section 1)
5332 Section replacement test (section 2)
5362 Section replacement test (section 3)
5393 Section replacement test (section 4)
5420 Section replacement test (section 5)
5451 Section replacement test (section 6)
5481 Section replacement test (section 7)
5512 Section replacement test (section 8)
5543 Section replacement test (section 9)
5572 Section replacement test (section 10)
5603 Section extraction, HTML headings not at line boundaries (section 0)
5607 <h2>Evil</h2><i>blah blah blah</i>
5615 <i>extra evil</i><h2>Extra nasty</h2>
5622 Section extraction, HTML headings not at line boundaries (section 1)
5626 <h2>Evil</h2><i>blah blah blah</i>
5634 <i>extra evil</i><h2>Extra nasty</h2>
5638 <h2>Evil</h2><i>blah blah blah</i>
5644 Section extraction, HTML headings not at line boundaries (section 2)
5648 <h2>Evil</h2><i>blah blah blah</i>
5656 <i>extra evil</i><h2>Extra nasty</h2>
5668 Section extraction, HTML headings not at line boundaries (section 3)
5672 <h2>Evil</h2><i>blah blah blah</i>
5680 <i>extra evil</i><h2>Extra nasty</h2>
5684 <h2>Extra nasty</h2>
5691 Section extraction, heading followed by pre with 20 spaces (bug 6398)
5703 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
5715 Handling of 
 in URLs
5719 <ul><li><ul><li><a href="irc://%0Aa" class="external free" title="irc://%0Aa" rel="nofollow">irc://%0Aa</a>
5726 TODO: 5 quotes, code coverage +1 line
5733 Special:Search page linking.
5737 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
5752 * {{SUBJECTPAGENAME}}
5753 * {{SUBJECTPAGENAMEE}}
5760 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
5762 <ul><li> Parser test
5763 </li><li> Parser test
5764 </li><li> Parser test
5765 </li><li> Parser_test
5766 </li><li> Parser test
5767 </li><li> Parser_test
5768 </li><li> Talk:Parser test
5769 </li><li> Talk:Parser_test
5770 </li><li> Parser test
5771 </li><li> Parser_test
5778 </li><li> <a href="/index.php?title=Template:Dynamic&action=edit" class="new" title="Template:Dynamic">Template:Dynamic</a>
5782 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
5792 image4 |300px| centre
5793 image5.svg| http://///////
5798 <table class="gallery" cellspacing="0" cellpadding="0"><tr><td><div class="gallerybox"><div style="height: 152px;">Image1.png</div><div class="gallerytext">
5800 <td><div class="gallerybox"><div style="height: 152px;">Image2.gif</div><div class="gallerytext">
5801 ||||</div></div></td>
5802 <td><div class="gallerybox"><div style="height: 152px;">Image3</div><div class="gallerytext">
5804 <td><div class="gallerybox"><div style="height: 152px;">Image4</div><div class="gallerytext">
5805 300px| centre</div></div></td>
5806 </tr><tr><td><div class="gallerybox"><div style="height: 152px;">Image5.svg</div><div class="gallerytext">
5807 <a href="http://///////" class="external free" title="http://///////" rel="nofollow">http://///////</a></div></div></td>
5808 <td><div class="gallerybox"><div style="height: 152px;">* image6</div><div class="gallerytext">
5816 HTML Hex character encoding (spells the word "JavaScript")
5818 JavaScript
5820 <p>JavaScript
5825 __FORCETOC__ override
5837 ISBN 978-0-1234-56 789
5839 <p><a href="/index.php?title=Special:Booksources&isbn=9780123456" class="internal">ISBN 978-0-1234-56</a> 789
5844 ISBN followed by 5 spaces
5855 ISBN ISBN 1234567890
5857 <p>ISBN <a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1234567890</a>
5866 <p>RFC <a href="http://tools.ietf.org/html/rfc1234" class="external" title="http://tools.ietf.org/html/rfc1234">RFC 1234</a>
5871 Double RFC with a wiki link
5875 <p>RFC <a href="/index.php?title=RFC_1234&action=edit" class="new" title="RFC 1234">RFC 1234</a>
5884 <p><a href="http://tools.ietf.org/html/rfc983" class="external" title="http://tools.ietf.org/html/rfc983">RFC 983</a> 987
5889 Centre-aligned image
5891 [[Image:foobar.jpg|centre]]
5893 <div class="center"><div class="floatnone"><span><a href="/wiki/Image:Foobar.jpg" class="image" title=""><img src="http://example.com/images/3/3a/Foobar.jpg" alt="" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div></div>
5900 [[Image:foobar.jpg|none]]
5902 <div class="floatnone"><span><a href="/wiki/Image:Foobar.jpg" class="image" title=""><img src="http://example.com/images/3/3a/Foobar.jpg" alt="" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div>
5907 Width + Height sized image (using px) (height is ignored)
5909 [[Image:foobar.jpg|640x480px]]
5911 <p><a href="/wiki/Image:Foobar.jpg" class="image" title=""><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" alt="" width="640" height="73" longdesc="/wiki/Image:Foobar.jpg" /></a>
5916 Another italics / bold test
5924 # Note the results may be incorrect, as parserTest output included this:
5925 # XML error: Mismatched tag at byte 6120:
5926 # ...<dd> </dt></dl> </dd...
5932 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
5943 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
5945 TODO: Images with the "|" character in the comment
5947 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
5949 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="An external URL"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="An external URL" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" 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>
5954 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
5956 <html><script>alert(1);</script></html>
5958 <p><html><script>alert(1);</script></html>
5963 HTML with raw HTML ($wgRawHtml==true)
5967 <html><script>alert(1);</script></html>
5969 <p><script>alert(1);</script>
5974 Parents of subpages, one level up
5976 subpage title=[[Subpage test/L1/L2/L3]]
5980 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit" class="new" title="Subpage test/L1/L2">L2</a>
5986 Parents of subpages, one level up, not named
5988 subpage title=[[Subpage test/L1/L2/L3]]
5992 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit" class="new" title="Subpage test/L1/L2">Subpage test/L1/L2</a>
5999 Parents of subpages, two levels up
6002 subpage title=[[Subpage test/L1/L2/L3]]
6006 <p><a href="/index.php?title=Subpage_test/L1&action=edit" class="new" title="Subpage test/L1">L1</a>
6011 # Question: should result be "/index.php?title=Subpage_test/L1&action=edit" instead?
6013 TODO: Parents of subpages, two levels up, without trailing slash or name.
6015 subpage title=[[Subpage test/L1/L2/L3]]
6019 <p><a href="/index.php?title=Subpage_test/L1/L2/..&action=edit" class="new" title="Subpage test/L1">../..</a>
6023 # Question: Why should the link text in the above test be "../..", yet in this test the "../.." part is silently dropped?
6024 # Current result: <p><a href="/index.php?title=Subpage_test/L1////&action=edit" class="new" title="Subpage test/L1////">///
6026 TODO: Parents of subpages, two levels up, with lots of extra trailing slashes.
6028 subpage title=[[Subpage test/L1/L2/L3]]
6032 <p><a href="/index.php?title=Subpage_test/L1&action=edit" class="new" title="Subpage test/L1">Subpage test/L1</a>
6037 Definition list code coverage
6043 <dl><dt> title </dt><dd> def
6044 </dd><dt> title </dt><dd> def
6045 </dd><dt>title</dt><dd> def
6051 TODO: Don't fall for the self-closing div
6053 <div>hello world</div/>
6055 <div>hello world</div>
6064 <p>[[:Template:Msg]]
6073 <p><a href="/index.php?title=Template:QUERTY&action=edit" class="new" title="Template:QUERTY">Template:QUERTY</a>
6077 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
6079 Always escape literal '>' in output, not just after '<'
6093 <p>This is a test template
6094 This is a test template
6106 Inclusion of !userCanEdit() content
6110 <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>
6116 Out-of-order TOC heading levels
6125 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
6127 <li class="toclevel-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
6129 <li class="toclevel-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
6130 <li class="toclevel-2"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
6133 <li class="toclevel-1"><a href="#1_7"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
6135 <li class="toclevel-2"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
6136 <li class="toclevel-2"><a href="#2_4"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
6140 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
6141 <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>
6142 <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>
6143 <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>
6144 <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>
6145 <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>
6146 <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>
6152 ISBN with a dummy number
6162 ISBN with space-delimited number
6166 <p><a href="/index.php?title=Special:Booksources&isbn=9290170328" class="internal">ISBN 92 9017 032 8</a>
6172 ISBN with multiple spaces, no number
6191 </p><p><a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1234567890</a>
6192 </p><p>ISBN 12345678901
6198 ISBN with trailing year (bug 8110)
6200 ISBN 1-234-56789-0 - 2006
6202 ISBN 1 234 56789 0 - 2006
6204 <p><a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1-234-56789-0</a> - 2006
6205 </p><p><a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1 234 56789 0</a> - 2006
6211 Pages in namespace (Magic word disabled currently)
6213 {{PAGESINNAMESPACE:}}
6222 {{anchorencode:foo bar©#%n}}
6224 <p>foo_bar.C2.A9.23.25n
6230 Bug 8293: Use of center tag ruins paragraph formatting
6252 ### Language variants related tests
6255 Self-link in language variants
6257 title=[[Dunav]] language=sr
6259 Both [[Dunav]] and [[Дунав]] are names for this river.
6261 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
6267 Link to pages in language variants
6271 Main Page can be written as [[Маин Паге]]
6273 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
6279 Multiple links to pages in language variants
6283 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
6285 <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>.
6291 Simple template in language variants
6297 <p>This is a test template
6303 Template with explicit namespace in language variants
6309 <p>This is a test template
6315 Basic test for template parameter in language variants
6319 {{парамтест|param=foo}}
6321 <p>This is a test template with parameter foo
6327 Simple category in language variants
6331 [[:Category:МедиаWики Усер'с Гуиде]]
6333 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
6338 Stripping -{}- tags (language variants)
6342 Latin proverb: -{Ne nuntium necare}-
6344 <p>Latin proverb: Ne nuntium necare
6350 Prevent conversion with -{}- tags (language variants)
6352 language=sr variant=sr-ec
6354 Latinski: -{Ne nuntium necare}-
6356 <p>Латински: Ne nuntium necare
6362 Prevent conversion of text with -{}- tags (language variants)
6364 language=sr variant=sr-ec
6366 Latinski: -{Ne nuntium necare}-
6368 <p>Латински: Ne nuntium necare
6374 Prevent conversion of links with -{}- tags (language variants)
6376 language=sr variant=sr-ec
6380 <p><a href="/index.php?title=Main_Page&variant=sr-ec" title="Main Page">Main Page</a>
6386 -{}- tags within headlines (within html for parserConvert())
6388 language=sr variant=sr-ec
6392 <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>
6398 Explicit definition of language variant alternatives
6400 language=zh variant=zh-tw
6402 -{zh:China;zh-tw:Taiwan}-, not China
6404 <p>Taiwan, not China
6410 Adding explicit session-wise language variant mapping (A flag)
6412 language=zh variant=zh-tw
6414 -{A|zh:China;zh-tw:Taiwan}- is China
6422 Adding explicit conversion rule for title (T flag)
6424 language=zh variant=zh-tw
6426 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
6428 <p>Should be stripped!
6434 Raw output of variant escape tags (R flag)
6436 language=zh variant=zh-tw
6438 Raw: -{R|zh:China;zh-tw:Taiwan}-
6440 <p>Raw: zh:China;zh-tw:Taiwan
6446 Do not convert roman numbers to language variants
6448 language=sr variant=sr-ec
6452 <p>Фридрих IV је цар.
6467 Try for 100% code coverage