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>
995 Normal text. '''Bold text.''' Normal text. ''Italic text.''
997 Normal text. '''''Bold italic text.''''' Normal text.
999 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
1000 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
1006 Unclosed and unmatched quotes
1008 '''''Bold italic text '''with bold deactivated''' in between.'''''
1010 '''''Bold italic text ''with italic deactivated'' in between.'''''
1014 ..spanning two paragraphs (should not work).'''
1016 '''Bold tag left open
1018 ''Italic tag left open
1022 <!-- Unmatching number of opening, closing tags: -->
1023 '''This year''''s election ''should'' beat '''last year''''s.
1025 ''Tom'''s car is bigger than ''Susan'''s.
1027 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
1028 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
1029 </p><p><b>Bold text..</b>
1030 </p><p>..spanning two paragraphs (should not work).
1031 </p><p><b>Bold tag left open</b>
1032 </p><p><i>Italic tag left open</i>
1034 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
1035 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
1042 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
1045 # This should not produce <table></table> as <table><tr><td></td></tr></table>
1046 # is the bare minimun required by the spec, see:
1047 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
1049 A table with no data.
1055 # A table with nothing but a caption is invalid XHTML, we might want to render
1056 # this as <p>caption</p>
1058 A table with nothing but a caption
1066 </caption><tr><td></td></tr></table>
1090 Multiplication table
1092 {| border="1" cellpadding="2"
1093 |+Multiplication table
1095 ! × !! 1 !! 2 !! 3
1113 <table border="1" cellpadding="2">
1114 <caption>Multiplication table
1117 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1121 </th><td> 1 </td><td> 2 </td><td> 3
1125 </th><td> 2 </td><td> 4 </td><td> 6
1129 </th><td> 3 </td><td> 6 </td><td> 9
1133 </th><td> 4 </td><td> 8 </td><td> 12
1137 </th><td> 5 </td><td> 10 </td><td> 15
1145 {| align=right border=1
1147 |rowspan=2| Cell 2, row 1 (and 2)
1154 <table align="right" border="1">
1157 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1158 </td><td> Cell 3, row 1
1162 </td><td> Cell 3, row 2
1173 {| bgcolor=#ABCDEF border=2
1178 |the original table again
1185 <table bgcolor="#ABCDEF" border="2">
1192 </td><td>the original table again
1198 Invalid attributes in table cell (bug 1830)
1212 # FIXME: this one has incorrect tag nesting still.
1214 TODO: Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)
1217 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1221 <td><a href="ftp://|x||" class="external autonumber" title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1233 Plain link, capitalized
1237 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1242 Plain link, uncapitalized
1246 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1253 [[Main Page|The Main Page]]
1255 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1264 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1271 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1273 <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>
1280 [[Main Page]]xxx, [[Main Page]]XXX
1282 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1287 Link with 3 brackets
1296 Piped link with 3 brackets
1298 [[[main page|the main page]]]
1300 <p>[[[main page|the main page]]]
1305 Link with multiple pipes
1307 [[Main Page|The|Main|Page]]
1309 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1316 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1318 <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>
1323 Piped link to namespace
1325 [[Meta:Disclaimers|The disclaimers]]
1327 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1334 [[Usually caused by a typo (oops}]]
1336 <p>[[Usually caused by a typo (oops}]]
1341 Link containing % (not as a hex sequence)
1345 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1350 Link containing % as a single hex sequence interpreted to char
1354 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1359 Link containing % as a double hex sequence interpreted to hex sequence
1363 <p>[[7%2525 Solution]]
1368 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1369 Example for such a section: == < ==
1371 [[%23%3c]][[%23%3e]]
1373 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1378 Link containing "<#" and ">#" as a hex sequences
1380 [[%3c%23]][[%3e%23]]
1382 <p>[[%3c%23]][[%3e%23]]
1387 TODO: Link containing double-single-quotes '' (bug 4598)
1389 [[Lista d''e paise d''o munno]]
1391 <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>
1396 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1398 Some [[Link|pretty ''italics'' and stuff]]!
1400 <p>Some <a href="/index.php?title=Link&action=edit" class="new" title="Link">pretty <i>italics</i> and stuff</a>!
1405 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1407 ''Some [[Link|pretty ''italics'' and stuff]]!
1409 <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>
1416 [[http://www.example.org]]
1418 <p>[<a href="http://www.example.org" class="external autonumber" title="http://www.example.org" rel="nofollow">[1]</a>]
1422 # I'm fairly sure the expected result here is wrong.
1423 # We want these to be URL links, not pseudo-pages with URLs for titles....
1424 # However the current output is also pretty screwy.
1427 # I'm changing it to match the current output--it arguably makes more
1428 # sense in the light of the test above. Old expected result was:
1429 #<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>
1431 # But I think this test is bordering on "garbage in, garbage out" anyway.
1436 Piped link to URL: [[http://www.example.org|an example URL]]
1438 <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>]
1443 BUG 2: [[page|http://url/]] should link to page, not http://url/
1445 [[Main Page|http://url/]]
1447 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1452 BUG 337: Escaped self-links should be bold
1456 [[Bug462]] [[Bug462]]
1458 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1463 Self-link to section should not be bold
1467 [[Main Page#section]]
1469 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1480 Self-link to numeric title
1486 <p><strong class="selflink">0</strong>
1491 Link to numeric-equivalent title
1497 <p><a href="/wiki/00" title="00">00</a>
1502 <nowiki> inside a link
1504 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1506 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1511 ### Interwiki links (see maintenance/interwiki.sql)
1515 Inline interwiki link
1517 [[MeatBall:SoftSecurity]]
1519 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1524 Inline interwiki link with empty title (bug 2372)
1528 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw" title="meatball:">MeatBall:</a>
1533 Interwiki link encoding conversion (bug 1636)
1535 *[[Wikipedia:ro:Olteniţa]]
1536 *[[Wikipedia:ro:Olteniţa]]
1538 <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>
1539 </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>
1545 Interwiki link with fragment (bug 2130)
1547 [[MeatBall:SoftSecurity#foo]]
1549 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1567 Incorrecly removing closing slashes from correctly formed XHTML
1569 <br style="clear:both;" />
1571 <p><br style="clear:both;" />
1576 Failing to transform badly formed HTML into correct XHTML
1582 <p><br clear="left" />
1583 <br clear="right" />
1589 Horizontal ruler (should it add that extra space?)
1603 ### Block-level elements
1626 <ol><li>Numbered list
1643 ***#Number on level 4
1645 **#Number on level 3
1646 **#Number on level 3
1651 <ol><li> with numbers
1653 <ul><li> and bullets
1655 <ol><li> and numbers
1657 </li><li>bullets again
1658 <ul><li>bullet level 2
1659 <ul><li>bullet level 3
1660 <ol><li>Number on level 4
1663 </li><li>bullet level 2
1664 <ol><li>Number on level 3
1665 </li><li>Number on level 3
1668 <ol><li>number level 2
1676 List items are not parsed correctly following a <pre> block (bug 785)
1682 <ul><li> <pre>foo</pre>
1683 </li><li> <pre>bar</pre>
1694 Magic Word: {{CURRENTDAY}}
1703 Magic Word: {{CURRENTDAY2}}
1712 Magic Word: {{CURRENTDAYNAME}}
1721 Magic Word: {{CURRENTDOW}}
1730 Magic Word: {{CURRENTMONTH}}
1739 Magic Word: {{CURRENTMONTHABBREV}}
1741 {{CURRENTMONTHABBREV}}
1748 Magic Word: {{CURRENTMONTHNAME}}
1750 {{CURRENTMONTHNAME}}
1757 Magic Word: {{CURRENTMONTHNAMEGEN}}
1759 {{CURRENTMONTHNAMEGEN}}
1766 Magic Word: {{CURRENTTIME}}
1775 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1784 Magic Word: {{CURRENTYEAR}}
1793 Magic Word: {{FULLPAGENAME}}
1795 title=[[User:Ævar Arnfjörð Bjarmason]]
1799 <p>User:Ævar Arnfjörð Bjarmason
1804 Magic Word: {{FULLPAGENAMEE}}
1806 title=[[User:Ævar Arnfjörð Bjarmason]]
1810 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1815 Magic Word: {{NAMESPACE}}
1817 title=[[User:Ævar Arnfjörð Bjarmason]]
1827 Magic Word: {{NAMESPACEE}}
1829 title=[[User:Ævar Arnfjörð Bjarmason]]
1839 Magic Word: {{NUMBEROFARTICLES}}
1841 {{NUMBEROFARTICLES}}
1848 Magic Word: {{NUMBEROFFILES}}
1857 Magic Word: {{PAGENAME}}
1859 title=[[User:Ævar Arnfjörð Bjarmason]]
1864 <p>Ævar Arnfjörð Bjarmason
1869 Magic Word: {{PAGENAMEE}}
1871 title=[[User:Ævar Arnfjörð Bjarmason]]
1875 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1880 Magic Word: {{REVISIONID}}
1889 Magic Word: {{SCRIPTPATH}}
1898 Magic Word: {{SERVER}}
1902 <p><a href="http://localhost" class="external free" title="http://localhost" rel="nofollow">http://localhost</a>
1907 Magic Word: {{SERVERNAME}}
1916 Magic Word: {{SITENAME}}
1925 Namespace 1 {{ns:1}}
1934 Namespace 1 {{ns:01}}
1943 Namespace 0 {{ns:0}} (bug 4783)
1951 Namespace 0 {{ns:00}} (bug 4783)
1959 Namespace -1 {{ns:-1}}
1968 Namespace Project {{ns:User}}
1981 Magic links: internal link to RFC (bug 479)
1985 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1990 Magic links: RFC (bug 479)
1994 <p><a href="http://tools.ietf.org/html/rfc822" class="external" title="http://tools.ietf.org/html/rfc822">RFC 822</a>
1999 Magic links: ISBN (bug 1937)
2003 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
2008 Magic links: PMID incorrectly converts space to underscore
2012 <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>
2021 Nonexistant template
2023 {{thistemplatedoesnotexist}}
2025 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
2032 This is a test template
2040 <p>This is a test template
2045 Template with explicit namespace
2049 <p>This is a test template
2057 This is a test template with parameter {{{param}}}
2063 {{paramtest|param=foo}}
2065 <p>This is a test template with parameter foo
2070 Template:paramtestnum
2076 Template unnamed parameter
2078 {{paramtestnum|Main Page|the main page}}
2080 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2085 Template:templatesimple
2091 Template:templateredirect
2093 #redirect [[Template:templatesimple]]
2097 Template:templateasargtestnum
2103 Template:templateasargtest
2105 {{template{{{templ}}}}}
2109 Template:templateasargtest2
2115 Template with template name as unnamed argument
2117 {{templateasargtestnum|templatesimple}}
2124 Template with template name as argument
2126 {{templateasargtest|templ=simple}}
2133 Template with template name as argument (2)
2135 {{templateasargtest2|templ=templatesimple}}
2142 Template:templateasargtestdefault
2144 {{{{{templ|templatesimple}}}}}
2154 Template with default value
2156 {{templateasargtestdefault}}
2163 Template with default value (value set)
2165 {{templateasargtestdefault|templ=templa}}
2174 {{templateredirect}}
2181 Template with argument in separate line
2183 {{ templateasargtest |
2191 Template with complex template as argument
2194 param ={{ templateasargtest |
2197 <p>This is a test template with parameter (test)
2202 Template with thumb image (with link in description)
2205 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2207 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>
2212 Template:complextemplate
2214 {{{1}}} {{paramtest|
2215 param ={{{param}}}}}
2219 Template with complex arguments
2222 param ={{ templateasargtest |
2223 templ = simple }}|[[Template:complextemplate|link]]}}
2225 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2230 BUG 553: link with two variables in a piped link
2233 |[[{{{1}}}|{{{2}}}]]
2238 <td>[[{{{1}}}|{{{2}}}]]
2244 Magic variable as template parameter
2246 {{paramtest|param={{SITENAME}}}}
2248 <p>This is a test template with parameter MediaWiki
2255 [[{{{param}}}|link]]
2259 Template parameter as link source
2261 {{linktest|param=Main Page}}
2263 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2271 including another template, {{paramtest|param={{{arg}}}}}
2275 Template passing argument to another template
2277 {{paramtest2|arg='hmm'}}
2279 <p>including another template, This is a test template with parameter 'hmm'
2290 Template as link source
2294 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2312 Template infinite loop
2316 <p><a href="/index.php?title=Loop1&action=edit" class="new" title="Loop1">loop1</a><!-- WARNING: template loop detected -->
2321 Template from main namespace
2340 BUG 529: Template with table, not included at beginning of line
2357 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2375 BUG 41: Template parameters shown as broken links
2387 ''None'' of '''this''' should be
2389 but rather passed unmodified
2393 # hmm, fix this or just deprecate msgnw and document its behavior?
2399 {{msgnw:MSGNW test}}
2401 <p>''None'' of '''this''' should be
2403 but rather passed unmodified
2411 {{int:youhavenewmessages|lots of money|not!}}
2413 <p>You have lots of money (not!).
2420 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2424 <includeonly> and <noinclude> being included
2435 <onlyinclude>Foo</onlyinclude>bar
2439 <onlyinclude> being included
2451 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2455 <onlyinclude> and <includeonly> being included
2464 <includeonly> and <noinclude> on a page
2466 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2473 <onlyinclude> on a page
2475 <onlyinclude>Foo</onlyinclude>bar
2482 ### Pre-save transform tests
2485 pre-save transform: subst:
2491 This is a test template
2495 pre-save transform: normal template
2505 pre-save transform: nonexistant template
2509 {{thistemplatedoesnotexist}}
2511 {{thistemplatedoesnotexist}}
2516 pre-save transform: subst magic variables
2525 # This is bug 89, which I fixed. -- wtm
2527 pre-save transform: subst: templates with parameters
2531 {{subst:paramtest|param="something else"}}
2533 This is a test template with parameter "something else"
2539 <nowiki>'''not wiki'''</nowiki>
2543 pre-save transform: nowiki in subst (bug 1188)
2547 {{subst:nowikitest}}
2549 <nowiki>'''not wiki'''</nowiki>
2554 Template:commenttest
2556 This template has <!-- a comment --> in it.
2560 pre-save transform: comment in subst (bug 1936)
2564 {{subst:commenttest}}
2566 This template has <!-- a comment --> in it.
2570 pre-save transform: unclosed tag
2574 <nowiki>'''not wiki'''
2576 <nowiki>'''not wiki'''
2580 pre-save transform: mixed tag case
2584 <NOwiki>'''not wiki'''</noWIKI>
2586 <NOwiki>'''not wiki'''</noWIKI>
2590 pre-save transform: unclosed comment in <nowiki>
2594 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2596 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2602 <span onmouseover="alert('crap')">Oh no</span>
2606 (confirming safety of fix for subst bug 1936)
2608 {{Template:dangerous}}
2610 <p><span>Oh no</span>
2615 pre-save transform: comment containing gallery (bug 5024)
2619 <!-- <gallery>data</gallery> -->
2621 <!-- <gallery>data</gallery> -->
2625 pre-save transform: comment containing extension
2629 <!-- <tag>data</tag> -->
2631 <!-- <tag>data</tag> -->
2635 pre-save transform: comment containing nowiki
2639 <!-- <nowiki>data</nowiki> -->
2641 <!-- <nowiki>data</nowiki> -->
2645 pre-save transform: comment containing math
2649 <!-- <math>data</math> -->
2651 <!-- <math>data</math> -->
2655 pre-save transform: <noinclude> in subst (bug 3298)
2665 pre-save transform: <onlyinclude> in subst (bug 3298)
2675 pre-save transform: context links ("pipe trick")
2679 [[Article (context)|]]
2682 [[Bar:Article (context)|]]
2683 [[:Bar:Article (context)|]]
2685 [[|Article (context)]]
2689 [[Article (context)|Article]]
2690 [[Bar:Article|Article]]
2691 [[:Bar:Article|Article]]
2692 [[Bar:Article (context)|Article]]
2693 [[:Bar:Article (context)|Article]]
2695 [[Article (context)]]
2696 [[Bar:X (Y) Z|X (Y) Z]]
2697 [[:Bar:X (Y) Z|X (Y) Z]]
2701 pre-save transform: context links ("pipe trick") with interwiki prefix
2705 [[interwiki:Article|]]
2706 [[:interwiki:Article|]]
2707 [[interwiki:Bar:Article|]]
2708 [[:interwiki:Bar:Article|]]
2710 [[interwiki:Article|Article]]
2711 [[:interwiki:Article|Article]]
2712 [[interwiki:Bar:Article|Bar:Article]]
2713 [[:interwiki:Bar:Article|Bar:Article]]
2717 pre-save transform: context links ("pipe trick") with parens in title
2719 pst title=[[Somearticle (context)]]
2723 [[Article (context)|Article]]
2727 pre-save transform: context links ("pipe trick") with comma in title
2729 pst title=[[Someplace, Somewhere]]
2732 [[Otherplace, Elsewhere|]]
2733 [[Otherplace, Elsewhere, Anywhere|]]
2735 [[Otherplace, Somewhere|Otherplace]]
2736 [[Otherplace, Elsewhere|Otherplace]]
2737 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
2741 pre-save transform: context links ("pipe trick") with parens and comma
2743 pst title=[[Someplace (IGNORED), Somewhere]]
2746 [[Otherplace (place), Elsewhere|]]
2748 [[Otherplace, Somewhere|Otherplace]]
2749 [[Otherplace (place), Elsewhere|Otherplace]]
2753 pre-save transform: context links ("pipe trick") with comma and parens
2755 pst title=[[Who, me? (context)]]
2758 [[Me, Myself, and I (1937 song)|]]
2760 [[Yes, you. (context)|Yes, you.]]
2761 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
2765 pre-save transform: context links ("pipe trick") with namespace
2767 pst title=[[Ns:Somearticle]]
2771 [[Ns:Article|Article]]
2775 pre-save transform: context links ("pipe trick") with namespace and parens
2777 pst title=[[Ns:Somearticle (context)]]
2781 [[Ns:Article (context)|Article]]
2785 pre-save transform: context links ("pipe trick") with namespace and comma
2787 pst title=[[Ns:Somearticle, Context, Whatever]]
2791 [[Ns:Article, Context, Whatever|Article]]
2795 pre-save transform: context links ("pipe trick") with namespace, comma and parens
2797 pst title=[[Ns:Somearticle, Context (context)]]
2801 [[Ns:Article (context)|Article]]
2805 pre-save transform: context links ("pipe trick") with namespace, parens and comma
2807 pst title=[[Ns:Somearticle (IGNORED), Context]]
2811 [[Ns:Article, Context|Article]]
2816 ### Message transform tests
2819 message transform: magic variables
2829 message transform: should not transform wiki markup
2839 TODO: message transform: <noinclude> in transcluded template (bug 4926)
2849 TODO: message transform: <onlyinclude> in transcluded template (bug 4926)
2859 {{#special:}} page name, known
2863 {{#special:Recentchanges}}
2865 Special:Recentchanges
2869 {{#special:}} page name, unknown
2873 {{#special:foobarnonexistent}}
2875 No such special page
2884 [[Image:foobar.jpg]]
2886 <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>
2893 [[Image:foobar.jpg|right]]
2895 <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>
2902 [[Image:foobar.jpg|right|Caption text]]
2904 <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>
2909 Image with frame and link
2911 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2913 <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>
2918 Link to image page- image page normally doesn't exists, hence edit link
2919 TODO: Add test with existing image page
2920 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2924 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2929 Frameless image caption with a free URL
2931 [[Image:foobar.jpg|http://example.com]]
2933 <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>
2938 Thumbnail image caption with a free URL
2940 [[Image:foobar.jpg|thumb|http://example.com]]
2942 <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>
2947 BUG 1887: A ISBN with a thumbnail
2949 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
2951 <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>
2956 BUG 1887: A RFC with a thumbnail
2958 [[Image:foobar.jpg|thumb|This is RFC 12354]]
2960 <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>
2965 BUG 1887: A mailto link with a thumbnail
2967 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
2969 <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>
2974 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
2975 so math is not stripped and turns up as escaped <math> tags.
2977 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2979 <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>
2984 BUG 1887, part 2: A <math> with a thumbnail- math enabled
2988 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2990 <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>
2994 # Pending resolution to bug 368
2996 BUG 648: Frameless image caption with a link
2998 [[Image:foobar.jpg|text with a [[link]] in it]]
3000 <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>
3005 BUG 648: Frameless image caption with a link (suffix)
3007 [[Image:foobar.jpg|text with a [[link]]foo in it]]
3009 <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>
3014 BUG 648: Frameless image caption with an interwiki link
3016 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
3018 <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>
3023 BUG 648: Frameless image caption with a piped interwiki link
3025 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
3027 <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>
3032 Escape HTML special chars in image alt text
3034 [[Image:foobar.jpg|& < > "]]
3036 <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>
3041 BUG 499: Alt text should have Ӓ, not &1234;
3043 [[Image:foobar.jpg|♀]]
3045 <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>
3050 Broken image caption with link
3052 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
3054 <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.
3059 Image caption containing another image
3061 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
3063 <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>
3068 Image caption containing a newline
3070 [[Image:Foobar.jpg|This
3073 <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>
3079 Bug 3090: External links other than http: in image captions
3081 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
3083 <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>
3092 Subpage test/subpage
3100 subpage title=[[Subpage test]]
3104 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
3109 Subpage noslash link
3111 subpage title=[[Subpage test]]
3115 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
3124 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
3129 BUG 561: {{/Subpage}}
3131 subpage title=[[Page]]
3135 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
3143 Category:MediaWiki User's Guide
3151 [[:Category:MediaWiki User's Guide]]
3153 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
3162 [[Category:MediaWiki User's Guide]]
3164 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
3168 ### Inter-language links
3171 Inter-language links
3177 [[zh:食品]]
3179 es:Alimento fr:Nourriture zh:食品
3186 Basic section headings
3193 ===Smaller headline===
3196 <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>
3199 <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>
3202 <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>
3208 Section headings with TOC
3211 === Subheadline 1 ===
3212 ===== Skipping a level =====
3213 ====== Skipping a level ======
3217 ===Another headline===
3219 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3221 <li class="toclevel-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
3223 <li class="toclevel-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
3225 <li class="toclevel-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
3227 <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>
3234 <li class="toclevel-1"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
3236 <li class="toclevel-2"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
3240 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3241 <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>
3242 <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>
3243 <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>
3244 <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>
3245 <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>
3248 <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>
3252 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
3254 Handling of sections up to level 6 and beyond
3257 == Level 2 Heading==
3258 === Level 3 Heading===
3259 ==== Level 4 Heading====
3260 ===== Level 5 Heading=====
3261 ====== Level 6 Heading======
3262 ======= Level 7 Heading=======
3263 ======== Level 8 Heading========
3264 ========= Level 9 Heading=========
3265 ========== Level 10 Heading==========
3267 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3269 <li class="toclevel-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
3271 <li class="toclevel-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
3273 <li class="toclevel-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
3275 <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>
3277 <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>
3279 <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>
3280 <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>
3281 <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>
3282 <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>
3283 <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>
3295 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3296 <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>
3297 <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>
3298 <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>
3299 <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>
3300 <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>
3301 <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>
3302 <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>
3303 <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>
3304 <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>
3305 <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>
3310 Resolving duplicate section names
3315 <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>
3316 <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>
3328 Template with sections, __NOTOC__
3335 <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>
3336 <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>
3337 <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>
3338 <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>
3343 __NOEDITSECTION__ keyword
3349 <a name="Section_1"></a><h2> <span class="mw-headline">Section 1</span></h2>
3350 <a name="Section_2"></a><h2> <span class="mw-headline">Section 2</span></h2>
3355 Link inside a section heading
3357 ==Section with a [[Main Page|link]] in it==
3359 <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>
3365 BUG 1219 URL next to image (good)
3367 http://example.com [[Image:foobar.jpg]]
3369 <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>
3374 BUG 1219 URL next to image (broken)
3376 http://example.com[[Image:foobar.jpg]]
3378 <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>
3383 Bug 1186 news: in the middle of text
3385 http://en.wikinews.org/wiki/Wikinews:Workplace
3387 <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>
3393 Namespaced link must have a title
3402 Namespaced link must have a title (bad fragment version)
3404 [[Project:#fragment]]
3406 <p>[[Project:#fragment]]
3412 div with no attributes
3414 <div>HTML rocks</div>
3416 <div>HTML rocks</div>
3421 div with double-quoted attribute
3423 <div id="rock">HTML rocks</div>
3425 <div id="rock">HTML rocks</div>
3430 div with single-quoted attribute
3432 <div id='rock'>HTML rocks</div>
3434 <div id="rock">HTML rocks</div>
3439 div with unquoted attribute
3441 <div id=rock>HTML rocks</div>
3443 <div id="rock">HTML rocks</div>
3448 div with illegal double attributes
3450 <div align="center" align="right">HTML rocks</div>
3452 <div align="right">HTML rocks</div>
3457 HTML multiple attributes correction
3459 <p class="error" class="awesome">Awesome!</p>
3461 <p class="awesome">Awesome!</p>
3466 Table multiple attributes correction
3469 !+ class="error" class="awesome"| status
3474 <th class="awesome"> status
3482 <DIV ALIGN="center">HTML ROCKS</DIV>
3484 <div align="center">HTML ROCKS</div>
3490 text with amp in the middle of nowhere
3494 <p>Remember AT&T?
3499 text with character entity: eacute
3501 I always thought é was a cute letter.
3503 <p>I always thought é was a cute letter.
3508 text with undefined character entity: xacute
3510 I always thought &xacute; was a cute letter.
3512 <p>I always thought &xacute; was a cute letter.
3524 [[Media:Foobar.jpg]]
3526 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
3531 Media link with text
3533 [[Media:Foobar.jpg|A neat file to look at]]
3535 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
3539 # FIXME: this is still bad HTML tag nesting
3541 Media link with nasty text
3542 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3544 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3546 <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>
3551 Media link to nonexistent file (bug 1702)
3553 [[Media:No such.jpg]]
3555 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
3560 Image link to nonexistent file (bug 1850 - good)
3562 [[Image:No such.jpg]]
3564 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3569 :Image link to nonexistent file (bug 1850 - bad)
3571 [[:Image:No such.jpg]]
3573 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3580 Character reference normalization in link text (bug 1938)
3582 [[Main Page|this&that]]
3584 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3589 Empty attribute crash test (bug 2067)
3591 <font color="">foo</font>
3593 <p><font color="">foo</font>
3598 Empty attribute crash test single-quotes (bug 2067)
3600 <font color=''>foo</font>
3602 <p><font color="">foo</font>
3607 Attribute test: equals, then nothing
3609 <font color=>foo</font>
3616 Attribute test: unquoted value
3618 <font color=x>foo</font>
3620 <p><font color="x">foo</font>
3625 Attribute test: unquoted but illegal value (hash)
3627 <font color=#x>foo</font>
3629 <p><font color="#x">foo</font>
3634 Attribute test: no value
3636 <font color>foo</font>
3638 <p><font color="color">foo</font>
3643 Bug 2095: link with three closing brackets
3647 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3652 Bug 2095: link with pipe and three closing brackets
3656 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3661 Bug 2095: link with pipe and three closing brackets, version 2
3663 [[Main Page|[http://example.com/]]]
3665 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3675 Template:Dangerous attribute
3677 " onmouseover="alert(document.cookie)
3681 Template:Dangerous style attribute
3683 border-size: expression(alert(document.cookie))
3689 <div style="float: right; {{{1}}}">Magic div</div>
3693 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3695 <div title="{{test}}"></div>
3697 <div title="This is a test template"></div>
3702 Bug 2304: HTML attribute safety (dangerous template; 2309)
3704 <div title="{{dangerous attribute}}"></div>
3706 <div title=""></div>
3711 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3713 <div style="{{dangerous style attribute}}"></div>
3720 Bug 2304: HTML attribute safety (safe parameter; 2309)
3722 {{div style|width: 200px}}
3724 <div style="float: right; width: 200px">Magic div</div>
3729 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3731 {{div style|width: expression(alert(document.cookie))}}
3733 <div>Magic div</div>
3738 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3740 {{div style|"><script>alert(document.cookie)</script>}}
3742 <div>Magic div</div>
3747 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3749 {{div style|" ><script>alert(document.cookie)</script>}}
3751 <div style="float: right;">Magic div</div>
3756 Bug 2304: HTML attribute safety (link)
3758 <div title="[[Main Page]]"></div>
3760 <div title="[[Main Page]]"></div>
3765 Bug 2304: HTML attribute safety (italics)
3767 <div title="''foobar''"></div>
3769 <div title="''foobar''"></div>
3774 Bug 2304: HTML attribute safety (bold)
3776 <div title="'''foobar'''"></div>
3778 <div title="'''foobar'''"></div>
3784 Bug 2304: HTML attribute safety (ISBN)
3786 <div title="ISBN 1234567890"></div>
3788 <div title="ISBN 1234567890"></div>
3793 Bug 2304: HTML attribute safety (RFC)
3795 <div title="RFC 1234"></div>
3797 <div title="RFC 1234"></div>
3802 Bug 2304: HTML attribute safety (PMID)
3804 <div title="PMID 1234567890"></div>
3806 <div title="PMID 1234567890"></div>
3811 Bug 2304: HTML attribute safety (web link)
3813 <div title="http://example.com/"></div>
3815 <div title="http://example.com/"></div>
3820 Bug 2304: HTML attribute safety (named web link)
3822 <div title="[http://example.com/ link]"></div>
3824 <div title="[http://example.com/ link]"></div>
3829 Bug 3244: HTML attribute safety (extension; safe)
3831 <div style="<nowiki>background:blue</nowiki>"></div>
3833 <div style="background:blue"></div>
3838 Bug 3244: HTML attribute safety (extension; unsafe)
3840 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3847 Math section safety when disabled
3849 <math><script>alert(document.cookies);</script></math>
3851 <p><math><script>alert(document.cookies);</script></math>
3855 # More MSIE fun discovered by Tom Gilder
3858 MSIE CSS safety test: spurious slash
3860 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3867 MSIE CSS safety test: hex code
3869 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3876 MSIE CSS safety test: comment in url
3878 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3880 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3885 MSIE CSS safety test: comment in expression
3887 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3889 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3895 Table attribute legitimate extension
3898 !+ style="<nowiki>color:blue</nowiki>"| status
3903 <th style="color:blue"> status
3909 Table attribute safety
3912 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3930 Expansion of multi-line templates in attribute values (bug 6255)
3932 <div style="background: {{identity|#00FF00}}">-</div>
3934 <div style="background: #00FF00">-</div>
3940 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
3942 <div style="background:
3945 <div style="background: #00FF00">-</div>
3950 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
3952 <div style="background: #00FF00">-</div>
3954 <div style="background: #00FF00">-</div>
3959 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3962 Parser hook: empty input
3975 Parser hook: empty input using terminated empty elements
3988 Parser hook: empty input using terminated empty elements (space before)
4001 Parser hook: basic input
4015 Parser hook: case insensetive
4029 Parser hook: case insensetive, redux
4042 Parser hook: nested tags
4046 <tag><tag></tag></tag>
4057 Parser hook: basic arguments
4059 <tag width=200 height = "100" depth = '50' square></tag>
4078 Parser hook: argument containing a forward slash (bug 5344)
4080 <tag filename='/tmp/bla'></tag>
4086 string(8) "/tmp/bla"
4093 Parser hook: empty input using terminated empty elements (bug 2374)
4107 # </tag> should be output literally since there is no matching tag that begins it
4109 Parser hook: basic arguments using terminated empty elements (bug 2374)
4111 <tag width=200 height = "100" depth = '50' square/>
4134 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
4138 Parser hook: static parser hook not inside a comment
4140 <statictag>hello, world</statictag>
4141 <statictag action=flush/>
4149 Parser hook: static parser hook inside a comment
4151 <!-- <statictag>hello, world</statictag> -->
4152 <statictag action=flush/>
4158 # Nested template calls; this case was broken by Parser.php rev 1.506,
4162 Template:One-parameter
4164 (My parameter is: {{{1}}})
4168 Template:Map-one-parameter
4174 Nested template calls
4176 {{Map-one-parameter|One-parameter|param}}
4178 <p>(My parameter is: param)
4187 Sanitizer: Closing of open tags
4189 <s></s><table></table>
4191 <s></s><table></table>
4196 Sanitizer: Closing of open but not closed tags
4205 Sanitizer: Closing of closed but not open tags
4214 Sanitizer: Closing of closed but not open table tags
4216 Table not started</td></tr></table>
4218 <p>Table not started</td></tr></table>
4223 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
4225 <span id="æ: v">byte</span>[[#æ: v|backlink]]
4227 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
4232 Sanitizer: Validating the contents of the id attribute (bug 4515)
4238 Something, but defenetly not <br id="9" />...
4242 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
4246 <br id="foo" /><br id="foo" />
4248 Something need to be done. foo-2 ?
4252 Language converter: output gets cut off unexpectedly (bug 5757)
4256 this bit is safe: }-
4258 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
4260 then we get cut off here: }-
4262 all additional text is vanished
4264 <p>this bit is safe: }-
4265 </p><p>but if we add a conversion instance: xxx
4266 </p><p>then we get cut off here: }-
4267 </p><p>all additional text is vanished
4272 Self closed html pairs (bug 5487)
4275 <center><font id="bug" />Centered text</center>
4276 <div><font id="bug2" />In div text</div>
4278 <center><font id="bug" />Centered text</center>
4279 <div><font id="bug2" />In div text</div>
4288 HTML bullet list, closed tags (bug 5497)
4303 TODO: HTML bullet list, unclosed tags (bug 5497)
4318 HTML ordered list, closed tags (bug 5497)
4333 TODO: HTML ordered list, unclosed tags (bug 5497)
4348 HTML nested bullet list, closed tags (bug 5497)
4373 TODO: HTML nested bullet list, open tags (bug 5497)
4396 HTML nested ordered list, closed tags (bug 5497)
4421 TODO: HTML nested ordered list, open tags (bug 5497)
4444 HTML ordered list item with parameters oddity
4446 <ol><li id="fragment">One</li></ol>
4448 <ol><li id="fragment">One</li></ol>
4453 bug 5918: autonumbering
4455 [http://first/] [http://second] [ftp://ftp]
4459 [mailto:enclosed@mail.tld With target]
4461 [mailto:enclosed@mail.tld]
4463 mailto:inline@mail.tld
4465 <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>
4466 </p><p><a href="ftp://inlineftp" class="external free" title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4467 </p><p><a href="mailto:enclosed@mail.tld" class="external text" title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4468 </p><p><a href="mailto:enclosed@mail.tld" class="external autonumber" title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4469 </p><p><a href="mailto:inline@mail.tld" class="external free" title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4475 # Security and HTML correctness
4476 # From Nick Jenkins' fuzz testing
4480 Fuzz testing: Parser13
4495 Fuzz testing: Parser14
4500 <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>
4501 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4503 <li class="toclevel-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4505 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4510 Fuzz testing: Parser14-table
4515 <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>
4516 <table style="__TOC__">
4522 # Known to produce bogus xml (extra </td>)
4524 Fuzz testing: Parser16
4533 <th>https://</th><th></th><th></th><th>
4541 Fuzz testing: Parser21
4544 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4549 <th> <a href="irc://{{ftp://a" class="external free" title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4558 Fuzz testing: Parser22
4560 http://===r:::https://b
4564 <p><a href="http://===r:::https://b" class="external free" title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4572 # Known to produce bad XML for now
4574 Fuzz testing: Parser24
4581 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4582 <br style="onmouseover='alert(document.cookie);' " />
4584 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4589 <u class="|">} >
4590 <br style="onmouseover='alert(document.cookie);'" />
4592 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4601 # Known to produce bad XML for now
4603 Fuzz testing: Parser25 (bug 6055)
4611 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4613 <li class="||">
4614 blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4619 Fuzz testing: URL adjacent extension (with space, clean)
4622 http://example.com <nowiki>junk</nowiki>
4624 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a> junk
4629 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4632 http://example.com<nowiki>junk</nowiki>
4634 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>junk
4639 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4642 http://example.com<pre>junk</pre>
4644 <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>
4649 Fuzz testing: image with bogus manual thumbnail
4651 [[Image:foobar.jpg|thumbnail= ]]
4653 <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>
4658 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
4660 <pre dir=" "></pre>
4662 <pre dir=" "></pre>
4667 TODO: Parsing optional HTML elements (Bug 6171)
4672 <td> Some tabular data</td>
4673 <td> More tabular data ...
4674 <td> And yet som tabular data</td>
4680 <td> Some tabular data</td>
4681 <td> More tabular data ...
4682 </td><td> And yet som tabular data</td>
4689 Correct handling of <td>, <tr> (Bug 6171)
4694 <td> Some tabular data</td>
4695 <td> More tabular data ...</td>
4696 <td> And yet som tabular data</td>
4702 <td> Some tabular data</td>
4703 <td> More tabular data ...</td>
4704 <td> And yet som tabular data</td>
4712 Parsing crashing regression (fr:JavaScript)
4716 <p></body></x>
4721 Inline wiki vs wiki block nesting
4727 <p><b>Bold paragraph</b>
4728 </p><p>New wiki paragraph
4733 TODO: Inline HTML vs wiki block nesting
4739 <p><b>Bold paragraph</b>
4740 </p><p>New wiki paragraph
4746 TODO: Mixing markup for italics and bold
4749 '''bold''''''bold''bolditalics'''''
4751 <p><b>bold</b><b>bold<i>bolditalics</i></b>
4759 Article for special page transclusion test
4763 Special page transclusion
4766 {{Special:Prefixindex/Xyzzyx}}
4770 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4775 Special page transclusion twice (bug 5021)
4778 {{Special:Prefixindex/Xyzzyx}}
4779 {{Special:Prefixindex/Xyzzyx}}
4783 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4786 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4791 Transclusion of default MediaWiki message
4793 {{MediaWiki:Mainpage}}
4800 Transclusion of nonexistent MediaWiki message
4802 {{MediaWiki:Mainpagexxx}}
4804 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit" class="new" title="MediaWiki:Mainpagexxx">MediaWiki:Mainpagexxx</a>
4809 Transclusion of MediaWiki message with underscore
4811 {{MediaWiki:history_short}}
4818 Transclusion of MediaWiki message with space
4820 {{MediaWiki:history short}}
4827 Invalid header with following text
4837 Section extraction test (section 0)
4857 Section extraction test (section 1)
4879 Section extraction test (section 2)
4900 Section extraction test (section 3)
4920 Section extraction test (section 4)
4944 Section extraction test (section 5)
4964 Section extraction test (section 6)
4985 Section extraction test (section 7)
5005 Section extraction test (section 8)
5025 Section extraction test (section 9)
5046 Section extraction test (section 10)
5066 Section extraction test (nonexistent section 11)
5085 Section extraction test with bogus heading (section 1)
5090 ==bogus== not a legal section
5094 ==bogus== not a legal section
5098 Section extraction test with bogus heading (section 2)
5103 ==bogus== not a legal section
5110 Section extraction test with comment after heading (section 1)
5115 ==legal== <!-- a legal section -->
5122 Section extraction test with comment after heading (section 2)
5127 ==legal== <!-- a legal section -->
5130 ==legal== <!-- a legal section -->
5134 Section extraction test with bogus <nowiki> heading (section 1)
5139 ==bogus== <nowiki>not a legal section</nowiki>
5143 ==bogus== <nowiki>not a legal section</nowiki>
5147 Section extraction test with bogus <nowiki> heading (section 2)
5152 ==bogus== <nowiki>not a legal section</nowiki>
5160 Section extraction prefixed by comment (section 1) (bug 2587)
5171 Section extraction prefixed by comment (section 2) (bug 2587)
5183 Section extraction, mixed wiki and html (section 1) (bug 2607)
5199 Section extraction, mixed wiki and html (section 2) (bug 2607)
5216 Section extraction, heading surrounded by <noinclude> (bug 3342)
5220 <noinclude>==a==</noinclude>
5223 <noinclude>==a==</noinclude>
5229 Section extraction, HTML heading subsections (bug 5272)
5242 Section extraction, HTML headings should be ignored in extensions (bug 3476)
5256 Section replacement test (section 0)
5287 Section replacement test (section 1)
5316 Section replacement test (section 2)
5346 Section replacement test (section 3)
5377 Section replacement test (section 4)
5404 Section replacement test (section 5)
5435 Section replacement test (section 6)
5465 Section replacement test (section 7)
5496 Section replacement test (section 8)
5527 Section replacement test (section 9)
5556 Section replacement test (section 10)
5587 Section extraction, HTML headings not at line boundaries (section 0)
5591 <h2>Evil</h2><i>blah blah blah</i>
5599 <i>extra evil</i><h2>Extra nasty</h2>
5606 Section extraction, HTML headings not at line boundaries (section 1)
5610 <h2>Evil</h2><i>blah blah blah</i>
5618 <i>extra evil</i><h2>Extra nasty</h2>
5622 <h2>Evil</h2><i>blah blah blah</i>
5628 Section extraction, HTML headings not at line boundaries (section 2)
5632 <h2>Evil</h2><i>blah blah blah</i>
5640 <i>extra evil</i><h2>Extra nasty</h2>
5652 Section extraction, HTML headings not at line boundaries (section 3)
5656 <h2>Evil</h2><i>blah blah blah</i>
5664 <i>extra evil</i><h2>Extra nasty</h2>
5668 <h2>Extra nasty</h2>
5675 Section extraction, heading followed by pre with 20 spaces (bug 6398)
5687 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
5699 Handling of 
 in URLs
5703 <ul><li><ul><li><a href="irc://%0Aa" class="external free" title="irc://%0Aa" rel="nofollow">irc://%0Aa</a>
5710 TODO: 5 quotes, code coverage +1 line
5717 Special:Search page linking.
5721 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
5736 * {{SUBJECTPAGENAME}}
5737 * {{SUBJECTPAGENAMEE}}
5744 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
5746 <ul><li> Parser test
5747 </li><li> Parser test
5748 </li><li> Parser test
5749 </li><li> Parser_test
5750 </li><li> Parser test
5751 </li><li> Parser_test
5752 </li><li> Talk:Parser test
5753 </li><li> Talk:Parser_test
5754 </li><li> Parser test
5755 </li><li> Parser_test
5762 </li><li> <a href="/index.php?title=Template:Dynamic&action=edit" class="new" title="Template:Dynamic">Template:Dynamic</a>
5766 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
5776 image4 |300px| centre
5777 image5.svg| http://///////
5782 <table class="gallery" cellspacing="0" cellpadding="0"><tr><td><div class="gallerybox"><div style="height: 152px;">Image1.png</div><div class="gallerytext">
5784 <td><div class="gallerybox"><div style="height: 152px;">Image2.gif</div><div class="gallerytext">
5785 ||||</div></div></td>
5786 <td><div class="gallerybox"><div style="height: 152px;">Image3</div><div class="gallerytext">
5788 <td><div class="gallerybox"><div style="height: 152px;">Image4</div><div class="gallerytext">
5789 300px| centre</div></div></td>
5790 </tr><tr><td><div class="gallerybox"><div style="height: 152px;">Image5.svg</div><div class="gallerytext">
5791 <a href="http://///////" class="external free" title="http://///////" rel="nofollow">http://///////</a></div></div></td>
5792 <td><div class="gallerybox"><div style="height: 152px;">* image6</div><div class="gallerytext">
5800 HTML Hex character encoding (spells the word "JavaScript")
5802 JavaScript
5804 <p>JavaScript
5809 __FORCETOC__ override
5821 ISBN 978-0-1234-56 789
5823 <p><a href="/index.php?title=Special:Booksources&isbn=9780123456" class="internal">ISBN 978-0-1234-56</a> 789
5828 ISBN followed by 5 spaces
5839 ISBN ISBN 1234567890
5841 <p>ISBN <a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1234567890</a>
5850 <p>RFC <a href="http://tools.ietf.org/html/rfc1234" class="external" title="http://tools.ietf.org/html/rfc1234">RFC 1234</a>
5855 Double RFC with a wiki link
5859 <p>RFC <a href="/index.php?title=RFC_1234&action=edit" class="new" title="RFC 1234">RFC 1234</a>
5868 <p><a href="http://tools.ietf.org/html/rfc983" class="external" title="http://tools.ietf.org/html/rfc983">RFC 983</a> 987
5873 Centre-aligned image
5875 [[Image:foobar.jpg|centre]]
5877 <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>
5884 [[Image:foobar.jpg|none]]
5886 <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>
5891 Width + Height sized image (using px) (height is ignored)
5893 [[Image:foobar.jpg|640x480px]]
5895 <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>
5900 Another italics / bold test
5908 # Note the results may be incorrect, as parserTest output included this:
5909 # XML error: Mismatched tag at byte 6120:
5910 # ...<dd> </dt></dl> </dd...
5916 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
5927 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
5929 TODO: Images with the "|" character in the comment
5931 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
5933 <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>
5938 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
5940 <html><script>alert(1);</script></html>
5942 <p><html><script>alert(1);</script></html>
5947 HTML with raw HTML ($wgRawHtml==true)
5951 <html><script>alert(1);</script></html>
5953 <p><script>alert(1);</script>
5958 Parents of subpages, one level up
5960 subpage title=[[Subpage test/L1/L2/L3]]
5964 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit" class="new" title="Subpage test/L1/L2">L2</a>
5970 Parents of subpages, one level up, not named
5972 subpage title=[[Subpage test/L1/L2/L3]]
5976 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit" class="new" title="Subpage test/L1/L2">Subpage test/L1/L2</a>
5983 Parents of subpages, two levels up
5986 subpage title=[[Subpage test/L1/L2/L3]]
5990 <p><a href="/index.php?title=Subpage_test/L1&action=edit" class="new" title="Subpage test/L1">L1</a>
5995 # Question: should result be "/index.php?title=Subpage_test/L1&action=edit" instead?
5997 TODO: Parents of subpages, two levels up, without trailing slash or name.
5999 subpage title=[[Subpage test/L1/L2/L3]]
6003 <p><a href="/index.php?title=Subpage_test/L1/L2/..&action=edit" class="new" title="Subpage test/L1">../..</a>
6007 # Question: Why should the link text in the above test be "../..", yet in this test the "../.." part is silently dropped?
6008 # Current result: <p><a href="/index.php?title=Subpage_test/L1////&action=edit" class="new" title="Subpage test/L1////">///
6010 TODO: Parents of subpages, two levels up, with lots of extra trailing slashes.
6012 subpage title=[[Subpage test/L1/L2/L3]]
6016 <p><a href="/index.php?title=Subpage_test/L1&action=edit" class="new" title="Subpage test/L1">Subpage test/L1</a>
6021 Definition list code coverage
6027 <dl><dt> title </dt><dd> def
6028 </dd><dt> title </dt><dd> def
6029 </dd><dt>title</dt><dd> def
6035 TODO: Don't fall for the self-closing div
6037 <div>hello world</div/>
6039 <div>hello world</div>
6048 <p>[[:Template:Msg]]
6057 <p><a href="/index.php?title=Template:QUERTY&action=edit" class="new" title="Template:QUERTY">Template:QUERTY</a>
6061 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
6063 Always escape literal '>' in output, not just after '<'
6077 <p>This is a test template
6078 This is a test template
6090 Inclusion of !userCanEdit() content
6094 <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>
6100 Out-of-order TOC heading levels
6109 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
6111 <li class="toclevel-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
6113 <li class="toclevel-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
6114 <li class="toclevel-2"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
6117 <li class="toclevel-1"><a href="#1_7"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
6119 <li class="toclevel-2"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
6120 <li class="toclevel-2"><a href="#2_4"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
6124 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
6125 <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>
6126 <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>
6127 <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>
6128 <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>
6129 <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>
6130 <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>
6136 ISBN with a dummy number
6146 ISBN with space-delimited number
6150 <p><a href="/index.php?title=Special:Booksources&isbn=9290170328" class="internal">ISBN 92 9017 032 8</a>
6156 ISBN with multiple spaces, no number
6175 </p><p><a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1234567890</a>
6176 </p><p>ISBN 12345678901
6182 ISBN with trailing year (bug 8110)
6184 ISBN 1-234-56789-0 - 2006
6186 ISBN 1 234 56789 0 - 2006
6188 <p><a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1-234-56789-0</a> - 2006
6189 </p><p><a href="/index.php?title=Special:Booksources&isbn=1234567890" class="internal">ISBN 1 234 56789 0</a> - 2006
6195 Pages in namespace (Magic word disabled currently)
6197 {{PAGESINNAMESPACE:}}
6206 {{anchorencode:foo bar©#%n}}
6208 <p>foo_bar.C2.A9.23.25n
6214 Bug 8293: Use of center tag ruins paragraph formatting
6236 ### Language variants related tests
6239 Self-link in language variants
6241 title=[[Dunav]] language=sr
6243 Both [[Dunav]] and [[Дунав]] are names for this river.
6245 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
6251 Link to pages in language variants
6255 Main Page can be written as [[Маин Паге]]
6257 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
6263 Multiple links to pages in language variants
6267 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
6269 <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>.
6275 Simple template in language variants
6281 <p>This is a test template
6287 Template with explicit namespace in language variants
6293 <p>This is a test template
6299 Basic test for template parameter in language variants
6303 {{парамтест|param=foo}}
6305 <p>This is a test template with parameter foo
6311 Simple category in language variants
6315 [[:Category:МедиаWики Усер'с Гуиде]]
6317 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
6322 Stripping -{}- tags (language variants)
6326 Latin proverb: -{Ne nuntium necare}-
6328 <p>Latin proverb: Ne nuntium necare
6334 Prevent conversion with -{}- tags (language variants)
6336 language=sr variant=sr-ec
6338 Latinski: -{Ne nuntium necare}-
6340 <p>Латински: Ne nuntium necare
6346 Prevent conversion of text with -{}- tags (language variants)
6348 language=sr variant=sr-ec
6350 Latinski: -{Ne nuntium necare}-
6352 <p>Латински: Ne nuntium necare
6358 Prevent conversion of links with -{}- tags (language variants)
6360 language=sr variant=sr-ec
6364 <p><a href="/index.php?title=Main_Page&variant=sr-ec" title="Main Page">Main Page</a>
6370 -{}- tags within headlines (within html for parserConvert())
6372 language=sr variant=sr-ec
6376 <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>
6382 Explicit definition of language variant alternatives
6384 language=zh variant=zh-tw
6386 -{zh:China;zh-tw:Taiwan}-, not China
6388 <p>Taiwan, not China
6394 Adding explicit session-wise language variant mapping (A flag)
6396 language=zh variant=zh-tw
6398 -{A|zh:China;zh-tw:Taiwan}- is China
6406 Adding explicit conversion rule for title (T flag)
6408 language=zh variant=zh-tw
6410 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
6412 <p>Should be stripped!
6418 Raw output of variant escape tags (R flag)
6420 language=zh variant=zh-tw
6422 Raw: -{R|zh:China;zh-tw:Taiwan}-
6424 <p>Raw: zh:China;zh-tw:Taiwan
6430 Do not convert roman numbers to language variants
6432 language=sr variant=sr-ec
6436 <p>Фридрих IV је цар.
6451 Try for 100% code coverage