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.
167 <!-- comment 1 --> asdf
203 asdf<!-- comment 1 -->jkl
213 <!-- foo --> b <!-- bar -->
227 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
233 Comment semantics and delimiters
235 <!-- --><!----><!-----><!------>
241 Comment semantics and delimiters, redux
243 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
244 -- foo -- funky huh? ... -->
250 Comment semantics and delimiters: directors cut
252 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
253 everything starting with < followed by !-- until the first -- and > we see,
254 that wouldn't be valid XML however, since in XML -- has to terminate a comment
262 Comment semantics: nesting
264 <!--<!-- no, we're not going to do anything fancy here -->-->
271 Comment semantics: unclosed comment at end
273 <!--This comment will run out to the end of the document
280 ### Preformatted text
289 And a [[Main Page|link]]
295 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
300 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
317 <pre> with attributes (bug 3202)
319 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
321 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
326 <pre> with width attribute (bug 3202)
328 <pre width="8">Narrow screen goodies</pre>
330 <pre width="8">Narrow screen goodies</pre>
335 <pre> with forbidden attribute (bug 3202)
337 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
339 <pre width="8">Narrow screen goodies</pre>
344 <pre> with forbidden attribute values (bug 3202)
346 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
348 <pre width="8">Narrow screen goodies</pre>
360 <dl><dt> name </dt><dd> Definition
370 <dl><dd> Indented text
376 Definition list with no space
380 <dl><dt>name</dt><dd>Definition
386 Definition list with URL link
388 ; http://example.com/ : definition
390 <dl><dt> <a href="http://example.com/" class='external free' title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
396 Definition list with bracketed URL link
398 ;[http://www.example.com/ Example]:Something about it
400 <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
406 Definition list with wikilink containing colon
408 ; [[Help:FAQ]]: The least-read page on Wikipedia
410 <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
415 # At Brion's and JeLuF's insistence... :)
417 Definition list with wikilink containing colon
419 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
421 <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!
427 Malformed definition list with colon
429 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
431 <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
437 Definition lists: colon in external link text
439 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
441 <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
447 Definition lists: colon in HTML attribute
449 ;<b style="display: inline">bold</b>
451 <dl><dt><b style="display: inline">bold</b>
458 Definition lists: self-closed tag
460 ;one<br/>two : two-line fun
462 <dl><dt>one<br />two </dt><dd> two-line fun
472 External links: non-bracketed
474 Non-bracketed: http://example.com
476 <p>Non-bracketed: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
481 External links: numbered
483 Numbered: [http://example.com]
484 Numbered: [http://example.net]
485 Numbered: [http://example.org]
487 <p>Numbered: <a href="http://example.com" class='external autonumber' title="http://example.com" rel="nofollow">[1]</a>
488 Numbered: <a href="http://example.net" class='external autonumber' title="http://example.net" rel="nofollow">[2]</a>
489 Numbered: <a href="http://example.org" class='external autonumber' title="http://example.org" rel="nofollow">[3]</a>
494 External links: specified text
496 Specified text: [http://example.com link]
498 <p>Specified text: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>
503 External links: trail
505 Linktrails should not work for external links: [http://example.com link]s
507 <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
512 External links: dollar sign in URL
514 http://example.com/1$2345
516 <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>
521 External links: dollar sign in URL (named)
523 [http://example.com/1$2345]
525 <p><a href="http://example.com/1$2345" class='external autonumber' title="http://example.com/1$2345" rel="nofollow">[1]</a>
530 External links: open square bracket forbidden in URL (bug 4377)
532 http://example.com/1[2345
534 <p><a href="http://example.com/1" class='external free' title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
539 External links: open square bracket forbidden in URL (named) (bug 4377)
541 [http://example.com/1[2345]
543 <p><a href="http://example.com/1" class='external text' title="http://example.com/1" rel="nofollow">[2345</a>
548 External links: nowiki in URL link text (bug 6230)
550 [http://example.com/ <nowiki>''example site''</nowiki>]
552 <p><a href="http://example.com/" class='external text' title="http://example.com/" rel="nofollow">''example site''</a>
557 External links: newline forbidden in text (bug 6230 regression check)
559 [http://example.com/ first
562 <p>[<a href="http://example.com/" class='external free' title="http://example.com/" rel="nofollow">http://example.com/</a> first
570 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
572 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
577 External image from https
579 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
581 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
586 Link to non-http image, no img tag
588 Link to non-http image, no img tag: ftp://example.com/test.jpg
590 <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>
595 External links: terminating separator
597 Terminating separator: http://example.com/thing,
599 <p>Terminating separator: <a href="http://example.com/thing" class='external free' title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
604 External links: intervening separator
606 Intervening separator: http://example.com/1,2,3
608 <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>
613 External links: old bug with URL in query
615 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
617 <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>
622 External links: old URL-in-URL bug, mixed protocols
624 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
626 <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>
631 External links: URL in text
633 URL in text: [http://example.com http://example.com]
635 <p>URL in text: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
640 External links: Clickable images
642 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
644 <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>
649 External links: raw ampersand
651 Old & use: http://x&y
653 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
658 External links: encoded ampersand
660 Old & use: http://x&y
662 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
667 External links: encoded equals (bug 6102)
669 http://example.com/?foo=bar
671 <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>
676 External links: [raw ampersand]
678 Old & use: [http://x&y]
680 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
685 External links: [encoded ampersand]
687 Old & use: [http://x&y]
689 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
694 External links: [encoded equals] (bug 6102)
696 [http://example.com/?foo=bar]
698 <p><a href="http://example.com/?foo=bar" class='external autonumber' title="http://example.com/?foo=bar" rel="nofollow">[1]</a>
703 External links: www.jpeg.org (bug 554)
707 <p><a href="http://www.jpeg.org" class='external free' title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
712 External links: URL within URL (original bug 2)
714 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
716 <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>
721 BUG 361: URL inside bracketed URL
723 [http://www.example.com/foo http://www.example.com/bar]
725 <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>
730 BUG 361: URL within URL, not bracketed
732 http://www.example.com/foo?=http://www.example.com/bar
734 <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>
739 BUG 289: ">"-token in URL-tail
741 http://www.example.com/<hello>
743 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
748 BUG 289: literal ">"-token in URL-tail
750 http://www.example.com/<b>html</b>
752 <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>
757 BUG 289: ">"-token in bracketed URL
759 [http://www.example.com/<hello> stuff]
761 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
766 BUG 289: literal ">"-token in bracketed URL
768 [http://www.example.com/<b>html</b> stuff]
770 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
775 BUG 289: literal double quote at end of URL
777 http://www.example.com/"hello"
779 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
784 BUG 289: literal double quote in bracketed URL
786 [http://www.example.com/"hello" stuff]
788 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
793 External links: invalid character
794 Fixme: the missing char seems to have gone missing
798 [http://www.example.com test]
800 <p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
805 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
807 [http://www.example.com test]
809 <p><a href="http://www.example.com" class='external text' title="http://www.example.com" rel="nofollow">test</a>
814 External links: wiki links within external link (Bug 3695)
816 [http://example.com [[wikilink]] embedded in ext link]
818 <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>
823 BUG 787: Links with one slash after the url protocol are invalid
827 [http:/example.com title]
830 </p><p>[http:/example.com title]
835 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
837 ''[http://example.com text'']
838 [http://example.com '''text]'''
839 ''Something [http://example.com in italic'']
840 ''Something [http://example.com mixed''''', even bold]'''
841 '''''Now [http://example.com both''''']
843 <p><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>text</i></a>
844 <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><b>text</b></a>
845 <i>Something </i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>in italic</i></a>
846 <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>
847 <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>
855 http://www.example.com/?title=AT%26T
857 <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>
862 Bug 4781, 5267: %26 in URL
864 http://www.example.com/?title=100%25_Bran
866 <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>
871 Bug 4781, 5267: %28, %29 in URL
873 http://www.example.com/?title=Ben-Hur_%281959_film%29
875 <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>
881 Bug 4781: %26 in autonumber URL
883 [http://www.example.com/?title=AT%26T]
885 <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>
890 Bug 4781, 5267: %26 in autonumber URL
892 [http://www.example.com/?title=100%25_Bran]
894 <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>
899 Bug 4781, 5267: %28, %29 in autonumber URL
901 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
903 <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>
909 Bug 4781: %26 in bracketed URL
911 [http://www.example.com/?title=AT%26T link]
913 <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>
918 Bug 4781, 5267: %26 in bracketed URL
920 [http://www.example.com/?title=100%25_Bran link]
922 <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>
927 Bug 4781, 5267: %28, %29 in bracketed URL
929 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
931 <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>
936 External link containing double-single-quotes in text '' (bug 4598 sanity check)
938 Some [http://example.com/ pretty ''italics'' and stuff]!
940 <p>Some <a href="http://example.com/" class='external text' title="http://example.com/" rel="nofollow">pretty <i>italics</i> and stuff</a>!
945 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
947 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
949 <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>
962 Normal text. '''Bold text.''' Normal text. ''Italic text.''
964 Normal text. '''''Bold italic text.''''' Normal text.
966 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
967 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
973 Unclosed and unmatched quotes
975 '''''Bold italic text '''with bold deactivated''' in between.'''''
977 '''''Bold italic text ''with italic deactivated'' in between.'''''
981 ..spanning two paragraphs (should not work).'''
983 '''Bold tag left open
985 ''Italic tag left open
989 <!-- Unmatching number of opening, closing tags: -->
990 '''This year''''s election ''should'' beat '''last year''''s.
992 ''Tom'''s car is bigger than ''Susan'''s.
994 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
995 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
996 </p><p><b>Bold text..</b>
997 </p><p>..spanning two paragraphs (should not work).
998 </p><p><b>Bold tag left open</b>
999 </p><p><i>Italic tag left open</i>
1001 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
1002 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
1009 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
1012 # This should not produce <table></table> as <table><tr><td></td></tr></table>
1013 # is the bare minimun required by the spec, see:
1014 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
1016 A table with no data.
1022 # A table with nothing but a caption is invalid XHTML, we might want to render
1023 # this as <p>caption</p>
1025 A table with nothing but a caption
1033 </caption><tr><td></td></tr></table>
1057 Multiplication table
1059 {| border="1" cellpadding="2"
1060 |+Multiplication table
1062 ! × !! 1 !! 2 !! 3
1080 <table border="1" cellpadding="2">
1081 <caption>Multiplication table
1084 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1088 </th><td> 1 </td><td> 2 </td><td> 3
1092 </th><td> 2 </td><td> 4 </td><td> 6
1096 </th><td> 3 </td><td> 6 </td><td> 9
1100 </th><td> 4 </td><td> 8 </td><td> 12
1104 </th><td> 5 </td><td> 10 </td><td> 15
1112 {| align=right border=1
1114 |rowspan=2| Cell 2, row 1 (and 2)
1121 <table align="right" border="1">
1124 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1125 </td><td> Cell 3, row 1
1129 </td><td> Cell 3, row 2
1140 {| bgcolor=#ABCDEF border=2
1145 |the original table again
1152 <table bgcolor="#ABCDEF" border="2">
1159 </td><td>the original table again
1165 Invalid attributes in table cell (bug 1830)
1179 # FIXME: this one has incorrect tag nesting still.
1181 Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)
1184 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1188 <td><a href="ftp://|x||" class='external autonumber' title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1200 Plain link, capitalized
1204 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1209 Plain link, uncapitalized
1213 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1220 [[Main Page|The Main Page]]
1222 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1231 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1238 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1240 <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>
1247 [[Main Page]]xxx, [[Main Page]]XXX
1249 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1254 Link with 3 brackets
1263 Piped link with 3 brackets
1265 [[[main page|the main page]]]
1267 <p>[[[main page|the main page]]]
1272 Link with multiple pipes
1274 [[Main Page|The|Main|Page]]
1276 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1283 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1285 <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>
1290 Piped link to namespace
1292 [[Meta:Disclaimers|The disclaimers]]
1294 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1301 [[Usually caused by a typo (oops}]]
1303 <p>[[Usually caused by a typo (oops}]]
1308 Link containing % (not as a hex sequence)
1312 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1317 Link containing % as a single hex sequence interpreted to char
1321 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1326 Link containing % as a double hex sequence interpreted to hex sequence
1330 <p>[[7%2525 Solution]]
1335 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1336 Example for such a section: == < ==
1338 [[%23%3c]][[%23%3e]]
1340 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1345 Link containing "<#" and ">#" as a hex sequences
1347 [[%3c%23]][[%3e%23]]
1349 <p>[[%3c%23]][[%3e%23]]
1354 Link containing double-single-quotes '' (bug 4598)
1356 [[Lista d''e paise d''o munno]]
1358 <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>
1363 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1365 Some [[Link|pretty ''italics'' and stuff]]!
1367 <p>Some <a href="/index.php?title=Link&action=edit" class="new" title="Link">pretty <i>italics</i> and stuff</a>!
1372 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1374 ''Some [[Link|pretty ''italics'' and stuff]]!
1376 <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>
1383 [[http://www.example.org]]
1385 <p>[<a href="http://www.example.org" class='external autonumber' title="http://www.example.org" rel="nofollow">[1]</a>]
1389 # I'm fairly sure the expected result here is wrong.
1390 # We want these to be URL links, not pseudo-pages with URLs for titles....
1391 # However the current output is also pretty screwy.
1394 # I'm changing it to match the current output--it arguably makes more
1395 # sense in the light of the test above. Old expected result was:
1396 #<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>
1398 # But I think this test is bordering on "garbage in, garbage out" anyway.
1403 Piped link to URL: [[http://www.example.org|an example URL]]
1405 <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>]
1410 BUG 2: [[page|http://url/]] should link to page, not http://url/
1412 [[Main Page|http://url/]]
1414 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1419 BUG 337: Escaped self-links should be bold
1423 [[Bug462]] [[Bug462]]
1425 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1430 Self-link to section should not be bold
1434 [[Main Page#section]]
1436 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1441 <nowiki> inside a link
1443 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1445 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1450 ### Interwiki links (see maintenance/interwiki.sql)
1454 Inline interwiki link
1456 [[MeatBall:SoftSecurity]]
1458 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1463 Inline interwiki link with empty title (bug 2372)
1467 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class='extiw' title="meatball:">MeatBall:</a>
1472 Interwiki link encoding conversion (bug 1636)
1474 *[[Wikipedia:ro:Olteniţa]]
1475 *[[Wikipedia:ro:Olteniţa]]
1477 <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>
1478 </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>
1484 Interwiki link with fragment (bug 2130)
1486 [[MeatBall:SoftSecurity#foo]]
1488 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1506 Incorrecly removing closing slashes from correctly formed XHTML
1508 <br style="clear:both;" />
1510 <p><br style="clear:both;" />
1515 Failing to transform badly formed HTML into correct XHTML
1521 <p><br clear="left" />
1522 <br clear="right" />
1528 Horizontal ruler (should it add that extra space?)
1542 ### Block-level elements
1565 <ol><li>Numbered list
1582 ***#Number on level 4
1584 **#Number on level 3
1585 **#Number on level 3
1590 <ol><li> with numbers
1592 <ul><li> and bullets
1594 <ol><li> and numbers
1596 </li><li>bullets again
1597 <ul><li>bullet level 2
1598 <ul><li>bullet level 3
1599 <ol><li>Number on level 4
1602 </li><li>bullet level 2
1603 <ol><li>Number on level 3
1604 </li><li>Number on level 3
1607 <ol><li>number level 2
1615 List items are not parsed correctly following a <pre> block (bug 785)
1621 <ul><li> <pre>foo</pre>
1622 </li><li> <pre>bar</pre>
1633 Magic Word: {{CURRENTDAY}}
1642 Magic Word: {{CURRENTDAY2}}
1651 Magic Word: {{CURRENTDAYNAME}}
1660 Magic Word: {{CURRENTDOW}}
1669 Magic Word: {{CURRENTMONTH}}
1678 Magic Word: {{CURRENTMONTHABBREV}}
1680 {{CURRENTMONTHABBREV}}
1687 Magic Word: {{CURRENTMONTHNAME}}
1689 {{CURRENTMONTHNAME}}
1696 Magic Word: {{CURRENTMONTHNAMEGEN}}
1698 {{CURRENTMONTHNAMEGEN}}
1705 Magic Word: {{CURRENTTIME}}
1714 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1723 Magic Word: {{CURRENTYEAR}}
1732 Magic Word: {{FULLPAGENAME}}
1734 title=[[User:Ævar Arnfjörð Bjarmason]]
1738 <p>User:Ævar Arnfjörð Bjarmason
1743 Magic Word: {{FULLPAGENAMEE}}
1745 title=[[User:Ævar Arnfjörð Bjarmason]]
1749 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1754 Magic Word: {{NAMESPACE}}
1756 title=[[User:Ævar Arnfjörð Bjarmason]]
1766 Magic Word: {{NAMESPACEE}}
1768 title=[[User:Ævar Arnfjörð Bjarmason]]
1778 Magic Word: {{NUMBEROFARTICLES}}
1780 {{NUMBEROFARTICLES}}
1787 Magic Word: {{NUMBEROFFILES}}
1796 Magic Word: {{PAGENAME}}
1798 title=[[User:Ævar Arnfjörð Bjarmason]]
1803 <p>Ævar Arnfjörð Bjarmason
1808 Magic Word: {{PAGENAMEE}}
1810 title=[[User:Ævar Arnfjörð Bjarmason]]
1814 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1819 Magic Word: {{REVISIONID}}
1828 Magic Word: {{SCRIPTPATH}}
1837 Magic Word: {{SERVER}}
1841 <p><a href="http://localhost" class='external free' title="http://localhost" rel="nofollow">http://localhost</a>
1846 Magic Word: {{SERVERNAME}}
1855 Magic Word: {{SITENAME}}
1864 Namespace 1 {{ns:1}}
1873 Namespace 1 {{ns:01}}
1882 Namespace 0 {{ns:0}} (bug 4783)
1890 Namespace 0 {{ns:00}} (bug 4783)
1898 Namespace -1 {{ns:-1}}
1907 Namespace Project {{ns:User}}
1920 Magic links: internal link to RFC (bug 479)
1924 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1929 Magic links: RFC (bug 479)
1933 <p><a href='http://www.ietf.org/rfc/rfc822.txt' class='external' title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
1938 Magic links: ISBN (bug 1937)
1942 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1947 Magic links: PMID incorrectly converts space to underscore
1951 <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>
1960 Nonexistant template
1962 {{thistemplatedoesnotexist}}
1964 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1971 This is a test template
1979 <p>This is a test template
1984 Template with explicit namespace
1988 <p>This is a test template
1996 This is a test template with parameter {{{param}}}
2002 {{paramtest|param=foo}}
2004 <p>This is a test template with parameter foo
2009 Template:paramtestnum
2015 Template unnamed parameter
2017 {{paramtestnum|Main Page|the main page}}
2019 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2024 Template:templatesimple
2030 Template:templateredirect
2032 #redirect [[Template:templatesimple]]
2036 Template:templateasargtestnum
2042 Template:templateasargtest
2044 {{template{{{templ}}}}}
2048 Template:templateasargtest2
2054 Template with template name as unnamed argument
2056 {{templateasargtestnum|templatesimple}}
2063 Template with template name as argument
2065 {{templateasargtest|templ=simple}}
2072 Template with template name as argument (2)
2074 {{templateasargtest2|templ=templatesimple}}
2081 Template:templateasargtestdefault
2083 {{{{{templ|templatesimple}}}}}
2093 Template with default value
2095 {{templateasargtestdefault}}
2102 Template with default value (value set)
2104 {{templateasargtestdefault|templ=templa}}
2113 {{templateredirect}}
2120 Template with argument in separate line
2122 {{ templateasargtest |
2130 Template with complex template as argument
2133 param ={{ templateasargtest |
2136 <p>This is a test template with parameter (test)
2141 Template with thumb image (wiht link in description)
2144 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2146 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>
2151 Template:complextemplate
2153 {{{1}}} {{paramtest|
2154 param ={{{param}}}}}
2158 Template with complex arguments
2161 param ={{ templateasargtest |
2162 templ = simple }}|[[Template:complextemplate|link]]}}
2164 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2169 BUG 553: link with two variables in a piped link
2172 |[[{{{1}}}|{{{2}}}]]
2177 <td>[[{{{1}}}|{{{2}}}]]
2183 Magic variable as template parameter
2185 {{paramtest|param={{SITENAME}}}}
2187 <p>This is a test template with parameter MediaWiki
2194 [[{{{param}}}|link]]
2198 Template parameter as link source
2200 {{linktest|param=Main Page}}
2202 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2210 including another template, {{paramtest|param={{{arg}}}}}
2214 Template passing argument to another template
2216 {{paramtest2|arg='hmm'}}
2218 <p>including another template, This is a test template with parameter 'hmm'
2229 Template as link source
2233 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2251 Template infinite loop
2255 <p>{{loop1}}<!-- WARNING: template loop detected -->
2260 Template from main namespace
2279 BUG 529: Template with table, not included at beginning of line
2296 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2314 BUG 41: Template parameters shown as broken links
2326 ''None'' of '''this''' should be
2328 but rather passed unmodified
2332 # hmm, fix this or just deprecate msgnw and document its behavior?
2338 {{msgnw:MSGNW test}}
2340 <p>''None'' of '''this''' should be
2342 but rather passed unmodified
2350 {{int:youhavenewmessages|lots of money|not!}}
2352 <p>You have lots of money (not!).
2359 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2363 <includeonly> and <noinclude> being included
2374 <onlyinclude>Foo</onlyinclude>bar
2378 <onlyinclude> being included
2390 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2394 <onlyinclude> and <includeonly> being included
2403 <includeonly> and <noinclude> on a page
2405 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2412 <onlyinclude> on a page
2414 <onlyinclude>Foo</onlyinclude>bar
2421 ### Pre-save transform tests
2424 pre-save transform: subst:
2430 This is a test template
2434 pre-save transform: normal template
2444 pre-save transform: nonexistant template
2448 {{thistemplatedoesnotexist}}
2450 {{thistemplatedoesnotexist}}
2455 pre-save transform: subst magic variables
2464 # This is bug 89, which I fixed. -- wtm
2466 pre-save transform: subst: templates with parameters
2470 {{subst:paramtest|param="something else"}}
2472 This is a test template with parameter "something else"
2478 <nowiki>'''not wiki'''</nowiki>
2482 pre-save transform: nowiki in subst (bug 1188)
2486 {{subst:nowikitest}}
2488 <nowiki>'''not wiki'''</nowiki>
2493 Template:commenttest
2495 This template has <!-- a comment --> in it.
2499 pre-save transform: comment in subst (bug 1936)
2503 {{subst:commenttest}}
2505 This template has <!-- a comment --> in it.
2509 pre-save transform: unclosed tag
2513 <nowiki>'''not wiki'''
2515 <nowiki>'''not wiki'''
2519 pre-save transform: mixed tag case
2523 <NOwiki>'''not wiki'''</noWIKI>
2525 <NOwiki>'''not wiki'''</noWIKI>
2529 pre-save transform: unclosed comment in <nowiki>
2533 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2535 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2541 <span onmouseover="alert('crap')">Oh no</span>
2545 (confirming safety of fix for subst bug 1936)
2547 {{Template:dangerous}}
2549 <p><span>Oh no</span>
2554 pre-save transform: comment containing gallery (bug 5024)
2558 <!-- <gallery>data</gallery> -->
2560 <!-- <gallery>data</gallery> -->
2564 pre-save transform: comment containing extension
2568 <!-- <tag>data</tag> -->
2570 <!-- <tag>data</tag> -->
2574 pre-save transform: comment containing nowiki
2578 <!-- <nowiki>data</nowiki> -->
2580 <!-- <nowiki>data</nowiki> -->
2584 pre-save transform: comment containing math
2588 <!-- <math>data</math> -->
2590 <!-- <math>data</math> -->
2595 ### Message transform tests
2598 message transform: magic variables
2608 message transform: should not transform wiki markup
2623 [[Image:foobar.jpg]]
2625 <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>
2632 [[Image:foobar.jpg|right]]
2634 <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>
2641 [[Image:foobar.jpg|right|Caption text]]
2643 <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>
2648 Image with frame and link
2650 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2652 <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>
2657 Link to image page- image page normally doesn't exists, hence edit link
2658 TODO: Add test with existing image page
2659 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2663 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2668 Frameless image caption with a free URL
2670 [[Image:foobar.jpg|http://example.com]]
2672 <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>
2677 Thumbnail image caption with a free URL
2679 [[Image:foobar.jpg|thumb|http://example.com]]
2681 <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>
2686 BUG 1887: A ISBN with a thumbnail
2688 [[Image:foobar.jpg|thumb|ISBN 12354]]
2690 <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>
2695 BUG 1887: A RFC with a thumbnail
2697 [[Image:foobar.jpg|thumb|This is RFC 12354]]
2699 <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>
2704 BUG 1887: A mailto link with a thumbnail
2706 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
2708 <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>
2713 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
2714 so math is not stripped and turns up as escaped <math> tags.
2716 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2718 <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>
2723 BUG 1887, part 2: A <math> with a thumbnail- math enabled
2727 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2729 <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>
2733 # Pending resolution to bug 368
2735 BUG 648: Frameless image caption with a link
2737 [[Image:foobar.jpg|text with a [[link]] in it]]
2739 <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>
2744 BUG 648: Frameless image caption with a link (suffix)
2746 [[Image:foobar.jpg|text with a [[link]]foo in it]]
2748 <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>
2753 BUG 648: Frameless image caption with an interwiki link
2755 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
2757 <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>
2762 BUG 648: Frameless image caption with a piped interwiki link
2764 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
2766 <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>
2771 Escape HTML special chars in image alt text
2773 [[Image:foobar.jpg|& < > "]]
2775 <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>
2780 BUG 499: Alt text should have Ӓ, not &1234;
2782 [[Image:foobar.jpg|♀]]
2784 <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>
2789 Broken image caption with link
2791 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
2793 <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.
2798 Image caption containing another image
2800 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
2802 <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>
2807 Image caption containing a newline
2809 [[Image:Foobar.jpg|This
2812 <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>
2818 Bug 3090: External links other than http: in image captions
2820 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
2822 <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>
2831 Subpage test/subpage
2839 subpage title=[[Subpage test]]
2843 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
2848 Subpage noslash link
2850 subpage title=[[Subpage test]]
2854 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
2863 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
2868 BUG 561: {{/Subpage}}
2870 subpage title=[[Page]]
2874 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
2882 Category:MediaWiki User's Guide
2890 [[:Category:MediaWiki User's Guide]]
2892 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
2901 [[Category:MediaWiki User's Guide]]
2903 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
2907 ### Inter-language links
2910 Inter-language links
2916 [[zh:食品]]
2918 es:Alimento fr:Nourriture zh:食品
2925 Basic section headings
2927 title=[[Parser test script]]
2934 ===Smaller headline===
2937 <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>
2940 <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>
2943 <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>
2949 Section headings with TOC
2951 title=[[Parser test script]]
2954 === Subheadline 1 ===
2955 ===== Skipping a level =====
2956 ====== Skipping a level ======
2960 ===Another headline===
2962 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2964 <li class='toclevel-1'><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
2966 <li class='toclevel-2'><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
2968 <li class='toclevel-3'><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
2970 <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>
2977 <li class='toclevel-1'><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
2979 <li class='toclevel-2'><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
2983 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2984 <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>
2985 <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>
2986 <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>
2987 <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>
2988 <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>
2991 <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>
2995 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
2997 Handling of sections up to level 6 and beyond
3000 == Level 2 Heading==
3001 === Level 3 Heading===
3002 ==== Level 4 Heading====
3003 ===== Level 5 Heading=====
3004 ====== Level 6 Heading======
3005 ======= Level 7 Heading=======
3006 ======== Level 8 Heading========
3007 ========= Level 9 Heading=========
3008 ========== Level 10 Heading==========
3010 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3012 <li class='toclevel-1'><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
3014 <li class='toclevel-2'><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
3016 <li class='toclevel-3'><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
3018 <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>
3020 <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>
3022 <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>
3023 <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>
3024 <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>
3025 <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>
3026 <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>
3038 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3039 <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>
3040 <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>
3041 <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>
3042 <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>
3043 <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>
3044 <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>
3045 <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>
3046 <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>
3047 <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>
3048 <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>
3053 Resolving duplicate section names
3055 title=[[Parser test script]]
3060 <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>
3061 <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>
3073 Template with sections, __NOTOC__
3075 title=[[Parser test script]]
3082 <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>
3083 <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>
3084 <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>
3085 <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>
3090 __NOEDITSECTION__ keyword
3096 <a name="Section_1"></a><h2>Section 1</h2>
3097 <a name="Section_2"></a><h2>Section 2</h2>
3102 Link inside a section heading
3104 title=[[Parser test script]]
3106 ==Section with a [[Main Page|link]] in it==
3108 <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>
3114 BUG 1219 URL next to image (good)
3116 http://example.com [[Image:foobar.jpg]]
3118 <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>
3123 BUG 1219 URL next to image (broken)
3125 http://example.com[[Image:foobar.jpg]]
3127 <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>
3132 Bug 1186 news: in the middle of text
3134 http://en.wikinews.org/wiki/Wikinews:Workplace
3136 <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>
3142 Namespaced link must have a title
3151 Namespaced link must have a title (bad fragment version)
3153 [[Project:#fragment]]
3155 <p>[[Project:#fragment]]
3161 div with no attributes
3163 <div>HTML rocks</div>
3165 <div>HTML rocks</div>
3170 div with double-quoted attribute
3172 <div id="rock">HTML rocks</div>
3174 <div id="rock">HTML rocks</div>
3179 div with single-quoted attribute
3181 <div id='rock'>HTML rocks</div>
3183 <div id="rock">HTML rocks</div>
3188 div with unquoted attribute
3190 <div id=rock>HTML rocks</div>
3192 <div id="rock">HTML rocks</div>
3197 div with illegal double attributes
3199 <div align="center" align="right">HTML rocks</div>
3201 <div align="right">HTML rocks</div>
3206 HTML multiple attributes correction
3208 <p class="error" class="awesome">Awesome!</p>
3210 <p class="awesome">Awesome!</p>
3215 Table multiple attributes correction
3218 !+ class="error" class="awesome"| status
3223 <th class="awesome"> status
3231 <DIV ALIGN="center">HTML ROCKS</DIV>
3233 <div align="center">HTML ROCKS</div>
3239 text with amp in the middle of nowhere
3243 <p>Remember AT&T?
3248 text with character entity: eacute
3250 I always thought é was a cute letter.
3252 <p>I always thought é was a cute letter.
3257 text with undefined character entity: xacute
3259 I always thought &xacute; was a cute letter.
3261 <p>I always thought &xacute; was a cute letter.
3273 [[Media:Foobar.jpg]]
3275 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Media:Foobar.jpg</a>
3280 Media link with text
3282 [[Media:Foobar.jpg|A neat file to look at]]
3284 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">A neat file to look at</a>
3288 # FIXME: this is still bad HTML tag nesting
3290 Media link with nasty text
3291 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3293 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3295 <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>
3300 Media link to nonexistent file (bug 1702)
3302 [[Media:No such.jpg]]
3304 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class='new' title="No such.jpg">Media:No such.jpg</a>
3309 Image link to nonexistent file (bug 1850 - good)
3311 [[Image:No such.jpg]]
3313 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3318 :Image link to nonexistent file (bug 1850 - bad)
3320 [[:Image:No such.jpg]]
3322 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3329 Character reference normalization in link text (bug 1938)
3331 [[Main Page|this&that]]
3333 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3338 Empty attribute crash test (bug 2067)
3340 <font color="">foo</font>
3342 <p><font color="">foo</font>
3347 Empty attribute crash test single-quotes (bug 2067)
3349 <font color=''>foo</font>
3351 <p><font color="">foo</font>
3356 Attribute test: equals, then nothing
3358 <font color=>foo</font>
3365 Attribute test: unquoted value
3367 <font color=x>foo</font>
3369 <p><font color="x">foo</font>
3374 Attribute test: unquoted but illegal value (hash)
3376 <font color=#x>foo</font>
3378 <p><font color="#x">foo</font>
3383 Attribute test: no value
3385 <font color>foo</font>
3387 <p><font color="color">foo</font>
3392 Bug 2095: link with three closing brackets
3396 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3401 Bug 2095: link with pipe and three closing brackets
3405 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3410 Bug 2095: link with pipe and three closing brackets, version 2
3412 [[Main Page|[http://example.com/]]]
3414 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3424 Template:Dangerous attribute
3426 " onmouseover="alert(document.cookie)
3430 Template:Dangerous style attribute
3432 border-size: expression(alert(document.cookie))
3438 <div style="float: right; {{{1}}}">Magic div</div>
3442 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3444 <div title="{{test}}"></div>
3446 <div title="This is a test template"></div>
3451 Bug 2304: HTML attribute safety (dangerous template; 2309)
3453 <div title="{{dangerous attribute}}"></div>
3455 <div title=""></div>
3460 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3462 <div style="{{dangerous style attribute}}"></div>
3469 Bug 2304: HTML attribute safety (safe parameter; 2309)
3471 {{div style|width: 200px}}
3473 <div style="float: right; width: 200px">Magic div</div>
3478 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3480 {{div style|width: expression(alert(document.cookie))}}
3482 <div>Magic div</div>
3487 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3489 {{div style|"><script>alert(document.cookie)</script>}}
3491 <div>Magic div</div>
3496 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3498 {{div style|" ><script>alert(document.cookie)</script>}}
3500 <div style="float: right; ">Magic div</div>
3505 Bug 2304: HTML attribute safety (link)
3507 <div title="[[Main Page]]"></div>
3509 <div title="[[Main Page]]"></div>
3514 Bug 2304: HTML attribute safety (italics)
3516 <div title="''foobar''"></div>
3518 <div title="''foobar''"></div>
3523 Bug 2304: HTML attribute safety (bold)
3525 <div title="'''foobar'''"></div>
3527 <div title="'''foobar'''"></div>
3533 Bug 2304: HTML attribute safety (ISBN)
3535 <div title="ISBN 1234567890"></div>
3537 <div title="ISBN 1234567890"></div>
3542 Bug 2304: HTML attribute safety (RFC)
3544 <div title="RFC 1234"></div>
3546 <div title="RFC 1234"></div>
3551 Bug 2304: HTML attribute safety (PMID)
3553 <div title="PMID 1234567890"></div>
3555 <div title="PMID 1234567890"></div>
3560 Bug 2304: HTML attribute safety (web link)
3562 <div title="http://example.com/"></div>
3564 <div title="http://example.com/"></div>
3569 Bug 2304: HTML attribute safety (named web link)
3571 <div title="[http://example.com/ link]"></div>
3573 <div title="[http://example.com/ link]"></div>
3578 Bug 3244: HTML attribute safety (extension; safe)
3580 <div style="<nowiki>background:blue</nowiki>"></div>
3582 <div style="background:blue"></div>
3587 Bug 3244: HTML attribute safety (extension; unsafe)
3589 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3596 Math section safety when disabled
3598 <math><script>alert(document.cookies);</script></math>
3600 <p><math><script>alert(document.cookies);</script></math>
3604 # More MSIE fun discovered by Tom Gilder
3607 MSIE CSS safety test: spurious slash
3609 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3616 MSIE CSS safety test: hex code
3618 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3625 MSIE CSS safety test: comment in url
3627 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3629 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3634 MSIE CSS safety test: comment in expression
3636 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3638 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3644 Table attribute legitimate extension
3647 !+ style="<nowiki>color:blue</nowiki>"| status
3652 <th style="color:blue"> status
3658 Table attribute safety
3661 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3672 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3675 Parser hook: empty input
3688 Parser hook: empty input using terminated empty elements
3701 Parser hook: empty input using terminated empty elements (space before)
3714 Parser hook: basic input
3728 Parser hook: case insensetive
3742 Parser hook: case insensetive, redux
3755 Parser hook: nested tags
3759 <tag><tag></tag></tag>
3770 Parser hook: basic arguments
3772 <tag width=200 height = "100" depth = '50' square></tag>
3791 Parser hook: argument containing a forward slash (bug 5344)
3793 <tag filename='/tmp/bla'></tag>
3799 string(8) "/tmp/bla"
3806 Parser hook: empty input using terminated empty elements (bug 2374)
3820 # </tag> should be output literally since there is no matching tag that begins it
3822 Parser hook: basic arguments using terminated empty elements (bug 2374)
3824 <tag width=200 height = "100" depth = '50' square/>
3847 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
3851 Parser hook: static parser hook not inside a comment
3853 <statictag>hello, world</statictag>
3854 <statictag action=flush/>
3862 Parser hook: static parser hook inside a comment
3864 <!-- <statictag>hello, world</statictag> -->
3865 <statictag action=flush/>
3871 # Nested template calls; this case was broken by Parser.php rev 1.506,
3875 Template:One-parameter
3877 (My parameter is: {{{1}}})
3881 Template:Map-one-parameter
3887 Nested template calls
3889 {{Map-one-parameter|One-parameter|param}}
3891 <p>(My parameter is: param)
3900 Sanitizer: Closing of open tags
3902 <s></s><table></table>
3904 <s></s><table></table>
3909 Sanitizer: Closing of open but not closed tags
3918 Sanitizer: Closing of closed but not open tags
3927 Sanitizer: Closing of closed but not open table tags
3929 Table not started</td></tr></table>
3931 <p>Table not started</td></tr></table>
3936 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
3938 <span id="æ: v">byte</span>[[#æ: v|backlink]]
3940 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
3945 Sanitizer: Validating the contents of the id attribute (bug 4515)
3951 Something, but defenetly not <br id="9" />...
3955 Language converter: output gets cut off unexpectedly (bug 5757)
3959 this bit is safe: }-
3961 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
3963 then we get cut off here: }-
3965 all additional text is vanished
3967 <p>this bit is safe: }-
3968 </p><p>but if we add a conversion instance: xxx
3969 </p><p>then we get cut off here: }-
3970 </p><p>all additional text is vanished
3975 Self closed html pairs (bug 5487)
3978 <center><font id="bug" />Centered text</center>
3979 <div><font id="bug2" />In div text</div>
3981 <center><font id="bug" />Centered text</center>
3982 <div><font id="bug2" />In div text</div>
3991 HTML bullet list, closed tags (bug 5497)
4006 HTML bullet list, unclosed tags (bug 5497)
4021 HTML ordered list, closed tags (bug 5497)
4036 HTML ordered list, unclosed tags (bug 5497)
4051 HTML nested bullet list, closed tags (bug 5497)
4076 HTML nested bullet list, open tags (bug 5497)
4099 HTML nested ordered list, closed tags (bug 5497)
4124 HTML nested ordered list, open tags (bug 5497)
4147 HTML ordered list item with parameters oddity
4149 <ol><li id="fragment">One</li></ol>
4151 <ol><li id="fragment">One</li></ol>
4156 bug 5918: autonumbering
4158 [http://first/] [http://second] [ftp://ftp]
4162 [mailto:enclosed@mail.tld With target]
4164 [mailto:enclosed@mail.tld]
4166 mailto:inline@mail.tld
4168 <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>
4169 </p><p><a href="ftp://inlineftp" class='external free' title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4170 </p><p><a href="mailto:enclosed@mail.tld" class='external text' title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4171 </p><p><a href="mailto:enclosed@mail.tld" class='external autonumber' title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4172 </p><p><a href="mailto:inline@mail.tld" class='external free' title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4178 # Security and HTML correctness
4179 # From Nick Jenkins' fuzz testing
4183 Fuzz testing: Parser13
4198 Fuzz testing: Parser14
4203 <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>
4204 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4206 <li class='toclevel-1'><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4208 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4213 Fuzz testing: Parser14-table
4218 <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>
4219 <table style="__TOC__">
4225 # Known to produce bogus xml (extra </td>)
4227 Fuzz testing: Parser16
4236 <th>https://</th><th></th><th></th><th>
4244 Fuzz testing: Parser21
4247 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4252 <th> <a href="irc://{{ftp://a" class='external free' title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4261 Fuzz testing: Parser22
4263 http://===r:::https://b
4267 <p><a href="http://===r:::https://b" class='external free' title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4275 # Known to produce bad XML for now
4277 Fuzz testing: Parser24
4284 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4285 <br style="onmouseover='alert(document.cookie);' " />
4287 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4292 <u class="|">} >
4293 <br style="onmouseover='alert(document.cookie);' " />
4295 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4304 # Known to produce bad XML for now
4306 Fuzz testing: Parser25 (bug 6055)
4314 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4316 <li class="||">
4317 blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4322 Fuzz testing: URL adjacent extension (with space, clean)
4325 http://example.com <nowiki>junk</nowiki>
4327 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a> junk
4332 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4335 http://example.com<nowiki>junk</nowiki>
4337 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>junk
4342 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4345 http://example.com<pre>junk</pre>
4347 <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>
4352 Fuzz testing: image with bogus manual thumbnail
4354 [[Image:foobar.jpg|thumbnail= ]]
4356 <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>
4361 Parsing optional HTML elements (Bug 6171)
4366 <td> Some tabular data</td>
4367 <td> More tabular data ...
4368 <td> And yet som tabular data</td>
4374 <td> Some tabular data</td>
4375 <td> More tabular data ...
4376 </td><td> And yet som tabular data</td>
4383 Correct handling of <td>, <tr> (Bug 6171)
4388 <td> Some tabular data</td>
4389 <td> More tabular data ...</td>
4390 <td> And yet som tabular data</td>
4396 <td> Some tabular data</td>
4397 <td> More tabular data ...</td>
4398 <td> And yet som tabular data</td>
4406 Parsing crashing regression (fr:JavaScript)
4410 <p></body></x>
4415 Inline wiki vs wiki block nesting
4421 <p><b>Bold paragraph</b>
4422 </p><p>New wiki paragraph
4427 Inline HTML vs wiki block nesting
4433 <p><b>Bold paragraph</b>
4434 </p><p>New wiki paragraph
4440 Mixing markup for italics and bold
4443 '''bold''''''bold''bolditalics'''''
4445 <p><b>bold</b><b>bold<i>bolditalics</i></b>
4453 Article for special page transclusion test
4457 Special page transclusion
4460 {{Special:Prefixindex/Xyzzyx}}
4464 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4469 Special page transclusion twice (bug 5021)
4472 {{Special:Prefixindex/Xyzzyx}}
4473 {{Special:Prefixindex/Xyzzyx}}
4477 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4480 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4485 Invalid header with following text
4495 Section extraction test (section 0)
4515 Section extraction test (section 1)
4537 Section extraction test (section 2)
4558 Section extraction test (section 3)
4578 Section extraction test (section 4)
4602 Section extraction test (section 5)
4622 Section extraction test (section 6)
4643 Section extraction test (section 7)
4663 Section extraction test (section 8)
4683 Section extraction test (section 9)
4704 Section extraction test (section 10)
4724 Section extraction test (nonexistent section 11)
4743 Section extraction test with bogus heading (section 1)
4748 ==bogus== not a legal section
4752 ==bogus== not a legal section
4756 Section extraction test with bogus heading (section 2)
4761 ==bogus== not a legal section
4768 Section extraction test with comment after heading (section 1)
4773 ==legal== <!-- a legal section -->
4780 Section extraction test with comment after heading (section 2)
4785 ==legal== <!-- a legal section -->
4788 ==legal== <!-- a legal section -->
4792 Section extraction test with bogus <nowiki> heading (section 1)
4797 ==bogus== <nowiki>not a legal section</nowiki>
4801 ==bogus== <nowiki>not a legal section</nowiki>
4805 Section extraction test with bogus <nowiki> heading (section 2)
4810 ==bogus== <nowiki>not a legal section</nowiki>
4818 Section extraction prefixed by comment (section 1) (bug 2587)
4829 Section extraction prefixed by comment (section 2) (bug 2587)
4841 Section extraction, mixed wiki and html (section 1) (bug 2607)
4857 Section extraction, mixed wiki and html (section 2) (bug 2607)
4874 Section extraction, heading surrounded by <noinclude> (bug 3342)
4878 <noinclude>==a==</noinclude>
4881 <noinclude>==a==</noinclude>
4887 Section extraction, HTML heading subsections (bug 5272)
4900 Section extraction, HTML headings should be ignored in extensions (bug 3476)
4914 Section replacement test (section 0)
4945 Section replacement test (section 1)
4974 Section replacement test (section 2)
5004 Section replacement test (section 3)
5035 Section replacement test (section 4)
5062 Section replacement test (section 5)
5093 Section replacement test (section 6)
5123 Section replacement test (section 7)
5154 Section replacement test (section 8)
5185 Section replacement test (section 9)
5214 Section replacement test (section 10)
5245 Section extraction, HTML headings not at line boundaries (section 0)
5249 <h2>Evil</h2><i>blah blah blah</i>
5257 <i>extra evil</i><h2>Extra nasty</h2>
5264 Section extraction, HTML headings not at line boundaries (section 1)
5268 <h2>Evil</h2><i>blah blah blah</i>
5276 <i>extra evil</i><h2>Extra nasty</h2>
5280 <h2>Evil</h2><i>blah blah blah</i>
5286 Section extraction, HTML headings not at line boundaries (section 2)
5290 <h2>Evil</h2><i>blah blah blah</i>
5298 <i>extra evil</i><h2>Extra nasty</h2>
5310 Section extraction, HTML headings not at line boundaries (section 3)
5314 <h2>Evil</h2><i>blah blah blah</i>
5322 <i>extra evil</i><h2>Extra nasty</h2>
5326 <h2>Extra nasty</h2>