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 # disabled do not run test
24 # For testing purposes, temporary articles can created:
25 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
26 # where '/' denotes a newline.
28 # This is the standard article assumed to exist.
48 This is a simple paragraph.
50 <p>This is a simple paragraph.
70 * plain''italic''plain
71 * plain''italic''plain''italic''plain
72 * plain'''bold'''plain
73 * plain'''bold'''plain'''bold'''plain
74 * plain''italic''plain'''bold'''plain
75 * plain'''bold'''plain''italic''plain
76 * plain''italic'''bold-italic'''italic''plain
77 * plain'''bold''bold-italic''bold'''plain
78 * plain'''''bold-italic'''italic''plain
79 * plain'''''bold-italic''bold'''plain
80 * plain''italic'''bold-italic'''''plain
81 * plain'''bold''bold-italic'''''plain
82 * plain l'''italic''plain
85 </li><li> plain<i>italic</i>plain
86 </li><li> plain<i>italic</i>plain<i>italic</i>plain
87 </li><li> plain<b>bold</b>plain
88 </li><li> plain<b>bold</b>plain<b>bold</b>plain
89 </li><li> plain<i>italic</i>plain<b>bold</b>plain
90 </li><li> plain<b>bold</b>plain<i>italic</i>plain
91 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
92 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
93 </li><li> plain<i><b>bold-italic</b>italic</i>plain
94 </li><li> plain<b><i>bold-italic</i>bold</b>plain
95 </li><li> plain<i>italic<b>bold-italic</b></i>plain
96 </li><li> plain<b>bold<i>bold-italic</i></b>plain
97 </li><li> plain l'<i>italic</i>plain
103 ### <nowiki> test cases
107 <nowiki> unordered list
109 <nowiki>* This is not an unordered list item.</nowiki>
111 <p>* This is not an unordered list item.
118 <nowiki>Lorem ipsum dolor
139 :There is not nowiki.
140 :There is <nowiki>nowiki</nowiki>.
142 #There is not nowiki.
143 #There is <nowiki>nowiki</nowiki>.
145 *There is not nowiki.
146 *There is <nowiki>nowiki</nowiki>.
148 <dl><dd>There is not nowiki.
149 </dd><dd>There is nowiki.
151 <ol><li>There is not nowiki.
152 </li><li>There is nowiki.
154 <ul><li>There is not nowiki.
155 </li><li>There is nowiki.
166 <!-- comment 1 --> asdf
202 asdf<!-- comment 1 -->jkl
212 <!-- foo --> b <!-- bar -->
226 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
232 Comment semantics and delimiters
234 <!-- --><!----><!-----><!------>
240 Comment semantics and delimiters, redux
242 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
243 -- foo -- funky huh? ... -->
249 Comment semantics and delimiters: directors cut
251 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
252 everything starting with < followed by !-- until the first -- and > we see,
253 that wouldn't be valid XML however, since in XML -- has to terminate a comment
261 Comment semantics: nesting
263 <!--<!-- no, we're not going to do anything fancy here -->-->
270 Comment semantics: unclosed comment at end
272 <!--This comment will run out to the end of the document
279 ### Preformatted text
288 And a [[Main Page|link]]
294 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
299 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
316 <pre> with attributes (bug 3202)
318 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
320 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
325 <pre> with width attribute (bug 3202)
327 <pre width="8">Narrow screen goodies</pre>
329 <pre width="8">Narrow screen goodies</pre>
334 <pre> with forbidden attribute (bug 3202)
336 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
338 <pre width="8">Narrow screen goodies</pre>
343 <pre> with forbidden attribute values (bug 3202)
345 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
347 <pre width="8">Narrow screen goodies</pre>
359 <dl><dt> name </dt><dd> Definition
369 <dl><dd> Indented text
375 Definition list with no space
379 <dl><dt>name</dt><dd>Definition
385 Definition list with URL link
387 ; http://example.com/ : definition
389 <dl><dt> <a href="http://example.com/" class='external free' title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
395 Definition list with bracketed URL link
397 ;[http://www.example.com/ Example]:Something about it
399 <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
405 Definition list with wikilink containing colon
407 ; [[Help:FAQ]]: The least-read page on Wikipedia
409 <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
414 # At Brion's and JeLuF's insistence... :)
416 Definition list with wikilink containing colon
418 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
420 <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!
426 Malformed definition list with colon
428 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
430 <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
436 Definition lists: colon in external link text
438 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
440 <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
446 Definition lists: colon in HTML attribute
448 ;<b style="display: inline">bold</b>
450 <dl><dt><b style="display: inline">bold</b>
457 Definition lists: self-closed tag
459 ;one<br/>two : two-line fun
461 <dl><dt>one<br />two </dt><dd> two-line fun
471 External links: non-bracketed
473 Non-bracketed: http://example.com
475 <p>Non-bracketed: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
480 External links: numbered
482 Numbered: [http://example.com]
483 Numbered: [http://example.net]
484 Numbered: [http://example.org]
486 <p>Numbered: <a href="http://example.com" class='external autonumber' title="http://example.com" rel="nofollow">[1]</a>
487 Numbered: <a href="http://example.net" class='external autonumber' title="http://example.net" rel="nofollow">[2]</a>
488 Numbered: <a href="http://example.org" class='external autonumber' title="http://example.org" rel="nofollow">[3]</a>
493 External links: specified text
495 Specified text: [http://example.com link]
497 <p>Specified text: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>
502 External links: trail
504 Linktrails should not work for external links: [http://example.com link]s
506 <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
511 External links: dollar sign in URL
513 http://example.com/1$2345
515 <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>
520 External links: dollar sign in URL (named)
522 [http://example.com/1$2345]
524 <p><a href="http://example.com/1$2345" class='external autonumber' title="http://example.com/1$2345" rel="nofollow">[1]</a>
529 External links: open square bracket forbidden in URL (bug 4377)
531 http://example.com/1[2345
533 <p><a href="http://example.com/1" class='external free' title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
538 External links: open square bracket forbidden in URL (named) (bug 4377)
540 [http://example.com/1[2345]
542 <p><a href="http://example.com/1" class='external text' title="http://example.com/1" rel="nofollow">[2345</a>
549 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
551 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
556 External image from https
558 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
560 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
565 Link to non-http image, no img tag
567 Link to non-http image, no img tag: ftp://example.com/test.jpg
569 <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>
574 External links: terminating separator
576 Terminating separator: http://example.com/thing,
578 <p>Terminating separator: <a href="http://example.com/thing" class='external free' title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
583 External links: intervening separator
585 Intervening separator: http://example.com/1,2,3
587 <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>
592 External links: old bug with URL in query
594 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
596 <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>
601 External links: old URL-in-URL bug, mixed protocols
603 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
605 <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>
610 External links: URL in text
612 URL in text: [http://example.com http://example.com]
614 <p>URL in text: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
619 External links: Clickable images
621 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
623 <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>
628 External links: raw ampersand
630 Old & use: http://x&y
632 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
637 External links: encoded ampersand
639 Old & use: http://x&y
641 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
646 External links: encoded equals (bug 6102)
648 http://example.com/?foo=bar
650 <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>
655 External links: [raw ampersand]
657 Old & use: [http://x&y]
659 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
664 External links: [encoded ampersand]
666 Old & use: [http://x&y]
668 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
673 External links: [encoded equals] (bug 6102)
675 [http://example.com/?foo=bar]
677 <p><a href="http://example.com/?foo=bar" class='external autonumber' title="http://example.com/?foo=bar" rel="nofollow">[1]</a>
682 External links: www.jpeg.org (bug 554)
686 <p><a href="http://www.jpeg.org" class='external free' title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
691 External links: URL within URL (original bug 2)
693 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
695 <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>
700 BUG 361: URL inside bracketed URL
702 [http://www.example.com/foo http://www.example.com/bar]
704 <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>
709 BUG 361: URL within URL, not bracketed
711 http://www.example.com/foo?=http://www.example.com/bar
713 <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>
718 BUG 289: ">"-token in URL-tail
720 http://www.example.com/<hello>
722 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
727 BUG 289: literal ">"-token in URL-tail
729 http://www.example.com/<b>html</b>
731 <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>
736 BUG 289: ">"-token in bracketed URL
738 [http://www.example.com/<hello> stuff]
740 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
745 BUG 289: literal ">"-token in bracketed URL
747 [http://www.example.com/<b>html</b> stuff]
749 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
754 BUG 289: literal double quote at end of URL
756 http://www.example.com/"hello"
758 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
763 BUG 289: literal double quote in bracketed URL
765 [http://www.example.com/"hello" stuff]
767 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
772 External links: invalid character
773 Fixme: the missing char seems to have gone missing
777 [http://www.example.com test]
779 <p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
784 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
786 [http://www.example.com test]
788 <p><a href="http://www.example.com" class='external text' title="http://www.example.com" rel="nofollow">test</a>
793 External links: wiki links within external link (Bug 3695)
795 [http://example.com [[wikilink]] embedded in ext link]
797 <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>
802 BUG 787: Links with one slash after the url protocol are invalid
806 [http:/example.com title]
809 </p><p>[http:/example.com title]
814 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
816 ''[http://example.com text'']
817 [http://example.com '''text]'''
818 ''Something [http://example.com in italic'']
819 ''Something [http://example.com mixed''''', even bold]'''
820 '''''Now [http://example.com both''''']
822 <p><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>text</i></a>
823 <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><b>text</b></a>
824 <i>Something </i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>in italic</i></a>
825 <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>
826 <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>
834 http://www.example.com/?title=AT%26T
836 <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>
841 Bug 4781, 5267: %26 in URL
843 http://www.example.com/?title=100%25_Bran
845 <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>
850 Bug 4781, 5267: %28, %29 in URL
852 http://www.example.com/?title=Ben-Hur_%281959_film%29
854 <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>
860 Bug 4781: %26 in autonumber URL
862 [http://www.example.com/?title=AT%26T]
864 <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>
869 Bug 4781, 5267: %26 in autonumber URL
871 [http://www.example.com/?title=100%25_Bran]
873 <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>
878 Bug 4781, 5267: %28, %29 in autonumber URL
880 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
882 <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>
888 Bug 4781: %26 in bracketed URL
890 [http://www.example.com/?title=AT%26T link]
892 <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>
897 Bug 4781, 5267: %26 in bracketed URL
899 [http://www.example.com/?title=100%25_Bran link]
901 <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>
906 Bug 4781, 5267: %28, %29 in bracketed URL
908 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
910 <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>
915 External link containing double-single-quotes in text '' (bug 4598 sanity check)
917 Some [http://example.com/ pretty ''italics'' and stuff]!
919 <p>Some <a href="http://example.com/" class='external text' title="http://example.com/" rel="nofollow">pretty <i>italics</i> and stuff</a>!
924 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
926 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
928 <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>
941 Normal text. '''Bold text.''' Normal text. ''Italic text.''
943 Normal text. '''''Bold italic text.''''' Normal text.
945 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
946 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
952 Unclosed and unmatched quotes
954 '''''Bold italic text '''with bold deactivated''' in between.'''''
956 '''''Bold italic text ''with italic deactivated'' in between.'''''
960 ..spanning two paragraphs (should not work).'''
962 '''Bold tag left open
964 ''Italic tag left open
968 <!-- Unmatching number of opening, closing tags: -->
969 '''This year''''s election ''should'' beat '''last year''''s.
971 ''Tom'''s car is bigger than ''Susan'''s.
973 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
974 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
975 </p><p><b>Bold text..</b>
976 </p><p>..spanning two paragraphs (should not work).
977 </p><p><b>Bold tag left open</b>
978 </p><p><i>Italic tag left open</i>
980 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
981 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
988 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
991 # This should not produce <table></table> as <table><tr><td></td></tr></table>
992 # is the bare minimun required by the spec, see:
993 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
995 A table with no data.
1001 # A table with nothing but a caption is invalid XHTML, we might want to render
1002 # this as <p>caption</p>
1004 A table with nothing but a caption
1012 </caption><tr><td></td></tr></table>
1036 Multiplication table
1038 {| border="1" cellpadding="2"
1039 |+Multiplication table
1041 ! × !! 1 !! 2 !! 3
1059 <table border="1" cellpadding="2">
1060 <caption>Multiplication table
1063 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1067 </th><td> 1 </td><td> 2 </td><td> 3
1071 </th><td> 2 </td><td> 4 </td><td> 6
1075 </th><td> 3 </td><td> 6 </td><td> 9
1079 </th><td> 4 </td><td> 8 </td><td> 12
1083 </th><td> 5 </td><td> 10 </td><td> 15
1091 {| align=right border=1
1093 |rowspan=2| Cell 2, row 1 (and 2)
1100 <table align="right" border="1">
1103 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1104 </td><td> Cell 3, row 1
1108 </td><td> Cell 3, row 2
1119 {| bgcolor=#ABCDEF border=2
1124 |the original table again
1131 <table bgcolor="#ABCDEF" border="2">
1138 </td><td>the original table again
1144 Invalid attributes in table cell (bug 1830)
1158 # FIXME: this one has incorrect tag nesting still.
1160 Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)
1163 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1167 <td><a href="ftp://|x||" class='external autonumber' title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1179 Plain link, capitalized
1183 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1188 Plain link, uncapitalized
1192 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1199 [[Main Page|The Main Page]]
1201 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1210 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1217 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1219 <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>
1226 [[Main Page]]xxx, [[Main Page]]XXX
1228 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1233 Link with 3 brackets
1242 Piped link with 3 brackets
1244 [[[main page|the main page]]]
1246 <p>[[[main page|the main page]]]
1251 Link with multiple pipes
1253 [[Main Page|The|Main|Page]]
1255 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1262 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1264 <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>
1269 Piped link to namespace
1271 [[Meta:Disclaimers|The disclaimers]]
1273 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1280 [[Usually caused by a typo (oops}]]
1282 <p>[[Usually caused by a typo (oops}]]
1287 Link containing % (not as a hex sequence)
1291 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1296 Link containing % as a single hex sequence interpreted to char
1300 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1305 Link containing % as a double hex sequence interpreted to hex sequence
1309 <p>[[7%2525 Solution]]
1314 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1315 Example for such a section: == < ==
1317 [[%23%3c]][[%23%3e]]
1319 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1324 Link containing "<#" and ">#" as a hex sequences
1326 [[%3c%23]][[%3e%23]]
1328 <p>[[%3c%23]][[%3e%23]]
1333 Link containing double-single-quotes '' (bug 4598)
1335 [[Lista d''e paise d''o munno]]
1337 <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>
1342 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1344 Some [[Link|pretty ''italics'' and stuff]]!
1346 <p>Some <a href="/index.php?title=Link&action=edit" class="new" title="Link">pretty <i>italics</i> and stuff</a>!
1351 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1353 ''Some [[Link|pretty ''italics'' and stuff]]!
1355 <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>
1362 [[http://www.example.org]]
1364 <p>[<a href="http://www.example.org" class='external autonumber' title="http://www.example.org" rel="nofollow">[1]</a>]
1368 # I'm fairly sure the expected result here is wrong.
1369 # We want these to be URL links, not pseudo-pages with URLs for titles....
1370 # However the current output is also pretty screwy.
1373 # I'm changing it to match the current output--it arguably makes more
1374 # sense in the light of the test above. Old expected result was:
1375 #<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>
1377 # But I think this test is bordering on "garbage in, garbage out" anyway.
1382 Piped link to URL: [[http://www.example.org|an example URL]]
1384 <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>]
1389 BUG 2: [[page|http://url/]] should link to page, not http://url/
1391 [[Main Page|http://url/]]
1393 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1398 BUG 337: Escaped self-links should be bold
1402 [[Bug462]] [[Bug462]]
1404 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1409 Self-link to section should not be bold
1413 [[Main Page#section]]
1415 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1420 <nowiki> inside a link
1422 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1424 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1429 ### Interwiki links (see maintenance/interwiki.sql)
1433 Inline interwiki link
1435 [[MeatBall:SoftSecurity]]
1437 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1442 Inline interwiki link with empty title (bug 2372)
1446 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class='extiw' title="meatball:">MeatBall:</a>
1451 Interwiki link encoding conversion (bug 1636)
1453 *[[Wikipedia:ro:Olteniţa]]
1454 *[[Wikipedia:ro:Olteniţa]]
1456 <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>
1457 </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>
1463 Interwiki link with fragment (bug 2130)
1465 [[MeatBall:SoftSecurity#foo]]
1467 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1485 Incorrecly removing closing slashes from correctly formed XHTML
1487 <br style="clear:both;" />
1489 <p><br style="clear:both;" />
1494 Failing to transform badly formed HTML into correct XHTML
1500 <p><br clear="left" />
1501 <br clear="right" />
1507 Horizontal ruler (should it add that extra space?)
1521 ### Block-level elements
1544 <ol><li>Numbered list
1561 ***#Number on level 4
1563 **#Number on level 3
1564 **#Number on level 3
1569 <ol><li> with numbers
1571 <ul><li> and bullets
1573 <ol><li> and numbers
1575 </li><li>bullets again
1576 <ul><li>bullet level 2
1577 <ul><li>bullet level 3
1578 <ol><li>Number on level 4
1581 </li><li>bullet level 2
1582 <ol><li>Number on level 3
1583 </li><li>Number on level 3
1586 <ol><li>number level 2
1594 List items are not parsed correctly following a <pre> block (bug 785)
1600 <ul><li> <pre>foo</pre>
1601 </li><li> <pre>bar</pre>
1612 Magic Word: {{CURRENTDAY}}
1621 Magic Word: {{CURRENTDAY2}}
1630 Magic Word: {{CURRENTDAYNAME}}
1639 Magic Word: {{CURRENTDOW}}
1648 Magic Word: {{CURRENTMONTH}}
1657 Magic Word: {{CURRENTMONTHABBREV}}
1659 {{CURRENTMONTHABBREV}}
1666 Magic Word: {{CURRENTMONTHNAME}}
1668 {{CURRENTMONTHNAME}}
1675 Magic Word: {{CURRENTMONTHNAMEGEN}}
1677 {{CURRENTMONTHNAMEGEN}}
1684 Magic Word: {{CURRENTTIME}}
1693 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1702 Magic Word: {{CURRENTYEAR}}
1711 Magic Word: {{FULLPAGENAME}}
1713 title=[[User:Ævar Arnfjörð Bjarmason]]
1717 <p>User:Ævar Arnfjörð Bjarmason
1722 Magic Word: {{FULLPAGENAMEE}}
1724 title=[[User:Ævar Arnfjörð Bjarmason]]
1728 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1733 Magic Word: {{NAMESPACE}}
1735 title=[[User:Ævar Arnfjörð Bjarmason]]
1745 Magic Word: {{NAMESPACEE}}
1747 title=[[User:Ævar Arnfjörð Bjarmason]]
1757 Magic Word: {{NUMBEROFARTICLES}}
1759 {{NUMBEROFARTICLES}}
1766 Magic Word: {{NUMBEROFFILES}}
1775 Magic Word: {{PAGENAME}}
1777 title=[[User:Ævar Arnfjörð Bjarmason]]
1782 <p>Ævar Arnfjörð Bjarmason
1787 Magic Word: {{PAGENAMEE}}
1789 title=[[User:Ævar Arnfjörð Bjarmason]]
1793 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1798 Magic Word: {{REVISIONID}}
1807 Magic Word: {{SCRIPTPATH}}
1816 Magic Word: {{SERVER}}
1820 <p><a href="http://localhost" class='external free' title="http://localhost" rel="nofollow">http://localhost</a>
1825 Magic Word: {{SERVERNAME}}
1834 Magic Word: {{SITENAME}}
1843 Namespace 1 {{ns:1}}
1852 Namespace 1 {{ns:01}}
1861 Namespace 0 {{ns:0}} (bug 4783)
1869 Namespace 0 {{ns:00}} (bug 4783)
1877 Namespace -1 {{ns:-1}}
1886 Namespace Project {{ns:User}}
1899 Magic links: internal link to RFC (bug 479)
1903 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1908 Magic links: RFC (bug 479)
1912 <p><a href='http://www.ietf.org/rfc/rfc822.txt' class='external' title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
1917 Magic links: ISBN (bug 1937)
1921 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1926 Magic links: PMID incorrectly converts space to underscore
1930 <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>
1939 Nonexistant template
1941 {{thistemplatedoesnotexist}}
1943 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1950 This is a test template
1958 <p>This is a test template
1963 Template with explicit namespace
1967 <p>This is a test template
1975 This is a test template with parameter {{{param}}}
1981 {{paramtest|param=foo}}
1983 <p>This is a test template with parameter foo
1988 Template:paramtestnum
1994 Template unnamed parameter
1996 {{paramtestnum|Main Page|the main page}}
1998 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2003 Template:templatesimple
2009 Template:templateredirect
2011 #redirect [[Template:templatesimple]]
2015 Template:templateasargtestnum
2021 Template:templateasargtest
2023 {{template{{{templ}}}}}
2027 Template:templateasargtest2
2033 Template with template name as unnamed argument
2035 {{templateasargtestnum|templatesimple}}
2042 Template with template name as argument
2044 {{templateasargtest|templ=simple}}
2051 Template with template name as argument (2)
2053 {{templateasargtest2|templ=templatesimple}}
2060 Template:templateasargtestdefault
2062 {{{{{templ|templatesimple}}}}}
2072 Template with default value
2074 {{templateasargtestdefault}}
2081 Template with default value (value set)
2083 {{templateasargtestdefault|templ=templa}}
2092 {{templateredirect}}
2099 Template with argument in separate line
2101 {{ templateasargtest |
2109 Template with complex template as argument
2112 param ={{ templateasargtest |
2115 <p>This is a test template with parameter (test)
2120 Template with thumb image (wiht link in description)
2123 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2125 This is a test template with parameter <div class="thumb tright"><div style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="Image:Noimage.png">Image:Noimage.png</a> <div class="thumbcaption" ><a href="/index.php?title=No_link&action=edit" class="new" title="No link">link</a> <a href="/index.php?title=No_link&action=edit" class="new" title="No link">caption</a></div></div></div>
2130 Template:complextemplate
2132 {{{1}}} {{paramtest|
2133 param ={{{param}}}}}
2137 Template with complex arguments
2140 param ={{ templateasargtest |
2141 templ = simple }}|[[Template:complextemplate|link]]}}
2143 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2148 BUG 553: link with two variables in a piped link
2151 |[[{{{1}}}|{{{2}}}]]
2156 <td>[[{{{1}}}|{{{2}}}]]
2162 Magic variable as template parameter
2164 {{paramtest|param={{SITENAME}}}}
2166 <p>This is a test template with parameter MediaWiki
2173 [[{{{param}}}|link]]
2177 Template parameter as link source
2179 {{linktest|param=Main Page}}
2181 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2189 including another template, {{paramtest|param={{{arg}}}}}
2193 Template passing argument to another template
2195 {{paramtest2|arg='hmm'}}
2197 <p>including another template, This is a test template with parameter 'hmm'
2208 Template as link source
2212 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2230 Template infinite loop
2234 <p>{{loop1}}<!-- WARNING: template loop detected -->
2239 Template from main namespace
2258 BUG 529: Template with table, not included at beginning of line
2275 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2293 BUG 41: Template parameters shown as broken links
2305 ''None'' of '''this''' should be
2307 but rather passed unmodified
2311 # hmm, fix this or just deprecate msgnw and document its behavior?
2317 {{msgnw:MSGNW test}}
2319 <p>''None'' of '''this''' should be
2321 but rather passed unmodified
2329 {{int:youhavenewmessages|lots of money|not!}}
2331 <p>You have lots of money (not!).
2338 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2342 <includeonly> and <noinclude> being included
2353 <onlyinclude>Foo</onlyinclude>bar
2357 <onlyinclude> being included
2369 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2373 <onlyinclude> and <includeonly> being included
2382 <includeonly> and <noinclude> on a page
2384 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2391 <onlyinclude> on a page
2393 <onlyinclude>Foo</onlyinclude>bar
2400 ### Pre-save transform tests
2403 pre-save transform: subst:
2409 This is a test template
2413 pre-save transform: normal template
2423 pre-save transform: nonexistant template
2427 {{thistemplatedoesnotexist}}
2429 {{thistemplatedoesnotexist}}
2434 pre-save transform: subst magic variables
2443 # This is bug 89, which I fixed. -- wtm
2445 pre-save transform: subst: templates with parameters
2449 {{subst:paramtest|param="something else"}}
2451 This is a test template with parameter "something else"
2457 <nowiki>'''not wiki'''</nowiki>
2461 pre-save transform: nowiki in subst (bug 1188)
2465 {{subst:nowikitest}}
2467 <nowiki>'''not wiki'''</nowiki>
2472 Template:commenttest
2474 This template has <!-- a comment --> in it.
2478 pre-save transform: comment in subst (bug 1936)
2482 {{subst:commenttest}}
2484 This template has <!-- a comment --> in it.
2488 pre-save transform: unclosed tag
2492 <nowiki>'''not wiki'''
2494 <nowiki>'''not wiki'''
2498 pre-save transform: mixed tag case
2502 <NOwiki>'''not wiki'''</noWIKI>
2504 <NOwiki>'''not wiki'''</noWIKI>
2508 pre-save transform: unclosed comment in <nowiki>
2512 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2514 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2520 <span onmouseover="alert('crap')">Oh no</span>
2524 (confirming safety of fix for subst bug 1936)
2526 {{Template:dangerous}}
2528 <p><span>Oh no</span>
2533 pre-save transform: comment containing gallery (bug 5024)
2537 <!-- <gallery>data</gallery> -->
2539 <!-- <gallery>data</gallery> -->
2543 pre-save transform: comment containing extension
2547 <!-- <tag>data</tag> -->
2549 <!-- <tag>data</tag> -->
2553 pre-save transform: comment containing nowiki
2557 <!-- <nowiki>data</nowiki> -->
2559 <!-- <nowiki>data</nowiki> -->
2563 pre-save transform: comment containing math
2567 <!-- <math>data</math> -->
2569 <!-- <math>data</math> -->
2574 ### Message transform tests
2577 message transform: magic variables
2587 message transform: should not transform wiki markup
2602 [[Image:foobar.jpg]]
2604 <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>
2611 [[Image:foobar.jpg|right]]
2613 <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>
2620 [[Image:foobar.jpg|right|Caption text]]
2622 <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>
2627 Image with frame and link
2629 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2631 <div class="thumb tleft"><div 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" /></a> <div class="thumbcaption" >This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
2636 Link to image page- image page normally doesn't exists, hence edit link
2637 TODO: Add test with existing image page
2638 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2642 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2647 Frameless image caption with a free URL
2649 [[Image:foobar.jpg|http://example.com]]
2651 <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>
2656 Thumbnail image caption with a free URL
2658 [[Image:foobar.jpg|thumb|http://example.com]]
2660 <div class="thumb tright"><div 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" /></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="Enlarge" /></a></div><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a></div></div></div>
2665 BUG 1887: A ISBN with a thumbnail
2667 [[Image:foobar.jpg|thumb|ISBN 12354]]
2669 <div class="thumb tright"><div style="width:182px;"><a href="/wiki/Image:Foobar.jpg" class="internal" title="ISBN 12354"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="ISBN 12354" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" /></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="Enlarge" /></a></div><a href="/index.php?title=Special:Booksources&isbn=12354" class="internal">ISBN 12354</a></div></div></div>
2674 BUG 1887: A RFC with a thumbnail
2676 [[Image:foobar.jpg|thumb|This is RFC 12354]]
2678 <div class="thumb tright"><div 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" /></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="Enlarge" /></a></div>This is <a href='http://www.ietf.org/rfc/rfc12354.txt' class='external' title="http://www.ietf.org/rfc/rfc12354.txt">RFC 12354</a></div></div></div>
2683 BUG 1887: A mailto link with a thumbnail
2685 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
2687 <div class="thumb tright"><div 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" /></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="Enlarge" /></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>
2692 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
2693 so math is not stripped and turns up as escaped <math> tags.
2695 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2697 <div class="thumb tright"><div 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" /></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="Enlarge" /></a></div><math>2+2</math></div></div></div>
2702 BUG 1887, part 2: A <math> with a thumbnail- math enabled
2706 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2708 <div class="thumb tright"><div 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" /></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="Enlarge" /></a></div><span class="texhtml">2 + 2</span></div></div></div>
2712 # Pending resolution to bug 368
2714 BUG 648: Frameless image caption with a link
2716 [[Image:foobar.jpg|text with a [[link]] in it]]
2718 <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>
2723 BUG 648: Frameless image caption with a link (suffix)
2725 [[Image:foobar.jpg|text with a [[link]]foo in it]]
2727 <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>
2732 BUG 648: Frameless image caption with an interwiki link
2734 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
2736 <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>
2741 BUG 648: Frameless image caption with a piped interwiki link
2743 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
2745 <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>
2750 Escape HTML special chars in image alt text
2752 [[Image:foobar.jpg|& < > "]]
2754 <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>
2759 BUG 499: Alt text should have Ӓ, not &1234;
2761 [[Image:foobar.jpg|♀]]
2763 <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>
2768 Broken image caption with link
2770 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
2772 <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.
2777 Image caption containing another image
2779 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
2781 <div class="thumb tright"><div 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" /></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="Enlarge" /></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>
2786 Image caption containing a newline
2788 [[Image:Foobar.jpg|This
2791 <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>
2797 Bug 3090: External links other than http: in image captions
2799 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
2801 <div class="thumb tright"><div 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" /></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="Enlarge" /></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>
2810 Subpage test/subpage
2818 subpage title=[[Subpage test]]
2822 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
2827 Subpage noslash link
2829 subpage title=[[Subpage test]]
2833 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
2842 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
2847 BUG 561: {{/Subpage}}
2849 subpage title=[[Page]]
2853 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
2861 Category:MediaWiki User's Guide
2869 [[:Category:MediaWiki User's Guide]]
2871 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
2880 [[Category:MediaWiki User's Guide]]
2882 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
2886 ### Inter-language links
2889 Inter-language links
2895 [[zh:食品]]
2897 es:Alimento fr:Nourriture zh:食品
2904 Basic section headings
2906 title=[[Parser test script]]
2913 ===Smaller headline===
2916 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2>
2919 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</div><a name="Headline_2"></a><h2>Headline 2</h2>
2922 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</div><a name="Smaller_headline"></a><h3>Smaller headline</h3>
2928 Section headings with TOC
2930 title=[[Parser test script]]
2933 === Subheadline 1 ===
2934 ===== Skipping a level =====
2935 ====== Skipping a level ======
2939 ===Another headline===
2941 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2943 <li class='toclevel-1'><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
2945 <li class='toclevel-2'><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
2947 <li class='toclevel-3'><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
2949 <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>
2956 <li class='toclevel-1'><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
2958 <li class='toclevel-2'><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
2962 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2963 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2>
2964 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</div><a name="Subheadline_1"></a><h3> Subheadline 1 </h3>
2965 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</div><a name="Skipping_a_level"></a><h5> Skipping a level </h5>
2966 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</div><a name="Skipping_a_level_2"></a><h6> Skipping a level </h6>
2967 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</div><a name="Headline_2"></a><h2> Headline 2 </h2>
2970 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=6" title="Edit section: Another headline">edit</a>]</div><a name="Another_headline"></a><h3>Another headline</h3>
2974 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
2976 Handling of sections up to level 6 and beyond
2979 == Level 2 Heading==
2980 === Level 3 Heading===
2981 ==== Level 4 Heading====
2982 ===== Level 5 Heading=====
2983 ====== Level 6 Heading======
2984 ======= Level 7 Heading=======
2985 ======== Level 8 Heading========
2986 ========= Level 9 Heading=========
2987 ========== Level 10 Heading==========
2989 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2991 <li class='toclevel-1'><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
2993 <li class='toclevel-2'><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
2995 <li class='toclevel-3'><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
2997 <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>
2999 <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>
3001 <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>
3002 <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>
3003 <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>
3004 <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>
3005 <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>
3017 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3018 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</div><a name="Level_1_Heading"></a><h1> Level 1 Heading</h1>
3019 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</div><a name="Level_2_Heading"></a><h2> Level 2 Heading</h2>
3020 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</div><a name="Level_3_Heading"></a><h3> Level 3 Heading</h3>
3021 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</div><a name="Level_4_Heading"></a><h4> Level 4 Heading</h4>
3022 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</div><a name="Level_5_Heading"></a><h5> Level 5 Heading</h5>
3023 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</div><a name="Level_6_Heading"></a><h6> Level 6 Heading</h6>
3024 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</div><a name=".3D_Level_7_Heading.3D"></a><h6>= Level 7 Heading=</h6>
3025 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</div><a name=".3D.3D_Level_8_Heading.3D.3D"></a><h6>== Level 8 Heading==</h6>
3026 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</div><a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><h6>=== Level 9 Heading===</h6>
3027 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</div><a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><h6>==== Level 10 Heading====</h6>
3032 Resolving duplicate section names
3034 title=[[Parser test script]]
3039 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</div><a name="Foo_bar"></a><h2> Foo bar </h2>
3040 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</div><a name="Foo_bar_2"></a><h2> Foo bar </h2>
3052 Template with sections, __NOTOC__
3054 title=[[Parser test script]]
3061 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section 0">edit</a>]</div><a name="Section_0"></a><h2>Section 0</h2>
3062 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</div><a name="Section_1"></a><h3>Section 1</h3>
3063 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</div><a name="Section_2"></a><h2>Section 2</h2>
3064 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Section 4">edit</a>]</div><a name="Section_4"></a><h2>Section 4</h2>
3069 __NOEDITSECTION__ keyword
3075 <a name="Section_1"></a><h2>Section 1</h2>
3076 <a name="Section_2"></a><h2>Section 2</h2>
3081 Link inside a section heading
3083 title=[[Parser test script]]
3085 ==Section with a [[Main Page|link]] in it==
3087 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</div><a name="Section_with_a_link_in_it"></a><h2>Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</h2>
3093 BUG 1219 URL next to image (good)
3095 http://example.com [[Image:foobar.jpg]]
3097 <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>
3102 BUG 1219 URL next to image (broken)
3104 http://example.com[[Image:foobar.jpg]]
3106 <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>
3111 Bug 1186 news: in the middle of text
3113 http://en.wikinews.org/wiki/Wikinews:Workplace
3115 <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>
3121 Namespaced link must have a title
3130 Namespaced link must have a title (bad fragment version)
3132 [[Project:#fragment]]
3134 <p>[[Project:#fragment]]
3140 div with no attributes
3142 <div>HTML rocks</div>
3144 <div>HTML rocks</div>
3149 div with double-quoted attribute
3151 <div id="rock">HTML rocks</div>
3153 <div id="rock">HTML rocks</div>
3158 div with single-quoted attribute
3160 <div id='rock'>HTML rocks</div>
3162 <div id="rock">HTML rocks</div>
3167 div with unquoted attribute
3169 <div id=rock>HTML rocks</div>
3171 <div id="rock">HTML rocks</div>
3176 div with illegal double attributes
3178 <div align="center" align="right">HTML rocks</div>
3180 <div align="right">HTML rocks</div>
3185 HTML multiple attributes correction
3187 <p class="error" class="awesome">Awesome!</p>
3189 <p class="awesome">Awesome!</p>
3194 Table multiple attributes correction
3197 !+ class="error" class="awesome"| status
3202 <th class="awesome"> status
3210 <DIV ALIGN="center">HTML ROCKS</DIV>
3212 <div align="center">HTML ROCKS</div>
3218 text with amp in the middle of nowhere
3222 <p>Remember AT&T?
3227 text with character entity: eacute
3229 I always thought é was a cute letter.
3231 <p>I always thought é was a cute letter.
3236 text with undefined character entity: xacute
3238 I always thought &xacute; was a cute letter.
3240 <p>I always thought &xacute; was a cute letter.
3252 [[Media:Foobar.jpg]]
3254 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Media:Foobar.jpg</a>
3259 Media link with text
3261 [[Media:Foobar.jpg|A neat file to look at]]
3263 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">A neat file to look at</a>
3267 # FIXME: this is still bad HTML tag nesting
3269 Media link with nasty text
3270 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3272 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3274 <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>
3279 Media link to nonexistent file (bug 1702)
3281 [[Media:No such.jpg]]
3283 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class='new' title="No such.jpg">Media:No such.jpg</a>
3288 Image link to nonexistent file (bug 1850 - good)
3290 [[Image:No such.jpg]]
3292 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3297 :Image link to nonexistent file (bug 1850 - bad)
3299 [[:Image:No such.jpg]]
3301 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3308 Character reference normalization in link text (bug 1938)
3310 [[Main Page|this&that]]
3312 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3317 Empty attribute crash test (bug 2067)
3319 <font color="">foo</font>
3321 <p><font color="">foo</font>
3326 Empty attribute crash test single-quotes (bug 2067)
3328 <font color=''>foo</font>
3330 <p><font color="">foo</font>
3335 Attribute test: equals, then nothing
3337 <font color=>foo</font>
3344 Attribute test: unquoted value
3346 <font color=x>foo</font>
3348 <p><font color="x">foo</font>
3353 Attribute test: unquoted but illegal value (hash)
3355 <font color=#x>foo</font>
3357 <p><font color="#x">foo</font>
3362 Attribute test: no value
3364 <font color>foo</font>
3366 <p><font color="color">foo</font>
3371 Bug 2095: link with three closing brackets
3375 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3380 Bug 2095: link with pipe and three closing brackets
3384 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3389 Bug 2095: link with pipe and three closing brackets, version 2
3391 [[Main Page|[http://example.com/]]]
3393 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3403 Template:Dangerous attribute
3405 " onmouseover="alert(document.cookie)
3409 Template:Dangerous style attribute
3411 border-size: expression(alert(document.cookie))
3417 <div style="float: right; {{{1}}}">Magic div</div>
3421 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3423 <div title="{{test}}"></div>
3425 <div title="This is a test template"></div>
3430 Bug 2304: HTML attribute safety (dangerous template; 2309)
3432 <div title="{{dangerous attribute}}"></div>
3434 <div title=""></div>
3439 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3441 <div style="{{dangerous style attribute}}"></div>
3448 Bug 2304: HTML attribute safety (safe parameter; 2309)
3450 {{div style|width: 200px}}
3452 <div style="float: right; width: 200px">Magic div</div>
3457 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3459 {{div style|width: expression(alert(document.cookie))}}
3461 <div>Magic div</div>
3466 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3468 {{div style|"><script>alert(document.cookie)</script>}}
3470 <div>Magic div</div>
3475 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3477 {{div style|" ><script>alert(document.cookie)</script>}}
3479 <div style="float: right; ">Magic div</div>
3484 Bug 2304: HTML attribute safety (link)
3486 <div title="[[Main Page]]"></div>
3488 <div title="[[Main Page]]"></div>
3493 Bug 2304: HTML attribute safety (italics)
3495 <div title="''foobar''"></div>
3497 <div title="''foobar''"></div>
3502 Bug 2304: HTML attribute safety (bold)
3504 <div title="'''foobar'''"></div>
3506 <div title="'''foobar'''"></div>
3512 Bug 2304: HTML attribute safety (ISBN)
3514 <div title="ISBN 1234567890"></div>
3516 <div title="ISBN 1234567890"></div>
3521 Bug 2304: HTML attribute safety (RFC)
3523 <div title="RFC 1234"></div>
3525 <div title="RFC 1234"></div>
3530 Bug 2304: HTML attribute safety (PMID)
3532 <div title="PMID 1234567890"></div>
3534 <div title="PMID 1234567890"></div>
3539 Bug 2304: HTML attribute safety (web link)
3541 <div title="http://example.com/"></div>
3543 <div title="http://example.com/"></div>
3548 Bug 2304: HTML attribute safety (named web link)
3550 <div title="[http://example.com/ link]"></div>
3552 <div title="[http://example.com/ link]"></div>
3557 Bug 3244: HTML attribute safety (extension; safe)
3559 <div style="<nowiki>background:blue</nowiki>"></div>
3561 <div style="background:blue"></div>
3566 Bug 3244: HTML attribute safety (extension; unsafe)
3568 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3575 Math section safety when disabled
3577 <math><script>alert(document.cookies);</script></math>
3579 <p><math><script>alert(document.cookies);</script></math>
3583 # More MSIE fun discovered by Tom Gilder
3586 MSIE CSS safety test: spurious slash
3588 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3595 MSIE CSS safety test: hex code
3597 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3604 MSIE CSS safety test: comment in url
3606 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3608 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3613 MSIE CSS safety test: comment in expression
3615 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3617 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3623 Table attribute legitimate extension
3626 !+ style="<nowiki>color:blue</nowiki>"| status
3631 <th style="color:blue"> status
3637 Table attribute safety
3640 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3651 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3654 Parser hook: empty input
3667 Parser hook: empty input using terminated empty elements
3680 Parser hook: empty input using terminated empty elements (space before)
3693 Parser hook: basic input
3707 Parser hook: case insensetive
3721 Parser hook: case insensetive, redux
3734 Parser hook: nested tags
3738 <tag><tag></tag></tag>
3749 Parser hook: basic arguments
3751 <tag width=200 height = "100" depth = '50' square></tag>
3770 Parser hook: argument containing a forward slash (bug 5344)
3772 <tag filename='/tmp/bla'></tag>
3778 string(8) "/tmp/bla"
3785 Parser hook: empty input using terminated empty elements (bug 2374)
3799 # </tag> should be output literally since there is no matching tag that begins it
3801 Parser hook: basic arguments using terminated empty elements (bug 2374)
3803 <tag width=200 height = "100" depth = '50' square/>
3826 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
3830 Parser hook: static parser hook not inside a comment
3832 <statictag>hello, world</statictag>
3833 <statictag action=flush/>
3841 Parser hook: static parser hook inside a comment
3843 <!-- <statictag>hello, world</statictag> -->
3844 <statictag action=flush/>
3850 # Nested template calls; this case was broken by Parser.php rev 1.506,
3854 Template:One-parameter
3856 (My parameter is: {{{1}}})
3860 Template:Map-one-parameter
3866 Nested template calls
3868 {{Map-one-parameter|One-parameter|param}}
3870 <p>(My parameter is: param)
3879 Sanitizer: Closing of open tags
3881 <s></s><table></table>
3883 <s></s><table></table>
3888 Sanitizer: Closing of open but not closed tags
3897 Sanitizer: Closing of closed but not open tags
3906 Sanitizer: Closing of closed but not open table tags
3908 Table not started</td></tr></table>
3910 <p>Table not started</td></tr></table>
3915 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
3917 <span id="æ: v">byte</span>[[#æ: v|backlink]]
3919 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
3924 Sanitizer: Validating the contents of the id attribute (bug 4515)
3930 Something, but defenetly not <br id="9" />...
3934 Language converter: output gets cut off unexpectedly (bug 5757)
3938 this bit is safe: }-
3940 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
3942 then we get cut off here: }-
3944 all additional text is vanished
3946 <p>this bit is safe: }-
3947 </p><p>but if we add a conversion instance: xxx
3948 </p><p>then we get cut off here: }-
3949 </p><p>all additional text is vanished
3954 Self closed html pairs (bug 5487)
3957 <center><font id="bug" />Centered text</center>
3958 <div><font id="bug2" />In div text</div>
3960 <center><font id="bug" />Centered text</center>
3961 <div><font id="bug2" />In div text</div>
3970 HTML bullet list, closed tags (bug 5497)
3985 HTML bullet list, unclosed tags (bug 5497)
4000 HTML ordered list, closed tags (bug 5497)
4015 HTML ordered list, unclosed tags (bug 5497)
4030 HTML nested bullet list, closed tags (bug 5497)
4055 HTML nested bullet list, open tags (bug 5497)
4078 HTML nested ordered list, closed tags (bug 5497)
4103 HTML nested ordered list, open tags (bug 5497)
4126 HTML ordered list item with parameters oddity
4128 <ol><li id="fragment">One</li></ol>
4130 <ol><li id="fragment">One</li></ol>
4135 bug 5918: autonumbering
4137 [http://first/] [http://second] [ftp://ftp]
4141 [mailto:enclosed@mail.tld With target]
4143 [mailto:enclosed@mail.tld]
4145 mailto:inline@mail.tld
4147 <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>
4148 </p><p><a href="ftp://inlineftp" class='external free' title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4149 </p><p><a href="mailto:enclosed@mail.tld" class='external text' title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4150 </p><p><a href="mailto:enclosed@mail.tld" class='external autonumber' title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4151 </p><p><a href="mailto:inline@mail.tld" class='external free' title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4157 # Security and HTML correctness
4158 # From Nick Jenkins' fuzz testing
4162 Fuzz testing: Parser13
4177 Fuzz testing: Parser14
4182 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</div><a name="onmouseover.3D"></a><h2> onmouseover= </h2>
4183 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4185 <li class='toclevel-1'><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4187 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4192 Fuzz testing: Parser14-table
4197 <div class="editsection" style="float:right;margin-left:5px;">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</div><a name="a"></a><h2>a</h2>
4198 <table style="__TOC__">
4204 # Known to produce bogus xml (extra </td>)
4206 Fuzz testing: Parser16
4215 <th>https://</th><th></th><th></th><th>
4223 Fuzz testing: Parser21
4226 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4231 <th> <a href="irc://{{ftp://a" class='external free' title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4240 Fuzz testing: Parser22
4242 http://===r:::https://b
4246 <p><a href="http://===r:::https://b" class='external free' title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4254 # Known to produce bad XML for now
4256 Fuzz testing: Parser24
4263 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4264 <br style="onmouseover='alert(document.cookie);' " />
4266 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4271 <u class="|">} >
4272 <br style="onmouseover='alert(document.cookie);' " />
4274 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4283 # Known to produce bad XML for now
4285 Fuzz testing: Parser25 (bug 6055)
4293 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4295 <li class="||">
4296 blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4301 Fuzz testing: URL adjacent extension (with space, clean)
4304 http://example.com <nowiki>junk</nowiki>
4306 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a> junk
4311 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4314 http://example.com<nowiki>junk</nowiki>
4316 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>junk
4321 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4324 http://example.com<pre>junk</pre>
4326 <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>
4331 Fuzz testing: image with bogus manual thumbnail
4333 [[Image:foobar.jpg|thumbnail= ]]
4335 <div class="thumb tright"><div 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="-1" longdesc="/wiki/Image:Foobar.jpg" /></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="Enlarge" /></a></div></div></div></div>
4340 Parsing optional HTML elements (Bug 6171)
4345 <td> Some tabular data</td>
4346 <td> More tabular data ...
4347 <td> And yet som tabular data</td>
4353 <td> Some tabular data</td>
4354 <td> More tabular data ...
4355 </td><td> And yet som tabular data</td>
4362 Correct handling of <td>, <tr> (Bug 6171)
4367 <td> Some tabular data</td>
4368 <td> More tabular data ...</td>
4369 <td> And yet som tabular data</td>
4375 <td> Some tabular data</td>
4376 <td> More tabular data ...</td>
4377 <td> And yet som tabular data</td>
4385 Parsing crashing regression (fr:JavaScript)
4389 <p></body></x>
4394 Inline wiki vs wiki block nesting
4400 <p><b>Bold paragraph</b>
4401 </p><p>New wiki paragraph
4406 Inline HTML vs wiki block nesting
4412 <p><b>Bold paragraph</b>
4413 </p><p>New wiki paragraph
4419 Mixing markup for italics and bold
4422 '''bold''''''bold''bolditalics'''''
4424 <p><b>bold</b><b>bold<i>bolditalics</i></b>
4432 Article for special page transclusion test
4436 Special page transclusion
4439 {{Special:Prefixindex/Xyzzyx}}
4443 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4448 Special page transclusion twice (bug 5021)
4451 {{Special:Prefixindex/Xyzzyx}}
4452 {{Special:Prefixindex/Xyzzyx}}
4456 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4459 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4464 Invalid header with following text
4474 Section extraction test (section 0)
4494 Section extraction test (section 1)
4516 Section extraction test (section 2)
4537 Section extraction test (section 3)
4557 Section extraction test (section 4)
4581 Section extraction test (section 5)
4601 Section extraction test (section 6)
4622 Section extraction test (section 7)
4642 Section extraction test (section 8)
4662 Section extraction test (section 9)
4683 Section extraction test (section 10)
4703 Section extraction test (nonexistent section 11)
4722 Section extraction test with bogus heading (section 1)
4727 ==bogus== not a legal section
4731 ==bogus== not a legal section
4735 Section extraction test with bogus heading (section 2)
4740 ==bogus== not a legal section
4747 Section extraction test with comment after heading (section 1)
4752 ==legal== <!-- a legal section -->
4759 Section extraction test with comment after heading (section 2)
4764 ==legal== <!-- a legal section -->
4767 ==legal== <!-- a legal section -->
4771 Section extraction test with bogus <nowiki> heading (section 1)
4776 ==bogus== <nowiki>not a legal section</nowiki>
4780 ==bogus== <nowiki>not a legal section</nowiki>
4784 Section extraction test with bogus <nowiki> heading (section 2)
4789 ==bogus== <nowiki>not a legal section</nowiki>
4797 Section extraction prefixed by comment (section 1) (bug 2587)
4808 Section extraction prefixed by comment (section 2) (bug 2587)
4820 Section extraction, mixed wiki and html (section 1) (bug 2607)
4836 Section extraction, mixed wiki and html (section 2) (bug 2607)
4853 Section extraction, heading surrounded by <noinclude> (bug 3342)
4857 <noinclude>==a==</noinclude>
4860 <noinclude>==a==</noinclude>
4866 Section extraction, HTML heading subsections (bug 5272)
4879 Section extraction, HTML headings should be ignored in extensions (bug 3476)
4893 Section replacement test (section 0)
4924 Section replacement test (section 1)
4953 Section replacement test (section 2)
4983 Section replacement test (section 3)
5014 Section replacement test (section 4)
5041 Section replacement test (section 5)
5072 Section replacement test (section 6)
5102 Section replacement test (section 7)
5133 Section replacement test (section 8)
5164 Section replacement test (section 9)
5193 Section replacement test (section 10)
5224 Section extraction, HTML headings not at line boundaries (section 0)
5228 <h2>Evil</h2><i>blah blah blah</i>
5236 <i>extra evil</i><h2>Extra nasty</h2>
5243 Section extraction, HTML headings not at line boundaries (section 1)
5247 <h2>Evil</h2><i>blah blah blah</i>
5255 <i>extra evil</i><h2>Extra nasty</h2>
5259 <h2>Evil</h2><i>blah blah blah</i>
5265 Section extraction, HTML headings not at line boundaries (section 2)
5269 <h2>Evil</h2><i>blah blah blah</i>
5277 <i>extra evil</i><h2>Extra nasty</h2>
5289 Section extraction, HTML headings not at line boundaries (section 3)
5293 <h2>Evil</h2><i>blah blah blah</i>
5301 <i>extra evil</i><h2>Extra nasty</h2>
5305 <h2>Extra nasty</h2>