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 Regression with preformatted in <center>
331 <pre> with attributes (bug 3202)
333 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
335 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
340 <pre> with width attribute (bug 3202)
342 <pre width="8">Narrow screen goodies</pre>
344 <pre width="8">Narrow screen goodies</pre>
349 <pre> with forbidden attribute (bug 3202)
351 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
353 <pre width="8">Narrow screen goodies</pre>
358 <pre> with forbidden attribute values (bug 3202)
360 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
362 <pre width="8">Narrow screen goodies</pre>
374 <dl><dt> name </dt><dd> Definition
384 <dl><dd> Indented text
390 Definition list with no space
394 <dl><dt>name</dt><dd>Definition
400 Definition list with URL link
402 ; http://example.com/ : definition
404 <dl><dt> <a href="http://example.com/" class="external free" title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
410 Definition list with bracketed URL link
412 ;[http://www.example.com/ Example]:Something about it
414 <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
420 Definition list with wikilink containing colon
422 ; [[Help:FAQ]]: The least-read page on Wikipedia
424 <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
429 # At Brion's and JeLuF's insistence... :)
431 Definition list with wikilink containing colon
433 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
435 <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!
441 Malformed definition list with colon
443 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
445 <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
451 Definition lists: colon in external link text
453 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
455 <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
461 Definition lists: colon in HTML attribute
463 ;<b style="display: inline">bold</b>
465 <dl><dt><b style="display: inline">bold</b>
472 Definition lists: self-closed tag
474 ;one<br/>two : two-line fun
476 <dl><dt>one<br />two </dt><dd> two-line fun
486 External links: non-bracketed
488 Non-bracketed: http://example.com
490 <p>Non-bracketed: <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>
495 External links: numbered
497 Numbered: [http://example.com]
498 Numbered: [http://example.net]
499 Numbered: [http://example.org]
501 <p>Numbered: <a href="http://example.com" class="external autonumber" title="http://example.com" rel="nofollow">[1]</a>
502 Numbered: <a href="http://example.net" class="external autonumber" title="http://example.net" rel="nofollow">[2]</a>
503 Numbered: <a href="http://example.org" class="external autonumber" title="http://example.org" rel="nofollow">[3]</a>
508 External links: specified text
510 Specified text: [http://example.com link]
512 <p>Specified text: <a href="http://example.com" class="external text" title="http://example.com" rel="nofollow">link</a>
517 External links: trail
519 Linktrails should not work for external links: [http://example.com link]s
521 <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
526 External links: dollar sign in URL
528 http://example.com/1$2345
530 <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>
535 External links: dollar sign in URL (named)
537 [http://example.com/1$2345]
539 <p><a href="http://example.com/1$2345" class="external autonumber" title="http://example.com/1$2345" rel="nofollow">[1]</a>
544 External links: open square bracket forbidden in URL (bug 4377)
546 http://example.com/1[2345
548 <p><a href="http://example.com/1" class="external free" title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
553 External links: open square bracket forbidden in URL (named) (bug 4377)
555 [http://example.com/1[2345]
557 <p><a href="http://example.com/1" class="external text" title="http://example.com/1" rel="nofollow">[2345</a>
562 External links: nowiki in URL link text (bug 6230)
564 [http://example.com/ <nowiki>''example site''</nowiki>]
566 <p><a href="http://example.com/" class="external text" title="http://example.com/" rel="nofollow">''example site''</a>
571 External links: newline forbidden in text (bug 6230 regression check)
573 [http://example.com/ first
576 <p>[<a href="http://example.com/" class="external free" title="http://example.com/" rel="nofollow">http://example.com/</a> first
584 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
586 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
591 External image from https
593 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
595 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
600 Link to non-http image, no img tag
602 Link to non-http image, no img tag: ftp://example.com/test.jpg
604 <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>
609 External links: terminating separator
611 Terminating separator: http://example.com/thing,
613 <p>Terminating separator: <a href="http://example.com/thing" class="external free" title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
618 External links: intervening separator
620 Intervening separator: http://example.com/1,2,3
622 <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>
627 External links: old bug with URL in query
629 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
631 <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>
636 External links: old URL-in-URL bug, mixed protocols
638 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
640 <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>
645 External links: URL in text
647 URL in text: [http://example.com http://example.com]
649 <p>URL in text: <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>
654 External links: Clickable images
656 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
658 <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>
663 External links: raw ampersand
665 Old & use: http://x&y
667 <p>Old & use: <a href="http://x&y" class="external free" title="http://x&y" rel="nofollow">http://x&y</a>
672 External links: encoded ampersand
674 Old & use: http://x&y
676 <p>Old & use: <a href="http://x&y" class="external free" title="http://x&y" rel="nofollow">http://x&y</a>
681 External links: encoded equals (bug 6102)
683 http://example.com/?foo=bar
685 <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>
690 External links: [raw ampersand]
692 Old & use: [http://x&y]
694 <p>Old & use: <a href="http://x&y" class="external autonumber" title="http://x&y" rel="nofollow">[1]</a>
699 External links: [encoded ampersand]
701 Old & use: [http://x&y]
703 <p>Old & use: <a href="http://x&y" class="external autonumber" title="http://x&y" rel="nofollow">[1]</a>
708 External links: [encoded equals] (bug 6102)
710 [http://example.com/?foo=bar]
712 <p><a href="http://example.com/?foo=bar" class="external autonumber" title="http://example.com/?foo=bar" rel="nofollow">[1]</a>
717 External links: www.jpeg.org (bug 554)
721 <p><a href="http://www.jpeg.org" class="external free" title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
726 External links: URL within URL (original bug 2)
728 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
730 <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>
735 BUG 361: URL inside bracketed URL
737 [http://www.example.com/foo http://www.example.com/bar]
739 <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>
744 BUG 361: URL within URL, not bracketed
746 http://www.example.com/foo?=http://www.example.com/bar
748 <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>
753 BUG 289: ">"-token in URL-tail
755 http://www.example.com/<hello>
757 <p><a href="http://www.example.com/" class="external free" title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
762 BUG 289: literal ">"-token in URL-tail
764 http://www.example.com/<b>html</b>
766 <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>
771 BUG 289: ">"-token in bracketed URL
773 [http://www.example.com/<hello> stuff]
775 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
780 BUG 289: literal ">"-token in bracketed URL
782 [http://www.example.com/<b>html</b> stuff]
784 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
789 BUG 289: literal double quote at end of URL
791 http://www.example.com/"hello"
793 <p><a href="http://www.example.com/" class="external free" title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
798 BUG 289: literal double quote in bracketed URL
800 [http://www.example.com/"hello" stuff]
802 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
807 External links: invalid character
808 Fixme: the missing char seems to have gone missing
812 [http://www.example.com test]
814 <p>[<a href="http://www.example.com" class="external free" title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
819 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
821 [http://www.example.com test]
823 <p><a href="http://www.example.com" class="external text" title="http://www.example.com" rel="nofollow">test</a>
828 External links: wiki links within external link (Bug 3695)
830 [http://example.com [[wikilink]] embedded in ext link]
832 <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>
837 BUG 787: Links with one slash after the url protocol are invalid
841 [http:/example.com title]
844 </p><p>[http:/example.com title]
849 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
851 ''[http://example.com text'']
852 [http://example.com '''text]'''
853 ''Something [http://example.com in italic'']
854 ''Something [http://example.com mixed''''', even bold]'''
855 '''''Now [http://example.com both''''']
857 <p><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i>text</i></a>
858 <a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><b>text</b></a>
859 <i>Something </i><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i>in italic</i></a>
860 <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>
861 <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>
869 http://www.example.com/?title=AT%26T
871 <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>
876 Bug 4781, 5267: %26 in URL
878 http://www.example.com/?title=100%25_Bran
880 <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>
885 Bug 4781, 5267: %28, %29 in URL
887 http://www.example.com/?title=Ben-Hur_%281959_film%29
889 <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>
895 Bug 4781: %26 in autonumber URL
897 [http://www.example.com/?title=AT%26T]
899 <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>
904 Bug 4781, 5267: %26 in autonumber URL
906 [http://www.example.com/?title=100%25_Bran]
908 <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>
913 Bug 4781, 5267: %28, %29 in autonumber URL
915 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
917 <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>
923 Bug 4781: %26 in bracketed URL
925 [http://www.example.com/?title=AT%26T link]
927 <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>
932 Bug 4781, 5267: %26 in bracketed URL
934 [http://www.example.com/?title=100%25_Bran link]
936 <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>
941 Bug 4781, 5267: %28, %29 in bracketed URL
943 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
945 <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>
950 External link containing double-single-quotes in text '' (bug 4598 sanity check)
952 Some [http://example.com/ pretty ''italics'' and stuff]!
954 <p>Some <a href="http://example.com/" class="external text" title="http://example.com/" rel="nofollow">pretty <i>italics</i> and stuff</a>!
959 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
961 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
963 <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>
976 Normal text. '''Bold text.''' Normal text. ''Italic text.''
978 Normal text. '''''Bold italic text.''''' Normal text.
980 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
981 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
987 Unclosed and unmatched quotes
989 '''''Bold italic text '''with bold deactivated''' in between.'''''
991 '''''Bold italic text ''with italic deactivated'' in between.'''''
995 ..spanning two paragraphs (should not work).'''
997 '''Bold tag left open
999 ''Italic tag left open
1003 <!-- Unmatching number of opening, closing tags: -->
1004 '''This year''''s election ''should'' beat '''last year''''s.
1006 ''Tom'''s car is bigger than ''Susan'''s.
1008 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
1009 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
1010 </p><p><b>Bold text..</b>
1011 </p><p>..spanning two paragraphs (should not work).
1012 </p><p><b>Bold tag left open</b>
1013 </p><p><i>Italic tag left open</i>
1015 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
1016 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
1023 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
1026 # This should not produce <table></table> as <table><tr><td></td></tr></table>
1027 # is the bare minimun required by the spec, see:
1028 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
1030 A table with no data.
1036 # A table with nothing but a caption is invalid XHTML, we might want to render
1037 # this as <p>caption</p>
1039 A table with nothing but a caption
1047 </caption><tr><td></td></tr></table>
1071 Multiplication table
1073 {| border="1" cellpadding="2"
1074 |+Multiplication table
1076 ! × !! 1 !! 2 !! 3
1094 <table border="1" cellpadding="2">
1095 <caption>Multiplication table
1098 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1102 </th><td> 1 </td><td> 2 </td><td> 3
1106 </th><td> 2 </td><td> 4 </td><td> 6
1110 </th><td> 3 </td><td> 6 </td><td> 9
1114 </th><td> 4 </td><td> 8 </td><td> 12
1118 </th><td> 5 </td><td> 10 </td><td> 15
1126 {| align=right border=1
1128 |rowspan=2| Cell 2, row 1 (and 2)
1135 <table align="right" border="1">
1138 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1139 </td><td> Cell 3, row 1
1143 </td><td> Cell 3, row 2
1154 {| bgcolor=#ABCDEF border=2
1159 |the original table again
1166 <table bgcolor="#ABCDEF" border="2">
1173 </td><td>the original table again
1179 Invalid attributes in table cell (bug 1830)
1193 # FIXME: this one has incorrect tag nesting still.
1195 Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)
1198 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1202 <td><a href="ftp://|x||" class="external autonumber" title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1214 Plain link, capitalized
1218 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1223 Plain link, uncapitalized
1227 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1234 [[Main Page|The Main Page]]
1236 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1245 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1252 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1254 <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>
1261 [[Main Page]]xxx, [[Main Page]]XXX
1263 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1268 Link with 3 brackets
1277 Piped link with 3 brackets
1279 [[[main page|the main page]]]
1281 <p>[[[main page|the main page]]]
1286 Link with multiple pipes
1288 [[Main Page|The|Main|Page]]
1290 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1297 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1299 <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>
1304 Piped link to namespace
1306 [[Meta:Disclaimers|The disclaimers]]
1308 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1315 [[Usually caused by a typo (oops}]]
1317 <p>[[Usually caused by a typo (oops}]]
1322 Link containing % (not as a hex sequence)
1326 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1331 Link containing % as a single hex sequence interpreted to char
1335 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1340 Link containing % as a double hex sequence interpreted to hex sequence
1344 <p>[[7%2525 Solution]]
1349 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1350 Example for such a section: == < ==
1352 [[%23%3c]][[%23%3e]]
1354 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1359 Link containing "<#" and ">#" as a hex sequences
1361 [[%3c%23]][[%3e%23]]
1363 <p>[[%3c%23]][[%3e%23]]
1368 Link containing double-single-quotes '' (bug 4598)
1370 [[Lista d''e paise d''o munno]]
1372 <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>
1377 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1379 Some [[Link|pretty ''italics'' and stuff]]!
1381 <p>Some <a href="/index.php?title=Link&action=edit" class="new" title="Link">pretty <i>italics</i> and stuff</a>!
1386 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1388 ''Some [[Link|pretty ''italics'' and stuff]]!
1390 <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>
1397 [[http://www.example.org]]
1399 <p>[<a href="http://www.example.org" class="external autonumber" title="http://www.example.org" rel="nofollow">[1]</a>]
1403 # I'm fairly sure the expected result here is wrong.
1404 # We want these to be URL links, not pseudo-pages with URLs for titles....
1405 # However the current output is also pretty screwy.
1408 # I'm changing it to match the current output--it arguably makes more
1409 # sense in the light of the test above. Old expected result was:
1410 #<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>
1412 # But I think this test is bordering on "garbage in, garbage out" anyway.
1417 Piped link to URL: [[http://www.example.org|an example URL]]
1419 <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>]
1424 BUG 2: [[page|http://url/]] should link to page, not http://url/
1426 [[Main Page|http://url/]]
1428 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1433 BUG 337: Escaped self-links should be bold
1437 [[Bug462]] [[Bug462]]
1439 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1444 Self-link to section should not be bold
1448 [[Main Page#section]]
1450 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1455 <nowiki> inside a link
1457 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1459 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1464 ### Interwiki links (see maintenance/interwiki.sql)
1468 Inline interwiki link
1470 [[MeatBall:SoftSecurity]]
1472 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1477 Inline interwiki link with empty title (bug 2372)
1481 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw" title="meatball:">MeatBall:</a>
1486 Interwiki link encoding conversion (bug 1636)
1488 *[[Wikipedia:ro:Olteniţa]]
1489 *[[Wikipedia:ro:Olteniţa]]
1491 <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>
1492 </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>
1498 Interwiki link with fragment (bug 2130)
1500 [[MeatBall:SoftSecurity#foo]]
1502 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1520 Incorrecly removing closing slashes from correctly formed XHTML
1522 <br style="clear:both;" />
1524 <p><br style="clear:both;" />
1529 Failing to transform badly formed HTML into correct XHTML
1535 <p><br clear="left" />
1536 <br clear="right" />
1542 Horizontal ruler (should it add that extra space?)
1556 ### Block-level elements
1579 <ol><li>Numbered list
1596 ***#Number on level 4
1598 **#Number on level 3
1599 **#Number on level 3
1604 <ol><li> with numbers
1606 <ul><li> and bullets
1608 <ol><li> and numbers
1610 </li><li>bullets again
1611 <ul><li>bullet level 2
1612 <ul><li>bullet level 3
1613 <ol><li>Number on level 4
1616 </li><li>bullet level 2
1617 <ol><li>Number on level 3
1618 </li><li>Number on level 3
1621 <ol><li>number level 2
1629 List items are not parsed correctly following a <pre> block (bug 785)
1635 <ul><li> <pre>foo</pre>
1636 </li><li> <pre>bar</pre>
1647 Magic Word: {{CURRENTDAY}}
1656 Magic Word: {{CURRENTDAY2}}
1665 Magic Word: {{CURRENTDAYNAME}}
1674 Magic Word: {{CURRENTDOW}}
1683 Magic Word: {{CURRENTMONTH}}
1692 Magic Word: {{CURRENTMONTHABBREV}}
1694 {{CURRENTMONTHABBREV}}
1701 Magic Word: {{CURRENTMONTHNAME}}
1703 {{CURRENTMONTHNAME}}
1710 Magic Word: {{CURRENTMONTHNAMEGEN}}
1712 {{CURRENTMONTHNAMEGEN}}
1719 Magic Word: {{CURRENTTIME}}
1728 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1737 Magic Word: {{CURRENTYEAR}}
1746 Magic Word: {{FULLPAGENAME}}
1748 title=[[User:Ævar Arnfjörð Bjarmason]]
1752 <p>User:Ævar Arnfjörð Bjarmason
1757 Magic Word: {{FULLPAGENAMEE}}
1759 title=[[User:Ævar Arnfjörð Bjarmason]]
1763 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1768 Magic Word: {{NAMESPACE}}
1770 title=[[User:Ævar Arnfjörð Bjarmason]]
1780 Magic Word: {{NAMESPACEE}}
1782 title=[[User:Ævar Arnfjörð Bjarmason]]
1792 Magic Word: {{NUMBEROFARTICLES}}
1794 {{NUMBEROFARTICLES}}
1801 Magic Word: {{NUMBEROFFILES}}
1810 Magic Word: {{PAGENAME}}
1812 title=[[User:Ævar Arnfjörð Bjarmason]]
1817 <p>Ævar Arnfjörð Bjarmason
1822 Magic Word: {{PAGENAMEE}}
1824 title=[[User:Ævar Arnfjörð Bjarmason]]
1828 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1833 Magic Word: {{REVISIONID}}
1842 Magic Word: {{SCRIPTPATH}}
1851 Magic Word: {{SERVER}}
1855 <p><a href="http://localhost" class="external free" title="http://localhost" rel="nofollow">http://localhost</a>
1860 Magic Word: {{SERVERNAME}}
1869 Magic Word: {{SITENAME}}
1878 Namespace 1 {{ns:1}}
1887 Namespace 1 {{ns:01}}
1896 Namespace 0 {{ns:0}} (bug 4783)
1904 Namespace 0 {{ns:00}} (bug 4783)
1912 Namespace -1 {{ns:-1}}
1921 Namespace Project {{ns:User}}
1934 Magic links: internal link to RFC (bug 479)
1938 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1943 Magic links: RFC (bug 479)
1947 <p><a href="http://www.ietf.org/rfc/rfc822.txt" class="external" title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
1952 Magic links: ISBN (bug 1937)
1956 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1961 Magic links: PMID incorrectly converts space to underscore
1965 <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>
1974 Nonexistant template
1976 {{thistemplatedoesnotexist}}
1978 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1985 This is a test template
1993 <p>This is a test template
1998 Template with explicit namespace
2002 <p>This is a test template
2010 This is a test template with parameter {{{param}}}
2016 {{paramtest|param=foo}}
2018 <p>This is a test template with parameter foo
2023 Template:paramtestnum
2029 Template unnamed parameter
2031 {{paramtestnum|Main Page|the main page}}
2033 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2038 Template:templatesimple
2044 Template:templateredirect
2046 #redirect [[Template:templatesimple]]
2050 Template:templateasargtestnum
2056 Template:templateasargtest
2058 {{template{{{templ}}}}}
2062 Template:templateasargtest2
2068 Template with template name as unnamed argument
2070 {{templateasargtestnum|templatesimple}}
2077 Template with template name as argument
2079 {{templateasargtest|templ=simple}}
2086 Template with template name as argument (2)
2088 {{templateasargtest2|templ=templatesimple}}
2095 Template:templateasargtestdefault
2097 {{{{{templ|templatesimple}}}}}
2107 Template with default value
2109 {{templateasargtestdefault}}
2116 Template with default value (value set)
2118 {{templateasargtestdefault|templ=templa}}
2127 {{templateredirect}}
2134 Template with argument in separate line
2136 {{ templateasargtest |
2144 Template with complex template as argument
2147 param ={{ templateasargtest |
2150 <p>This is a test template with parameter (test)
2155 Template with thumb image (wiht link in description)
2158 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2160 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>
2165 Template:complextemplate
2167 {{{1}}} {{paramtest|
2168 param ={{{param}}}}}
2172 Template with complex arguments
2175 param ={{ templateasargtest |
2176 templ = simple }}|[[Template:complextemplate|link]]}}
2178 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2183 BUG 553: link with two variables in a piped link
2186 |[[{{{1}}}|{{{2}}}]]
2191 <td>[[{{{1}}}|{{{2}}}]]
2197 Magic variable as template parameter
2199 {{paramtest|param={{SITENAME}}}}
2201 <p>This is a test template with parameter MediaWiki
2208 [[{{{param}}}|link]]
2212 Template parameter as link source
2214 {{linktest|param=Main Page}}
2216 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2224 including another template, {{paramtest|param={{{arg}}}}}
2228 Template passing argument to another template
2230 {{paramtest2|arg='hmm'}}
2232 <p>including another template, This is a test template with parameter 'hmm'
2243 Template as link source
2247 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2265 Template infinite loop
2269 <p>{{loop1}}<!-- WARNING: template loop detected -->
2274 Template from main namespace
2293 BUG 529: Template with table, not included at beginning of line
2310 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2328 BUG 41: Template parameters shown as broken links
2340 ''None'' of '''this''' should be
2342 but rather passed unmodified
2346 # hmm, fix this or just deprecate msgnw and document its behavior?
2352 {{msgnw:MSGNW test}}
2354 <p>''None'' of '''this''' should be
2356 but rather passed unmodified
2364 {{int:youhavenewmessages|lots of money|not!}}
2366 <p>You have lots of money (not!).
2373 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2377 <includeonly> and <noinclude> being included
2388 <onlyinclude>Foo</onlyinclude>bar
2392 <onlyinclude> being included
2404 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2408 <onlyinclude> and <includeonly> being included
2417 <includeonly> and <noinclude> on a page
2419 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2426 <onlyinclude> on a page
2428 <onlyinclude>Foo</onlyinclude>bar
2435 ### Pre-save transform tests
2438 pre-save transform: subst:
2444 This is a test template
2448 pre-save transform: normal template
2458 pre-save transform: nonexistant template
2462 {{thistemplatedoesnotexist}}
2464 {{thistemplatedoesnotexist}}
2469 pre-save transform: subst magic variables
2478 # This is bug 89, which I fixed. -- wtm
2480 pre-save transform: subst: templates with parameters
2484 {{subst:paramtest|param="something else"}}
2486 This is a test template with parameter "something else"
2492 <nowiki>'''not wiki'''</nowiki>
2496 pre-save transform: nowiki in subst (bug 1188)
2500 {{subst:nowikitest}}
2502 <nowiki>'''not wiki'''</nowiki>
2507 Template:commenttest
2509 This template has <!-- a comment --> in it.
2513 pre-save transform: comment in subst (bug 1936)
2517 {{subst:commenttest}}
2519 This template has <!-- a comment --> in it.
2523 pre-save transform: unclosed tag
2527 <nowiki>'''not wiki'''
2529 <nowiki>'''not wiki'''
2533 pre-save transform: mixed tag case
2537 <NOwiki>'''not wiki'''</noWIKI>
2539 <NOwiki>'''not wiki'''</noWIKI>
2543 pre-save transform: unclosed comment in <nowiki>
2547 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2549 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2555 <span onmouseover="alert('crap')">Oh no</span>
2559 (confirming safety of fix for subst bug 1936)
2561 {{Template:dangerous}}
2563 <p><span>Oh no</span>
2568 pre-save transform: comment containing gallery (bug 5024)
2572 <!-- <gallery>data</gallery> -->
2574 <!-- <gallery>data</gallery> -->
2578 pre-save transform: comment containing extension
2582 <!-- <tag>data</tag> -->
2584 <!-- <tag>data</tag> -->
2588 pre-save transform: comment containing nowiki
2592 <!-- <nowiki>data</nowiki> -->
2594 <!-- <nowiki>data</nowiki> -->
2598 pre-save transform: comment containing math
2602 <!-- <math>data</math> -->
2604 <!-- <math>data</math> -->
2608 pre-save transform: <noinclude> in subst (bug 3298)
2618 pre-save transform: <onlyinclude> in subst (bug 3298)
2629 ### Message transform tests
2632 message transform: magic variables
2642 message transform: should not transform wiki markup
2652 message transform: <noinclude> in transcluded template (bug 4926)
2662 message transform: <onlyinclude> in transcluded template (bug 4926)
2678 [[Image:foobar.jpg]]
2680 <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>
2687 [[Image:foobar.jpg|right]]
2689 <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>
2696 [[Image:foobar.jpg|right|Caption text]]
2698 <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>
2703 Image with frame and link
2705 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2707 <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>
2712 Link to image page- image page normally doesn't exists, hence edit link
2713 TODO: Add test with existing image page
2714 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2718 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2723 Frameless image caption with a free URL
2725 [[Image:foobar.jpg|http://example.com]]
2727 <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>
2732 Thumbnail image caption with a free URL
2734 [[Image:foobar.jpg|thumb|http://example.com]]
2736 <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>
2741 BUG 1887: A ISBN with a thumbnail
2743 [[Image:foobar.jpg|thumb|ISBN 12354]]
2745 <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>
2750 BUG 1887: A RFC with a thumbnail
2752 [[Image:foobar.jpg|thumb|This is RFC 12354]]
2754 <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>
2759 BUG 1887: A mailto link with a thumbnail
2761 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
2763 <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>
2768 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
2769 so math is not stripped and turns up as escaped <math> tags.
2771 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2773 <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>
2778 BUG 1887, part 2: A <math> with a thumbnail- math enabled
2782 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2784 <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>
2788 # Pending resolution to bug 368
2790 BUG 648: Frameless image caption with a link
2792 [[Image:foobar.jpg|text with a [[link]] in it]]
2794 <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>
2799 BUG 648: Frameless image caption with a link (suffix)
2801 [[Image:foobar.jpg|text with a [[link]]foo in it]]
2803 <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>
2808 BUG 648: Frameless image caption with an interwiki link
2810 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
2812 <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>
2817 BUG 648: Frameless image caption with a piped interwiki link
2819 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
2821 <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>
2826 Escape HTML special chars in image alt text
2828 [[Image:foobar.jpg|& < > "]]
2830 <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>
2835 BUG 499: Alt text should have Ӓ, not &1234;
2837 [[Image:foobar.jpg|♀]]
2839 <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>
2844 Broken image caption with link
2846 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
2848 <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.
2853 Image caption containing another image
2855 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
2857 <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>
2862 Image caption containing a newline
2864 [[Image:Foobar.jpg|This
2867 <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>
2873 Bug 3090: External links other than http: in image captions
2875 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
2877 <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>
2886 Subpage test/subpage
2894 subpage title=[[Subpage test]]
2898 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
2903 Subpage noslash link
2905 subpage title=[[Subpage test]]
2909 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
2918 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
2923 BUG 561: {{/Subpage}}
2925 subpage title=[[Page]]
2929 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
2937 Category:MediaWiki User's Guide
2945 [[:Category:MediaWiki User's Guide]]
2947 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
2956 [[Category:MediaWiki User's Guide]]
2958 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
2962 ### Inter-language links
2965 Inter-language links
2971 [[zh:食品]]
2973 es:Alimento fr:Nourriture zh:食品
2980 Basic section headings
2982 title=[[Parser test script]]
2989 ===Smaller headline===
2992 <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>
2995 <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>
2998 <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>
3004 Section headings with TOC
3006 title=[[Parser test script]]
3009 === Subheadline 1 ===
3010 ===== Skipping a level =====
3011 ====== Skipping a level ======
3015 ===Another headline===
3017 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3019 <li class="toclevel-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
3021 <li class="toclevel-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
3023 <li class="toclevel-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
3025 <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>
3032 <li class="toclevel-1"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
3034 <li class="toclevel-2"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</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_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </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: Subheadline 1">edit</a>]</div><a name="Subheadline_1"></a><h3> Subheadline 1 </h3>
3041 <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>
3042 <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>
3043 <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>
3046 <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>
3050 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
3052 Handling of sections up to level 6 and beyond
3055 == Level 2 Heading==
3056 === Level 3 Heading===
3057 ==== Level 4 Heading====
3058 ===== Level 5 Heading=====
3059 ====== Level 6 Heading======
3060 ======= Level 7 Heading=======
3061 ======== Level 8 Heading========
3062 ========= Level 9 Heading=========
3063 ========== Level 10 Heading==========
3065 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3067 <li class="toclevel-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
3069 <li class="toclevel-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
3071 <li class="toclevel-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
3073 <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>
3075 <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>
3077 <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>
3078 <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>
3079 <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>
3080 <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>
3081 <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>
3093 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3094 <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>
3095 <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>
3096 <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>
3097 <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>
3098 <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>
3099 <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>
3100 <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>
3101 <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>
3102 <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>
3103 <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>
3108 Resolving duplicate section names
3110 title=[[Parser test script]]
3115 <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>
3116 <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>
3128 Template with sections, __NOTOC__
3130 title=[[Parser test script]]
3137 <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>
3138 <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>
3139 <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>
3140 <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>
3145 __NOEDITSECTION__ keyword
3151 <a name="Section_1"></a><h2>Section 1</h2>
3152 <a name="Section_2"></a><h2>Section 2</h2>
3157 Link inside a section heading
3159 title=[[Parser test script]]
3161 ==Section with a [[Main Page|link]] in it==
3163 <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>
3169 BUG 1219 URL next to image (good)
3171 http://example.com [[Image:foobar.jpg]]
3173 <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>
3178 BUG 1219 URL next to image (broken)
3180 http://example.com[[Image:foobar.jpg]]
3182 <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>
3187 Bug 1186 news: in the middle of text
3189 http://en.wikinews.org/wiki/Wikinews:Workplace
3191 <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>
3197 Namespaced link must have a title
3206 Namespaced link must have a title (bad fragment version)
3208 [[Project:#fragment]]
3210 <p>[[Project:#fragment]]
3216 div with no attributes
3218 <div>HTML rocks</div>
3220 <div>HTML rocks</div>
3225 div with double-quoted attribute
3227 <div id="rock">HTML rocks</div>
3229 <div id="rock">HTML rocks</div>
3234 div with single-quoted attribute
3236 <div id='rock'>HTML rocks</div>
3238 <div id="rock">HTML rocks</div>
3243 div with unquoted attribute
3245 <div id=rock>HTML rocks</div>
3247 <div id="rock">HTML rocks</div>
3252 div with illegal double attributes
3254 <div align="center" align="right">HTML rocks</div>
3256 <div align="right">HTML rocks</div>
3261 HTML multiple attributes correction
3263 <p class="error" class="awesome">Awesome!</p>
3265 <p class="awesome">Awesome!</p>
3270 Table multiple attributes correction
3273 !+ class="error" class="awesome"| status
3278 <th class="awesome"> status
3286 <DIV ALIGN="center">HTML ROCKS</DIV>
3288 <div align="center">HTML ROCKS</div>
3294 text with amp in the middle of nowhere
3298 <p>Remember AT&T?
3303 text with character entity: eacute
3305 I always thought é was a cute letter.
3307 <p>I always thought é was a cute letter.
3312 text with undefined character entity: xacute
3314 I always thought &xacute; was a cute letter.
3316 <p>I always thought &xacute; was a cute letter.
3328 [[Media:Foobar.jpg]]
3330 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
3335 Media link with text
3337 [[Media:Foobar.jpg|A neat file to look at]]
3339 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
3343 # FIXME: this is still bad HTML tag nesting
3345 Media link with nasty text
3346 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3348 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3350 <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>
3355 Media link to nonexistent file (bug 1702)
3357 [[Media:No such.jpg]]
3359 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
3364 Image link to nonexistent file (bug 1850 - good)
3366 [[Image:No such.jpg]]
3368 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3373 :Image link to nonexistent file (bug 1850 - bad)
3375 [[:Image:No such.jpg]]
3377 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3384 Character reference normalization in link text (bug 1938)
3386 [[Main Page|this&that]]
3388 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3393 Empty attribute crash test (bug 2067)
3395 <font color="">foo</font>
3397 <p><font color="">foo</font>
3402 Empty attribute crash test single-quotes (bug 2067)
3404 <font color=''>foo</font>
3406 <p><font color="">foo</font>
3411 Attribute test: equals, then nothing
3413 <font color=>foo</font>
3420 Attribute test: unquoted value
3422 <font color=x>foo</font>
3424 <p><font color="x">foo</font>
3429 Attribute test: unquoted but illegal value (hash)
3431 <font color=#x>foo</font>
3433 <p><font color="#x">foo</font>
3438 Attribute test: no value
3440 <font color>foo</font>
3442 <p><font color="color">foo</font>
3447 Bug 2095: link with three closing brackets
3451 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3456 Bug 2095: link with pipe and three closing brackets
3460 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3465 Bug 2095: link with pipe and three closing brackets, version 2
3467 [[Main Page|[http://example.com/]]]
3469 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3479 Template:Dangerous attribute
3481 " onmouseover="alert(document.cookie)
3485 Template:Dangerous style attribute
3487 border-size: expression(alert(document.cookie))
3493 <div style="float: right; {{{1}}}">Magic div</div>
3497 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3499 <div title="{{test}}"></div>
3501 <div title="This is a test template"></div>
3506 Bug 2304: HTML attribute safety (dangerous template; 2309)
3508 <div title="{{dangerous attribute}}"></div>
3510 <div title=""></div>
3515 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3517 <div style="{{dangerous style attribute}}"></div>
3524 Bug 2304: HTML attribute safety (safe parameter; 2309)
3526 {{div style|width: 200px}}
3528 <div style="float: right; width: 200px">Magic div</div>
3533 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3535 {{div style|width: expression(alert(document.cookie))}}
3537 <div>Magic div</div>
3542 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3544 {{div style|"><script>alert(document.cookie)</script>}}
3546 <div>Magic div</div>
3551 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3553 {{div style|" ><script>alert(document.cookie)</script>}}
3555 <div style="float: right;">Magic div</div>
3560 Bug 2304: HTML attribute safety (link)
3562 <div title="[[Main Page]]"></div>
3564 <div title="[[Main Page]]"></div>
3569 Bug 2304: HTML attribute safety (italics)
3571 <div title="''foobar''"></div>
3573 <div title="''foobar''"></div>
3578 Bug 2304: HTML attribute safety (bold)
3580 <div title="'''foobar'''"></div>
3582 <div title="'''foobar'''"></div>
3588 Bug 2304: HTML attribute safety (ISBN)
3590 <div title="ISBN 1234567890"></div>
3592 <div title="ISBN 1234567890"></div>
3597 Bug 2304: HTML attribute safety (RFC)
3599 <div title="RFC 1234"></div>
3601 <div title="RFC 1234"></div>
3606 Bug 2304: HTML attribute safety (PMID)
3608 <div title="PMID 1234567890"></div>
3610 <div title="PMID 1234567890"></div>
3615 Bug 2304: HTML attribute safety (web link)
3617 <div title="http://example.com/"></div>
3619 <div title="http://example.com/"></div>
3624 Bug 2304: HTML attribute safety (named web link)
3626 <div title="[http://example.com/ link]"></div>
3628 <div title="[http://example.com/ link]"></div>
3633 Bug 3244: HTML attribute safety (extension; safe)
3635 <div style="<nowiki>background:blue</nowiki>"></div>
3637 <div style="background:blue"></div>
3642 Bug 3244: HTML attribute safety (extension; unsafe)
3644 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3651 Math section safety when disabled
3653 <math><script>alert(document.cookies);</script></math>
3655 <p><math><script>alert(document.cookies);</script></math>
3659 # More MSIE fun discovered by Tom Gilder
3662 MSIE CSS safety test: spurious slash
3664 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3671 MSIE CSS safety test: hex code
3673 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3680 MSIE CSS safety test: comment in url
3682 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3684 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3689 MSIE CSS safety test: comment in expression
3691 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3693 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3699 Table attribute legitimate extension
3702 !+ style="<nowiki>color:blue</nowiki>"| status
3707 <th style="color:blue"> status
3713 Table attribute safety
3716 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3734 Expansion of multi-line templates in attribute values (bug 6255)
3736 <div style="background: {{identity|#00FF00}}">-</div>
3738 <div style="background: #00FF00">-</div>
3744 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
3746 <div style="background:
3749 <div style="background: #00FF00">-</div>
3754 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
3756 <div style="background: #00FF00">-</div>
3758 <div style="background: #00FF00">-</div>
3763 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3766 Parser hook: empty input
3779 Parser hook: empty input using terminated empty elements
3792 Parser hook: empty input using terminated empty elements (space before)
3805 Parser hook: basic input
3819 Parser hook: case insensetive
3833 Parser hook: case insensetive, redux
3846 Parser hook: nested tags
3850 <tag><tag></tag></tag>
3861 Parser hook: basic arguments
3863 <tag width=200 height = "100" depth = '50' square></tag>
3882 Parser hook: argument containing a forward slash (bug 5344)
3884 <tag filename='/tmp/bla'></tag>
3890 string(8) "/tmp/bla"
3897 Parser hook: empty input using terminated empty elements (bug 2374)
3911 # </tag> should be output literally since there is no matching tag that begins it
3913 Parser hook: basic arguments using terminated empty elements (bug 2374)
3915 <tag width=200 height = "100" depth = '50' square/>
3938 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
3942 Parser hook: static parser hook not inside a comment
3944 <statictag>hello, world</statictag>
3945 <statictag action=flush/>
3953 Parser hook: static parser hook inside a comment
3955 <!-- <statictag>hello, world</statictag> -->
3956 <statictag action=flush/>
3962 # Nested template calls; this case was broken by Parser.php rev 1.506,
3966 Template:One-parameter
3968 (My parameter is: {{{1}}})
3972 Template:Map-one-parameter
3978 Nested template calls
3980 {{Map-one-parameter|One-parameter|param}}
3982 <p>(My parameter is: param)
3991 Sanitizer: Closing of open tags
3993 <s></s><table></table>
3995 <s></s><table></table>
4000 Sanitizer: Closing of open but not closed tags
4009 Sanitizer: Closing of closed but not open tags
4018 Sanitizer: Closing of closed but not open table tags
4020 Table not started</td></tr></table>
4022 <p>Table not started</td></tr></table>
4027 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
4029 <span id="æ: v">byte</span>[[#æ: v|backlink]]
4031 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
4036 Sanitizer: Validating the contents of the id attribute (bug 4515)
4042 Something, but defenetly not <br id="9" />...
4046 Language converter: output gets cut off unexpectedly (bug 5757)
4050 this bit is safe: }-
4052 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
4054 then we get cut off here: }-
4056 all additional text is vanished
4058 <p>this bit is safe: }-
4059 </p><p>but if we add a conversion instance: xxx
4060 </p><p>then we get cut off here: }-
4061 </p><p>all additional text is vanished
4066 Self closed html pairs (bug 5487)
4069 <center><font id="bug" />Centered text</center>
4070 <div><font id="bug2" />In div text</div>
4072 <center><font id="bug" />Centered text</center>
4073 <div><font id="bug2" />In div text</div>
4082 HTML bullet list, closed tags (bug 5497)
4097 HTML bullet list, unclosed tags (bug 5497)
4112 HTML ordered list, closed tags (bug 5497)
4127 HTML ordered list, unclosed tags (bug 5497)
4142 HTML nested bullet list, closed tags (bug 5497)
4167 HTML nested bullet list, open tags (bug 5497)
4190 HTML nested ordered list, closed tags (bug 5497)
4215 HTML nested ordered list, open tags (bug 5497)
4238 HTML ordered list item with parameters oddity
4240 <ol><li id="fragment">One</li></ol>
4242 <ol><li id="fragment">One</li></ol>
4247 bug 5918: autonumbering
4249 [http://first/] [http://second] [ftp://ftp]
4253 [mailto:enclosed@mail.tld With target]
4255 [mailto:enclosed@mail.tld]
4257 mailto:inline@mail.tld
4259 <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>
4260 </p><p><a href="ftp://inlineftp" class="external free" title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4261 </p><p><a href="mailto:enclosed@mail.tld" class="external text" title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4262 </p><p><a href="mailto:enclosed@mail.tld" class="external autonumber" title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4263 </p><p><a href="mailto:inline@mail.tld" class="external free" title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4269 # Security and HTML correctness
4270 # From Nick Jenkins' fuzz testing
4274 Fuzz testing: Parser13
4289 Fuzz testing: Parser14
4294 <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>
4295 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4297 <li class="toclevel-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4299 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4304 Fuzz testing: Parser14-table
4309 <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>
4310 <table style="__TOC__">
4316 # Known to produce bogus xml (extra </td>)
4318 Fuzz testing: Parser16
4327 <th>https://</th><th></th><th></th><th>
4335 Fuzz testing: Parser21
4338 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4343 <th> <a href="irc://{{ftp://a" class="external free" title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4352 Fuzz testing: Parser22
4354 http://===r:::https://b
4358 <p><a href="http://===r:::https://b" class="external free" title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4366 # Known to produce bad XML for now
4368 Fuzz testing: Parser24
4375 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4376 <br style="onmouseover='alert(document.cookie);' " />
4378 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4383 <u class="|">} >
4384 <br style="onmouseover='alert(document.cookie);'" />
4386 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4395 # Known to produce bad XML for now
4397 Fuzz testing: Parser25 (bug 6055)
4405 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4407 <li class="||">
4408 blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4413 Fuzz testing: URL adjacent extension (with space, clean)
4416 http://example.com <nowiki>junk</nowiki>
4418 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a> junk
4423 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4426 http://example.com<nowiki>junk</nowiki>
4428 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>junk
4433 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4436 http://example.com<pre>junk</pre>
4438 <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>
4443 Fuzz testing: image with bogus manual thumbnail
4445 [[Image:foobar.jpg|thumbnail= ]]
4447 <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>
4452 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
4454 <pre dir=" "></pre>
4456 <pre dir=" "></pre>
4461 Parsing optional HTML elements (Bug 6171)
4466 <td> Some tabular data</td>
4467 <td> More tabular data ...
4468 <td> And yet som tabular data</td>
4474 <td> Some tabular data</td>
4475 <td> More tabular data ...
4476 </td><td> And yet som tabular data</td>
4483 Correct handling of <td>, <tr> (Bug 6171)
4488 <td> Some tabular data</td>
4489 <td> More tabular data ...</td>
4490 <td> And yet som tabular data</td>
4496 <td> Some tabular data</td>
4497 <td> More tabular data ...</td>
4498 <td> And yet som tabular data</td>
4506 Parsing crashing regression (fr:JavaScript)
4510 <p></body></x>
4515 Inline wiki vs wiki block nesting
4521 <p><b>Bold paragraph</b>
4522 </p><p>New wiki paragraph
4527 Inline HTML vs wiki block nesting
4533 <p><b>Bold paragraph</b>
4534 </p><p>New wiki paragraph
4540 Mixing markup for italics and bold
4543 '''bold''''''bold''bolditalics'''''
4545 <p><b>bold</b><b>bold<i>bolditalics</i></b>
4553 Article for special page transclusion test
4557 Special page transclusion
4560 {{Special:Prefixindex/Xyzzyx}}
4564 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4569 Special page transclusion twice (bug 5021)
4572 {{Special:Prefixindex/Xyzzyx}}
4573 {{Special:Prefixindex/Xyzzyx}}
4577 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4580 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4585 Invalid header with following text
4595 Section extraction test (section 0)
4615 Section extraction test (section 1)
4637 Section extraction test (section 2)
4658 Section extraction test (section 3)
4678 Section extraction test (section 4)
4702 Section extraction test (section 5)
4722 Section extraction test (section 6)
4743 Section extraction test (section 7)
4763 Section extraction test (section 8)
4783 Section extraction test (section 9)
4804 Section extraction test (section 10)
4824 Section extraction test (nonexistent section 11)
4843 Section extraction test with bogus heading (section 1)
4848 ==bogus== not a legal section
4852 ==bogus== not a legal section
4856 Section extraction test with bogus heading (section 2)
4861 ==bogus== not a legal section
4868 Section extraction test with comment after heading (section 1)
4873 ==legal== <!-- a legal section -->
4880 Section extraction test with comment after heading (section 2)
4885 ==legal== <!-- a legal section -->
4888 ==legal== <!-- a legal section -->
4892 Section extraction test with bogus <nowiki> heading (section 1)
4897 ==bogus== <nowiki>not a legal section</nowiki>
4901 ==bogus== <nowiki>not a legal section</nowiki>
4905 Section extraction test with bogus <nowiki> heading (section 2)
4910 ==bogus== <nowiki>not a legal section</nowiki>
4918 Section extraction prefixed by comment (section 1) (bug 2587)
4929 Section extraction prefixed by comment (section 2) (bug 2587)
4941 Section extraction, mixed wiki and html (section 1) (bug 2607)
4957 Section extraction, mixed wiki and html (section 2) (bug 2607)
4974 Section extraction, heading surrounded by <noinclude> (bug 3342)
4978 <noinclude>==a==</noinclude>
4981 <noinclude>==a==</noinclude>
4987 Section extraction, HTML heading subsections (bug 5272)
5000 Section extraction, HTML headings should be ignored in extensions (bug 3476)
5014 Section replacement test (section 0)
5045 Section replacement test (section 1)
5074 Section replacement test (section 2)
5104 Section replacement test (section 3)
5135 Section replacement test (section 4)
5162 Section replacement test (section 5)
5193 Section replacement test (section 6)
5223 Section replacement test (section 7)
5254 Section replacement test (section 8)
5285 Section replacement test (section 9)
5314 Section replacement test (section 10)
5345 Section extraction, HTML headings not at line boundaries (section 0)
5349 <h2>Evil</h2><i>blah blah blah</i>
5357 <i>extra evil</i><h2>Extra nasty</h2>
5364 Section extraction, HTML headings not at line boundaries (section 1)
5368 <h2>Evil</h2><i>blah blah blah</i>
5376 <i>extra evil</i><h2>Extra nasty</h2>
5380 <h2>Evil</h2><i>blah blah blah</i>
5386 Section extraction, HTML headings not at line boundaries (section 2)
5390 <h2>Evil</h2><i>blah blah blah</i>
5398 <i>extra evil</i><h2>Extra nasty</h2>
5410 Section extraction, HTML headings not at line boundaries (section 3)
5414 <h2>Evil</h2><i>blah blah blah</i>
5422 <i>extra evil</i><h2>Extra nasty</h2>
5426 <h2>Extra nasty</h2>
5433 Section extraction, heading followed by pre with 20 spaces (bug 6398)
5445 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
5457 Handling of 
 in URLs
5461 <ul><li><ul><li><a href="irc://%0Aa" class="external free" title="irc://%0Aa" rel="nofollow">irc://%0Aa</a>
5468 5 quotes, code coverage +1 line
5475 Special:Search page linking.
5479 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
5494 * {{SUBJECTPAGENAME}}
5495 * {{SUBJECTPAGENAMEE}}
5502 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
5504 <ul><li> Parser test
5505 </li><li> Parser test
5506 </li><li> Parser test
5507 </li><li> Parser_test
5508 </li><li> Parser test
5509 </li><li> Parser_test
5510 </li><li> Talk:Parser test
5511 </li><li> Talk:Parser_test
5512 </li><li> Parser test
5513 </li><li> Parser_test
5520 </li><li> <a href="/index.php?title=Template:Dynamic&action=edit" class="new" title="Template:Dynamic">Template:Dynamic</a>
5524 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
5534 image4 |300px| centre
5535 image5.svg| http://///////
5540 <table class="gallery" cellspacing="0" cellpadding="0"><tr><td><div class="gallerybox"><div style="height: 152px;">Image1.png</div><div class="gallerytext">
5542 <td><div class="gallerybox"><div style="height: 152px;">Image2.gif</div><div class="gallerytext">
5543 ||||</div></div></td>
5544 <td><div class="gallerybox"><div style="height: 152px;">Image3</div><div class="gallerytext">
5546 <td><div class="gallerybox"><div style="height: 152px;">Image4</div><div class="gallerytext">
5547 300px| centre</div></div></td>
5548 </tr><tr><td><div class="gallerybox"><div style="height: 152px;">Image5.svg</div><div class="gallerytext">
5549 <a href="http://///////" class="external free" title="http://///////" rel="nofollow">http://///////</a></div></div></td>
5550 <td><div class="gallerybox"><div style="height: 152px;">* image6</div><div class="gallerytext">
5558 HTML Hex character encoding.
5560 JavaScript
5567 __FORCETOC__ override
5581 <p><a href="/index.php?title=Special:Booksources&isbn=983" class="internal">ISBN 983</a> 987
5586 ISBN followed by 5 spaces
5597 disabled # Disabled until Bug 6560 resolved
5601 <p>ISBN <a href="/wiki/index.php?title=Special:Booksources&isbn=1234" class="internal">ISBN 1234</a>
5610 <p>RFC <a href="http://www.ietf.org/rfc/rfc1234.txt" class="external" title="http://www.ietf.org/rfc/rfc1234.txt">RFC 1234</a>
5615 Double RFC with a wiki link
5628 <p><a href="http://www.ietf.org/rfc/rfc983.txt" class="external" title="http://www.ietf.org/rfc/rfc983.txt">RFC 983</a> 987
5633 Centre-aligned image
5635 [[Image:foobar.jpg|centre]]
5637 <div class="center"><div class="floatnone"><span><a href="/wiki/Image:Foobar.jpg" class="image" title=""><img src="http://example.com/images/3/3a/Foobar.jpg" alt="" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div></div>
5644 [[Image:foobar.jpg|none]]
5646 <div class="floatnone"><span><a href="/wiki/Image:Foobar.jpg" class="image" title=""><img src="http://example.com/images/3/3a/Foobar.jpg" alt="" width="1941" height="220" longdesc="/wiki/Image:Foobar.jpg" /></a></span></div>
5651 Width + Height sized image (using px) (height is ignored)
5653 [[Image:foobar.jpg|640x480px]]
5655 <p><a href="/wiki/Image:Foobar.jpg" class="image" title=""><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" alt="" width="640" height="73" longdesc="/wiki/Image:Foobar.jpg" /></a>
5660 Another italics / bold test
5668 # Note the results may be incorrect, as parserTest output included this:
5669 # XML error: Mismatched tag at byte 6120:
5670 # ...<dd> </dt></dl> </dd...
5676 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
5696 Try for 100% code coverage