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: [illegal character reference in hostname]
719 [http://e‌xample.com/]
721 <p>[http://e‌xample.com/]
726 External links: www.jpeg.org (bug 554)
730 <p><a href="http://www.jpeg.org" class="external free" title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
735 External links: URL within URL (original bug 2)
737 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
739 <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>
744 BUG 361: URL inside bracketed URL
746 [http://www.example.com/foo http://www.example.com/bar]
748 <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>
753 BUG 361: URL within URL, not bracketed
755 http://www.example.com/foo?=http://www.example.com/bar
757 <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>
762 BUG 289: ">"-token in URL-tail
764 http://www.example.com/<hello>
766 <p><a href="http://www.example.com/" class="external free" title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
771 BUG 289: literal ">"-token in URL-tail
773 http://www.example.com/<b>html</b>
775 <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>
780 BUG 289: ">"-token in bracketed URL
782 [http://www.example.com/<hello> stuff]
784 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
789 BUG 289: literal ">"-token in bracketed URL
791 [http://www.example.com/<b>html</b> stuff]
793 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
798 BUG 289: literal double quote at end of URL
800 http://www.example.com/"hello"
802 <p><a href="http://www.example.com/" class="external free" title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
807 BUG 289: literal double quote in bracketed URL
809 [http://www.example.com/"hello" stuff]
811 <p><a href="http://www.example.com/" class="external text" title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
816 External links: invalid character
817 Fixme: the missing char seems to have gone missing
821 [http://www.example.com test]
823 <p>[<a href="http://www.example.com" class="external free" title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
828 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
830 [http://www.example.com test]
832 <p><a href="http://www.example.com" class="external text" title="http://www.example.com" rel="nofollow">test</a>
837 External links: wiki links within external link (Bug 3695)
839 [http://example.com [[wikilink]] embedded in ext link]
841 <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>
846 BUG 787: Links with one slash after the url protocol are invalid
850 [http:/example.com title]
853 </p><p>[http:/example.com title]
858 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
860 ''[http://example.com text'']
861 [http://example.com '''text]'''
862 ''Something [http://example.com in italic'']
863 ''Something [http://example.com mixed''''', even bold]'''
864 '''''Now [http://example.com both''''']
866 <p><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i>text</i></a>
867 <a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><b>text</b></a>
868 <i>Something </i><a href="http://example.com" class="external text" title="http://example.com" rel="nofollow"><i>in italic</i></a>
869 <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>
870 <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>
878 http://www.example.com/?title=AT%26T
880 <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>
885 Bug 4781, 5267: %26 in URL
887 http://www.example.com/?title=100%25_Bran
889 <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>
894 Bug 4781, 5267: %28, %29 in URL
896 http://www.example.com/?title=Ben-Hur_%281959_film%29
898 <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>
904 Bug 4781: %26 in autonumber URL
906 [http://www.example.com/?title=AT%26T]
908 <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>
913 Bug 4781, 5267: %26 in autonumber URL
915 [http://www.example.com/?title=100%25_Bran]
917 <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>
922 Bug 4781, 5267: %28, %29 in autonumber URL
924 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
926 <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>
932 Bug 4781: %26 in bracketed URL
934 [http://www.example.com/?title=AT%26T link]
936 <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>
941 Bug 4781, 5267: %26 in bracketed URL
943 [http://www.example.com/?title=100%25_Bran link]
945 <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>
950 Bug 4781, 5267: %28, %29 in bracketed URL
952 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
954 <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>
959 External link containing double-single-quotes in text '' (bug 4598 sanity check)
961 Some [http://example.com/ pretty ''italics'' and stuff]!
963 <p>Some <a href="http://example.com/" class="external text" title="http://example.com/" rel="nofollow">pretty <i>italics</i> and stuff</a>!
968 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
970 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
972 <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>
985 Normal text. '''Bold text.''' Normal text. ''Italic text.''
987 Normal text. '''''Bold italic text.''''' Normal text.
989 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
990 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
996 Unclosed and unmatched quotes
998 '''''Bold italic text '''with bold deactivated''' in between.'''''
1000 '''''Bold italic text ''with italic deactivated'' in between.'''''
1004 ..spanning two paragraphs (should not work).'''
1006 '''Bold tag left open
1008 ''Italic tag left open
1012 <!-- Unmatching number of opening, closing tags: -->
1013 '''This year''''s election ''should'' beat '''last year''''s.
1015 ''Tom'''s car is bigger than ''Susan'''s.
1017 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
1018 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
1019 </p><p><b>Bold text..</b>
1020 </p><p>..spanning two paragraphs (should not work).
1021 </p><p><b>Bold tag left open</b>
1022 </p><p><i>Italic tag left open</i>
1024 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
1025 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
1032 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
1035 # This should not produce <table></table> as <table><tr><td></td></tr></table>
1036 # is the bare minimun required by the spec, see:
1037 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
1039 A table with no data.
1045 # A table with nothing but a caption is invalid XHTML, we might want to render
1046 # this as <p>caption</p>
1048 A table with nothing but a caption
1056 </caption><tr><td></td></tr></table>
1080 Multiplication table
1082 {| border="1" cellpadding="2"
1083 |+Multiplication table
1085 ! × !! 1 !! 2 !! 3
1103 <table border="1" cellpadding="2">
1104 <caption>Multiplication table
1107 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1111 </th><td> 1 </td><td> 2 </td><td> 3
1115 </th><td> 2 </td><td> 4 </td><td> 6
1119 </th><td> 3 </td><td> 6 </td><td> 9
1123 </th><td> 4 </td><td> 8 </td><td> 12
1127 </th><td> 5 </td><td> 10 </td><td> 15
1135 {| align=right border=1
1137 |rowspan=2| Cell 2, row 1 (and 2)
1144 <table align="right" border="1">
1147 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1148 </td><td> Cell 3, row 1
1152 </td><td> Cell 3, row 2
1163 {| bgcolor=#ABCDEF border=2
1168 |the original table again
1175 <table bgcolor="#ABCDEF" border="2">
1182 </td><td>the original table again
1188 Invalid attributes in table cell (bug 1830)
1202 # FIXME: this one has incorrect tag nesting still.
1204 Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)
1207 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1211 <td><a href="ftp://|x||" class="external autonumber" title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1223 Plain link, capitalized
1227 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1232 Plain link, uncapitalized
1236 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1243 [[Main Page|The Main Page]]
1245 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1254 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1261 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1263 <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>
1270 [[Main Page]]xxx, [[Main Page]]XXX
1272 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1277 Link with 3 brackets
1286 Piped link with 3 brackets
1288 [[[main page|the main page]]]
1290 <p>[[[main page|the main page]]]
1295 Link with multiple pipes
1297 [[Main Page|The|Main|Page]]
1299 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1306 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1308 <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>
1313 Piped link to namespace
1315 [[Meta:Disclaimers|The disclaimers]]
1317 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1324 [[Usually caused by a typo (oops}]]
1326 <p>[[Usually caused by a typo (oops}]]
1331 Link containing % (not as a hex sequence)
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 single hex sequence interpreted to char
1344 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1349 Link containing % as a double hex sequence interpreted to hex sequence
1353 <p>[[7%2525 Solution]]
1358 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1359 Example for such a section: == < ==
1361 [[%23%3c]][[%23%3e]]
1363 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1368 Link containing "<#" and ">#" as a hex sequences
1370 [[%3c%23]][[%3e%23]]
1372 <p>[[%3c%23]][[%3e%23]]
1377 Link containing double-single-quotes '' (bug 4598)
1379 [[Lista d''e paise d''o munno]]
1381 <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>
1386 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1388 Some [[Link|pretty ''italics'' and stuff]]!
1390 <p>Some <a href="/index.php?title=Link&action=edit" class="new" title="Link">pretty <i>italics</i> and stuff</a>!
1395 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1397 ''Some [[Link|pretty ''italics'' and stuff]]!
1399 <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>
1406 [[http://www.example.org]]
1408 <p>[<a href="http://www.example.org" class="external autonumber" title="http://www.example.org" rel="nofollow">[1]</a>]
1412 # I'm fairly sure the expected result here is wrong.
1413 # We want these to be URL links, not pseudo-pages with URLs for titles....
1414 # However the current output is also pretty screwy.
1417 # I'm changing it to match the current output--it arguably makes more
1418 # sense in the light of the test above. Old expected result was:
1419 #<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>
1421 # But I think this test is bordering on "garbage in, garbage out" anyway.
1426 Piped link to URL: [[http://www.example.org|an example URL]]
1428 <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>]
1433 BUG 2: [[page|http://url/]] should link to page, not http://url/
1435 [[Main Page|http://url/]]
1437 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1442 BUG 337: Escaped self-links should be bold
1446 [[Bug462]] [[Bug462]]
1448 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1453 Self-link to section should not be bold
1457 [[Main Page#section]]
1459 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1464 <nowiki> inside a link
1466 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1468 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1473 ### Interwiki links (see maintenance/interwiki.sql)
1477 Inline interwiki link
1479 [[MeatBall:SoftSecurity]]
1481 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1486 Inline interwiki link with empty title (bug 2372)
1490 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw" title="meatball:">MeatBall:</a>
1495 Interwiki link encoding conversion (bug 1636)
1497 *[[Wikipedia:ro:Olteniţa]]
1498 *[[Wikipedia:ro:Olteniţa]]
1500 <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>
1501 </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>
1507 Interwiki link with fragment (bug 2130)
1509 [[MeatBall:SoftSecurity#foo]]
1511 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1529 Incorrecly removing closing slashes from correctly formed XHTML
1531 <br style="clear:both;" />
1533 <p><br style="clear:both;" />
1538 Failing to transform badly formed HTML into correct XHTML
1544 <p><br clear="left" />
1545 <br clear="right" />
1551 Horizontal ruler (should it add that extra space?)
1565 ### Block-level elements
1588 <ol><li>Numbered list
1605 ***#Number on level 4
1607 **#Number on level 3
1608 **#Number on level 3
1613 <ol><li> with numbers
1615 <ul><li> and bullets
1617 <ol><li> and numbers
1619 </li><li>bullets again
1620 <ul><li>bullet level 2
1621 <ul><li>bullet level 3
1622 <ol><li>Number on level 4
1625 </li><li>bullet level 2
1626 <ol><li>Number on level 3
1627 </li><li>Number on level 3
1630 <ol><li>number level 2
1638 List items are not parsed correctly following a <pre> block (bug 785)
1644 <ul><li> <pre>foo</pre>
1645 </li><li> <pre>bar</pre>
1656 Magic Word: {{CURRENTDAY}}
1665 Magic Word: {{CURRENTDAY2}}
1674 Magic Word: {{CURRENTDAYNAME}}
1683 Magic Word: {{CURRENTDOW}}
1692 Magic Word: {{CURRENTMONTH}}
1701 Magic Word: {{CURRENTMONTHABBREV}}
1703 {{CURRENTMONTHABBREV}}
1710 Magic Word: {{CURRENTMONTHNAME}}
1712 {{CURRENTMONTHNAME}}
1719 Magic Word: {{CURRENTMONTHNAMEGEN}}
1721 {{CURRENTMONTHNAMEGEN}}
1728 Magic Word: {{CURRENTTIME}}
1737 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1746 Magic Word: {{CURRENTYEAR}}
1755 Magic Word: {{FULLPAGENAME}}
1757 title=[[User:Ævar Arnfjörð Bjarmason]]
1761 <p>User:Ævar Arnfjörð Bjarmason
1766 Magic Word: {{FULLPAGENAMEE}}
1768 title=[[User:Ævar Arnfjörð Bjarmason]]
1772 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1777 Magic Word: {{NAMESPACE}}
1779 title=[[User:Ævar Arnfjörð Bjarmason]]
1789 Magic Word: {{NAMESPACEE}}
1791 title=[[User:Ævar Arnfjörð Bjarmason]]
1801 Magic Word: {{NUMBEROFARTICLES}}
1803 {{NUMBEROFARTICLES}}
1810 Magic Word: {{NUMBEROFFILES}}
1819 Magic Word: {{PAGENAME}}
1821 title=[[User:Ævar Arnfjörð Bjarmason]]
1826 <p>Ævar Arnfjörð Bjarmason
1831 Magic Word: {{PAGENAMEE}}
1833 title=[[User:Ævar Arnfjörð Bjarmason]]
1837 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1842 Magic Word: {{REVISIONID}}
1851 Magic Word: {{SCRIPTPATH}}
1860 Magic Word: {{SERVER}}
1864 <p><a href="http://localhost" class="external free" title="http://localhost" rel="nofollow">http://localhost</a>
1869 Magic Word: {{SERVERNAME}}
1878 Magic Word: {{SITENAME}}
1887 Namespace 1 {{ns:1}}
1896 Namespace 1 {{ns:01}}
1905 Namespace 0 {{ns:0}} (bug 4783)
1913 Namespace 0 {{ns:00}} (bug 4783)
1921 Namespace -1 {{ns:-1}}
1930 Namespace Project {{ns:User}}
1943 Magic links: internal link to RFC (bug 479)
1947 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1952 Magic links: RFC (bug 479)
1956 <p><a href="http://www.ietf.org/rfc/rfc822.txt" class="external" title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
1961 Magic links: ISBN (bug 1937)
1965 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1970 Magic links: PMID incorrectly converts space to underscore
1974 <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>
1983 Nonexistant template
1985 {{thistemplatedoesnotexist}}
1987 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1994 This is a test template
2002 <p>This is a test template
2007 Template with explicit namespace
2011 <p>This is a test template
2019 This is a test template with parameter {{{param}}}
2025 {{paramtest|param=foo}}
2027 <p>This is a test template with parameter foo
2032 Template:paramtestnum
2038 Template unnamed parameter
2040 {{paramtestnum|Main Page|the main page}}
2042 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
2047 Template:templatesimple
2053 Template:templateredirect
2055 #redirect [[Template:templatesimple]]
2059 Template:templateasargtestnum
2065 Template:templateasargtest
2067 {{template{{{templ}}}}}
2071 Template:templateasargtest2
2077 Template with template name as unnamed argument
2079 {{templateasargtestnum|templatesimple}}
2086 Template with template name as argument
2088 {{templateasargtest|templ=simple}}
2095 Template with template name as argument (2)
2097 {{templateasargtest2|templ=templatesimple}}
2104 Template:templateasargtestdefault
2106 {{{{{templ|templatesimple}}}}}
2116 Template with default value
2118 {{templateasargtestdefault}}
2125 Template with default value (value set)
2127 {{templateasargtestdefault|templ=templa}}
2136 {{templateredirect}}
2143 Template with argument in separate line
2145 {{ templateasargtest |
2153 Template with complex template as argument
2156 param ={{ templateasargtest |
2159 <p>This is a test template with parameter (test)
2164 Template with thumb image (wiht link in description)
2167 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2169 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>
2174 Template:complextemplate
2176 {{{1}}} {{paramtest|
2177 param ={{{param}}}}}
2181 Template with complex arguments
2184 param ={{ templateasargtest |
2185 templ = simple }}|[[Template:complextemplate|link]]}}
2187 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2192 BUG 553: link with two variables in a piped link
2195 |[[{{{1}}}|{{{2}}}]]
2200 <td>[[{{{1}}}|{{{2}}}]]
2206 Magic variable as template parameter
2208 {{paramtest|param={{SITENAME}}}}
2210 <p>This is a test template with parameter MediaWiki
2217 [[{{{param}}}|link]]
2221 Template parameter as link source
2223 {{linktest|param=Main Page}}
2225 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2233 including another template, {{paramtest|param={{{arg}}}}}
2237 Template passing argument to another template
2239 {{paramtest2|arg='hmm'}}
2241 <p>including another template, This is a test template with parameter 'hmm'
2252 Template as link source
2256 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2274 Template infinite loop
2278 <p>{{loop1}}<!-- WARNING: template loop detected -->
2283 Template from main namespace
2302 BUG 529: Template with table, not included at beginning of line
2319 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2337 BUG 41: Template parameters shown as broken links
2349 ''None'' of '''this''' should be
2351 but rather passed unmodified
2355 # hmm, fix this or just deprecate msgnw and document its behavior?
2361 {{msgnw:MSGNW test}}
2363 <p>''None'' of '''this''' should be
2365 but rather passed unmodified
2373 {{int:youhavenewmessages|lots of money|not!}}
2375 <p>You have lots of money (not!).
2382 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2386 <includeonly> and <noinclude> being included
2397 <onlyinclude>Foo</onlyinclude>bar
2401 <onlyinclude> being included
2413 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2417 <onlyinclude> and <includeonly> being included
2426 <includeonly> and <noinclude> on a page
2428 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2435 <onlyinclude> on a page
2437 <onlyinclude>Foo</onlyinclude>bar
2444 ### Pre-save transform tests
2447 pre-save transform: subst:
2453 This is a test template
2457 pre-save transform: normal template
2467 pre-save transform: nonexistant template
2471 {{thistemplatedoesnotexist}}
2473 {{thistemplatedoesnotexist}}
2478 pre-save transform: subst magic variables
2487 # This is bug 89, which I fixed. -- wtm
2489 pre-save transform: subst: templates with parameters
2493 {{subst:paramtest|param="something else"}}
2495 This is a test template with parameter "something else"
2501 <nowiki>'''not wiki'''</nowiki>
2505 pre-save transform: nowiki in subst (bug 1188)
2509 {{subst:nowikitest}}
2511 <nowiki>'''not wiki'''</nowiki>
2516 Template:commenttest
2518 This template has <!-- a comment --> in it.
2522 pre-save transform: comment in subst (bug 1936)
2526 {{subst:commenttest}}
2528 This template has <!-- a comment --> in it.
2532 pre-save transform: unclosed tag
2536 <nowiki>'''not wiki'''
2538 <nowiki>'''not wiki'''
2542 pre-save transform: mixed tag case
2546 <NOwiki>'''not wiki'''</noWIKI>
2548 <NOwiki>'''not wiki'''</noWIKI>
2552 pre-save transform: unclosed comment in <nowiki>
2556 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2558 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2564 <span onmouseover="alert('crap')">Oh no</span>
2568 (confirming safety of fix for subst bug 1936)
2570 {{Template:dangerous}}
2572 <p><span>Oh no</span>
2577 pre-save transform: comment containing gallery (bug 5024)
2581 <!-- <gallery>data</gallery> -->
2583 <!-- <gallery>data</gallery> -->
2587 pre-save transform: comment containing extension
2591 <!-- <tag>data</tag> -->
2593 <!-- <tag>data</tag> -->
2597 pre-save transform: comment containing nowiki
2601 <!-- <nowiki>data</nowiki> -->
2603 <!-- <nowiki>data</nowiki> -->
2607 pre-save transform: comment containing math
2611 <!-- <math>data</math> -->
2613 <!-- <math>data</math> -->
2617 pre-save transform: <noinclude> in subst (bug 3298)
2627 pre-save transform: <onlyinclude> in subst (bug 3298)
2638 ### Message transform tests
2641 message transform: magic variables
2651 message transform: should not transform wiki markup
2661 message transform: <noinclude> in transcluded template (bug 4926)
2671 message transform: <onlyinclude> in transcluded template (bug 4926)
2687 [[Image:foobar.jpg]]
2689 <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>
2696 [[Image:foobar.jpg|right]]
2698 <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>
2705 [[Image:foobar.jpg|right|Caption text]]
2707 <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>
2712 Image with frame and link
2714 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2716 <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>
2721 Link to image page- image page normally doesn't exists, hence edit link
2722 TODO: Add test with existing image page
2723 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2727 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2732 Frameless image caption with a free URL
2734 [[Image:foobar.jpg|http://example.com]]
2736 <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>
2741 Thumbnail image caption with a free URL
2743 [[Image:foobar.jpg|thumb|http://example.com]]
2745 <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>
2750 BUG 1887: A ISBN with a thumbnail
2752 [[Image:foobar.jpg|thumb|ISBN 12354]]
2754 <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>
2759 BUG 1887: A RFC with a thumbnail
2761 [[Image:foobar.jpg|thumb|This is RFC 12354]]
2763 <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>
2768 BUG 1887: A mailto link with a thumbnail
2770 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
2772 <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>
2777 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
2778 so math is not stripped and turns up as escaped <math> tags.
2780 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2782 <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>
2787 BUG 1887, part 2: A <math> with a thumbnail- math enabled
2791 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2793 <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>
2797 # Pending resolution to bug 368
2799 BUG 648: Frameless image caption with a link
2801 [[Image:foobar.jpg|text with a [[link]] in it]]
2803 <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>
2808 BUG 648: Frameless image caption with a link (suffix)
2810 [[Image:foobar.jpg|text with a [[link]]foo in it]]
2812 <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>
2817 BUG 648: Frameless image caption with an interwiki link
2819 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
2821 <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>
2826 BUG 648: Frameless image caption with a piped interwiki link
2828 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
2830 <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>
2835 Escape HTML special chars in image alt text
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 BUG 499: Alt text should have Ӓ, not &1234;
2846 [[Image:foobar.jpg|♀]]
2848 <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>
2853 Broken image caption with link
2855 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
2857 <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.
2862 Image caption containing another image
2864 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
2866 <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>
2871 Image caption containing a newline
2873 [[Image:Foobar.jpg|This
2876 <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>
2882 Bug 3090: External links other than http: in image captions
2884 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
2886 <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>
2895 Subpage test/subpage
2903 subpage title=[[Subpage test]]
2907 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
2912 Subpage noslash link
2914 subpage title=[[Subpage test]]
2918 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
2927 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
2932 BUG 561: {{/Subpage}}
2934 subpage title=[[Page]]
2938 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
2946 Category:MediaWiki User's Guide
2954 [[:Category:MediaWiki User's Guide]]
2956 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
2965 [[Category:MediaWiki User's Guide]]
2967 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
2971 ### Inter-language links
2974 Inter-language links
2980 [[zh:食品]]
2982 es:Alimento fr:Nourriture zh:食品
2989 Basic section headings
2991 title=[[Parser test script]]
2998 ===Smaller headline===
3001 <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>
3004 <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>
3007 <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>
3013 Section headings with TOC
3015 title=[[Parser test script]]
3018 === Subheadline 1 ===
3019 ===== Skipping a level =====
3020 ====== Skipping a level ======
3024 ===Another headline===
3026 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3028 <li class="toclevel-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
3030 <li class="toclevel-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
3032 <li class="toclevel-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
3034 <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>
3041 <li class="toclevel-1"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
3043 <li class="toclevel-2"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
3047 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3048 <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>
3049 <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>
3050 <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>
3051 <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>
3052 <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>
3055 <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>
3059 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
3061 Handling of sections up to level 6 and beyond
3064 == Level 2 Heading==
3065 === Level 3 Heading===
3066 ==== Level 4 Heading====
3067 ===== Level 5 Heading=====
3068 ====== Level 6 Heading======
3069 ======= Level 7 Heading=======
3070 ======== Level 8 Heading========
3071 ========= Level 9 Heading=========
3072 ========== Level 10 Heading==========
3074 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
3076 <li class="toclevel-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
3078 <li class="toclevel-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
3080 <li class="toclevel-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
3082 <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>
3084 <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>
3086 <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>
3087 <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>
3088 <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>
3089 <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>
3090 <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>
3102 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
3103 <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>
3104 <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>
3105 <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>
3106 <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>
3107 <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>
3108 <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>
3109 <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>
3110 <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>
3111 <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>
3112 <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>
3117 Resolving duplicate section names
3119 title=[[Parser test script]]
3124 <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>
3125 <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>
3137 Template with sections, __NOTOC__
3139 title=[[Parser test script]]
3146 <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>
3147 <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>
3148 <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>
3149 <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>
3154 __NOEDITSECTION__ keyword
3160 <a name="Section_1"></a><h2>Section 1</h2>
3161 <a name="Section_2"></a><h2>Section 2</h2>
3166 Link inside a section heading
3168 title=[[Parser test script]]
3170 ==Section with a [[Main Page|link]] in it==
3172 <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>
3178 BUG 1219 URL next to image (good)
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 1219 URL next to image (broken)
3189 http://example.com[[Image:foobar.jpg]]
3191 <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>
3196 Bug 1186 news: in the middle of text
3198 http://en.wikinews.org/wiki/Wikinews:Workplace
3200 <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>
3206 Namespaced link must have a title
3215 Namespaced link must have a title (bad fragment version)
3217 [[Project:#fragment]]
3219 <p>[[Project:#fragment]]
3225 div with no attributes
3227 <div>HTML rocks</div>
3229 <div>HTML rocks</div>
3234 div with double-quoted attribute
3236 <div id="rock">HTML rocks</div>
3238 <div id="rock">HTML rocks</div>
3243 div with single-quoted attribute
3245 <div id='rock'>HTML rocks</div>
3247 <div id="rock">HTML rocks</div>
3252 div with unquoted attribute
3254 <div id=rock>HTML rocks</div>
3256 <div id="rock">HTML rocks</div>
3261 div with illegal double attributes
3263 <div align="center" align="right">HTML rocks</div>
3265 <div align="right">HTML rocks</div>
3270 HTML multiple attributes correction
3272 <p class="error" class="awesome">Awesome!</p>
3274 <p class="awesome">Awesome!</p>
3279 Table multiple attributes correction
3282 !+ class="error" class="awesome"| status
3287 <th class="awesome"> status
3295 <DIV ALIGN="center">HTML ROCKS</DIV>
3297 <div align="center">HTML ROCKS</div>
3303 text with amp in the middle of nowhere
3307 <p>Remember AT&T?
3312 text with character entity: eacute
3314 I always thought é was a cute letter.
3316 <p>I always thought é was a cute letter.
3321 text with undefined character entity: xacute
3323 I always thought &xacute; was a cute letter.
3325 <p>I always thought &xacute; was a cute letter.
3337 [[Media:Foobar.jpg]]
3339 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
3344 Media link with text
3346 [[Media:Foobar.jpg|A neat file to look at]]
3348 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
3352 # FIXME: this is still bad HTML tag nesting
3354 Media link with nasty text
3355 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3357 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3359 <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>
3364 Media link to nonexistent file (bug 1702)
3366 [[Media:No such.jpg]]
3368 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
3373 Image link to nonexistent file (bug 1850 - good)
3375 [[Image:No such.jpg]]
3377 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3382 :Image link to nonexistent file (bug 1850 - bad)
3384 [[:Image:No such.jpg]]
3386 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3393 Character reference normalization in link text (bug 1938)
3395 [[Main Page|this&that]]
3397 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3402 Empty attribute crash test (bug 2067)
3404 <font color="">foo</font>
3406 <p><font color="">foo</font>
3411 Empty attribute crash test single-quotes (bug 2067)
3413 <font color=''>foo</font>
3415 <p><font color="">foo</font>
3420 Attribute test: equals, then nothing
3422 <font color=>foo</font>
3429 Attribute test: unquoted value
3431 <font color=x>foo</font>
3433 <p><font color="x">foo</font>
3438 Attribute test: unquoted but illegal value (hash)
3440 <font color=#x>foo</font>
3442 <p><font color="#x">foo</font>
3447 Attribute test: no value
3449 <font color>foo</font>
3451 <p><font color="color">foo</font>
3456 Bug 2095: link with three closing brackets
3460 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3465 Bug 2095: link with pipe and three closing brackets
3469 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3474 Bug 2095: link with pipe and three closing brackets, version 2
3476 [[Main Page|[http://example.com/]]]
3478 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3488 Template:Dangerous attribute
3490 " onmouseover="alert(document.cookie)
3494 Template:Dangerous style attribute
3496 border-size: expression(alert(document.cookie))
3502 <div style="float: right; {{{1}}}">Magic div</div>
3506 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3508 <div title="{{test}}"></div>
3510 <div title="This is a test template"></div>
3515 Bug 2304: HTML attribute safety (dangerous template; 2309)
3517 <div title="{{dangerous attribute}}"></div>
3519 <div title=""></div>
3524 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3526 <div style="{{dangerous style attribute}}"></div>
3533 Bug 2304: HTML attribute safety (safe parameter; 2309)
3535 {{div style|width: 200px}}
3537 <div style="float: right; width: 200px">Magic div</div>
3542 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3544 {{div style|width: expression(alert(document.cookie))}}
3546 <div>Magic div</div>
3551 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3553 {{div style|"><script>alert(document.cookie)</script>}}
3555 <div>Magic div</div>
3560 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3562 {{div style|" ><script>alert(document.cookie)</script>}}
3564 <div style="float: right;">Magic div</div>
3569 Bug 2304: HTML attribute safety (link)
3571 <div title="[[Main Page]]"></div>
3573 <div title="[[Main Page]]"></div>
3578 Bug 2304: HTML attribute safety (italics)
3580 <div title="''foobar''"></div>
3582 <div title="''foobar''"></div>
3587 Bug 2304: HTML attribute safety (bold)
3589 <div title="'''foobar'''"></div>
3591 <div title="'''foobar'''"></div>
3597 Bug 2304: HTML attribute safety (ISBN)
3599 <div title="ISBN 1234567890"></div>
3601 <div title="ISBN 1234567890"></div>
3606 Bug 2304: HTML attribute safety (RFC)
3608 <div title="RFC 1234"></div>
3610 <div title="RFC 1234"></div>
3615 Bug 2304: HTML attribute safety (PMID)
3617 <div title="PMID 1234567890"></div>
3619 <div title="PMID 1234567890"></div>
3624 Bug 2304: HTML attribute safety (web link)
3626 <div title="http://example.com/"></div>
3628 <div title="http://example.com/"></div>
3633 Bug 2304: HTML attribute safety (named web link)
3635 <div title="[http://example.com/ link]"></div>
3637 <div title="[http://example.com/ link]"></div>
3642 Bug 3244: HTML attribute safety (extension; safe)
3644 <div style="<nowiki>background:blue</nowiki>"></div>
3646 <div style="background:blue"></div>
3651 Bug 3244: HTML attribute safety (extension; unsafe)
3653 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3660 Math section safety when disabled
3662 <math><script>alert(document.cookies);</script></math>
3664 <p><math><script>alert(document.cookies);</script></math>
3668 # More MSIE fun discovered by Tom Gilder
3671 MSIE CSS safety test: spurious slash
3673 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3680 MSIE CSS safety test: hex code
3682 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3689 MSIE CSS safety test: comment in url
3691 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3693 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3698 MSIE CSS safety test: comment in expression
3700 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3702 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3708 Table attribute legitimate extension
3711 !+ style="<nowiki>color:blue</nowiki>"| status
3716 <th style="color:blue"> status
3722 Table attribute safety
3725 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3743 Expansion of multi-line templates in attribute values (bug 6255)
3745 <div style="background: {{identity|#00FF00}}">-</div>
3747 <div style="background: #00FF00">-</div>
3753 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
3755 <div style="background:
3758 <div style="background: #00FF00">-</div>
3763 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
3765 <div style="background: #00FF00">-</div>
3767 <div style="background: #00FF00">-</div>
3772 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3775 Parser hook: empty input
3788 Parser hook: empty input using terminated empty elements
3801 Parser hook: empty input using terminated empty elements (space before)
3814 Parser hook: basic input
3828 Parser hook: case insensetive
3842 Parser hook: case insensetive, redux
3855 Parser hook: nested tags
3859 <tag><tag></tag></tag>
3870 Parser hook: basic arguments
3872 <tag width=200 height = "100" depth = '50' square></tag>
3891 Parser hook: argument containing a forward slash (bug 5344)
3893 <tag filename='/tmp/bla'></tag>
3899 string(8) "/tmp/bla"
3906 Parser hook: empty input using terminated empty elements (bug 2374)
3920 # </tag> should be output literally since there is no matching tag that begins it
3922 Parser hook: basic arguments using terminated empty elements (bug 2374)
3924 <tag width=200 height = "100" depth = '50' square/>
3947 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
3951 Parser hook: static parser hook not inside a comment
3953 <statictag>hello, world</statictag>
3954 <statictag action=flush/>
3962 Parser hook: static parser hook inside a comment
3964 <!-- <statictag>hello, world</statictag> -->
3965 <statictag action=flush/>
3971 # Nested template calls; this case was broken by Parser.php rev 1.506,
3975 Template:One-parameter
3977 (My parameter is: {{{1}}})
3981 Template:Map-one-parameter
3987 Nested template calls
3989 {{Map-one-parameter|One-parameter|param}}
3991 <p>(My parameter is: param)
4000 Sanitizer: Closing of open tags
4002 <s></s><table></table>
4004 <s></s><table></table>
4009 Sanitizer: Closing of open but not closed tags
4018 Sanitizer: Closing of closed but not open tags
4027 Sanitizer: Closing of closed but not open table tags
4029 Table not started</td></tr></table>
4031 <p>Table not started</td></tr></table>
4036 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
4038 <span id="æ: v">byte</span>[[#æ: v|backlink]]
4040 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
4045 Sanitizer: Validating the contents of the id attribute (bug 4515)
4051 Something, but defenetly not <br id="9" />...
4055 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
4059 <br id="foo" /><br id="foo" />
4061 Something need to be done. foo-2 ?
4065 Language converter: output gets cut off unexpectedly (bug 5757)
4069 this bit is safe: }-
4071 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
4073 then we get cut off here: }-
4075 all additional text is vanished
4077 <p>this bit is safe: }-
4078 </p><p>but if we add a conversion instance: xxx
4079 </p><p>then we get cut off here: }-
4080 </p><p>all additional text is vanished
4085 Self closed html pairs (bug 5487)
4088 <center><font id="bug" />Centered text</center>
4089 <div><font id="bug2" />In div text</div>
4091 <center><font id="bug" />Centered text</center>
4092 <div><font id="bug2" />In div text</div>
4101 HTML bullet list, closed tags (bug 5497)
4116 HTML bullet list, unclosed tags (bug 5497)
4131 HTML ordered list, closed tags (bug 5497)
4146 HTML ordered list, unclosed tags (bug 5497)
4161 HTML nested bullet list, closed tags (bug 5497)
4186 HTML nested bullet list, open tags (bug 5497)
4209 HTML nested ordered list, closed tags (bug 5497)
4234 HTML nested ordered list, open tags (bug 5497)
4257 HTML ordered list item with parameters oddity
4259 <ol><li id="fragment">One</li></ol>
4261 <ol><li id="fragment">One</li></ol>
4266 bug 5918: autonumbering
4268 [http://first/] [http://second] [ftp://ftp]
4272 [mailto:enclosed@mail.tld With target]
4274 [mailto:enclosed@mail.tld]
4276 mailto:inline@mail.tld
4278 <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>
4279 </p><p><a href="ftp://inlineftp" class="external free" title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4280 </p><p><a href="mailto:enclosed@mail.tld" class="external text" title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4281 </p><p><a href="mailto:enclosed@mail.tld" class="external autonumber" title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4282 </p><p><a href="mailto:inline@mail.tld" class="external free" title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4288 # Security and HTML correctness
4289 # From Nick Jenkins' fuzz testing
4293 Fuzz testing: Parser13
4308 Fuzz testing: Parser14
4313 <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>
4314 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4316 <li class="toclevel-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4318 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4323 Fuzz testing: Parser14-table
4328 <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>
4329 <table style="__TOC__">
4335 # Known to produce bogus xml (extra </td>)
4337 Fuzz testing: Parser16
4346 <th>https://</th><th></th><th></th><th>
4354 Fuzz testing: Parser21
4357 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4362 <th> <a href="irc://{{ftp://a" class="external free" title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4371 Fuzz testing: Parser22
4373 http://===r:::https://b
4377 <p><a href="http://===r:::https://b" class="external free" title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4385 # Known to produce bad XML for now
4387 Fuzz testing: Parser24
4394 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4395 <br style="onmouseover='alert(document.cookie);' " />
4397 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4402 <u class="|">} >
4403 <br style="onmouseover='alert(document.cookie);'" />
4405 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4414 # Known to produce bad XML for now
4416 Fuzz testing: Parser25 (bug 6055)
4424 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4426 <li class="||">
4427 blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4432 Fuzz testing: URL adjacent extension (with space, clean)
4435 http://example.com <nowiki>junk</nowiki>
4437 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a> junk
4442 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4445 http://example.com<nowiki>junk</nowiki>
4447 <p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a>junk
4452 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4455 http://example.com<pre>junk</pre>
4457 <a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>
4462 Fuzz testing: image with bogus manual thumbnail
4464 [[Image:foobar.jpg|thumbnail= ]]
4466 <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>
4471 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
4473 <pre dir=" "></pre>
4475 <pre dir=" "></pre>
4480 Parsing optional HTML elements (Bug 6171)
4485 <td> Some tabular data</td>
4486 <td> More tabular data ...
4487 <td> And yet som tabular data</td>
4493 <td> Some tabular data</td>
4494 <td> More tabular data ...
4495 </td><td> And yet som tabular data</td>
4502 Correct handling of <td>, <tr> (Bug 6171)
4507 <td> Some tabular data</td>
4508 <td> More tabular data ...</td>
4509 <td> And yet som tabular data</td>
4515 <td> Some tabular data</td>
4516 <td> More tabular data ...</td>
4517 <td> And yet som tabular data</td>
4525 Parsing crashing regression (fr:JavaScript)
4529 <p></body></x>
4534 Inline wiki vs wiki block nesting
4540 <p><b>Bold paragraph</b>
4541 </p><p>New wiki paragraph
4546 Inline HTML vs wiki block nesting
4552 <p><b>Bold paragraph</b>
4553 </p><p>New wiki paragraph
4559 Mixing markup for italics and bold
4562 '''bold''''''bold''bolditalics'''''
4564 <p><b>bold</b><b>bold<i>bolditalics</i></b>
4572 Article for special page transclusion test
4576 Special page transclusion
4579 {{Special:Prefixindex/Xyzzyx}}
4583 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4588 Special page transclusion twice (bug 5021)
4591 {{Special:Prefixindex/Xyzzyx}}
4592 {{Special:Prefixindex/Xyzzyx}}
4596 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4599 <table style="background: inherit;" border="0" width="100%"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
4604 Invalid header with following text
4614 Section extraction test (section 0)
4634 Section extraction test (section 1)
4656 Section extraction test (section 2)
4677 Section extraction test (section 3)
4697 Section extraction test (section 4)
4721 Section extraction test (section 5)
4741 Section extraction test (section 6)
4762 Section extraction test (section 7)
4782 Section extraction test (section 8)
4802 Section extraction test (section 9)
4823 Section extraction test (section 10)
4843 Section extraction test (nonexistent section 11)
4862 Section extraction test with bogus heading (section 1)
4867 ==bogus== not a legal section
4871 ==bogus== not a legal section
4875 Section extraction test with bogus heading (section 2)
4880 ==bogus== not a legal section
4887 Section extraction test with comment after heading (section 1)
4892 ==legal== <!-- a legal section -->
4899 Section extraction test with comment after heading (section 2)
4904 ==legal== <!-- a legal section -->
4907 ==legal== <!-- a legal section -->
4911 Section extraction test with bogus <nowiki> heading (section 1)
4916 ==bogus== <nowiki>not a legal section</nowiki>
4920 ==bogus== <nowiki>not a legal section</nowiki>
4924 Section extraction test with bogus <nowiki> heading (section 2)
4929 ==bogus== <nowiki>not a legal section</nowiki>
4937 Section extraction prefixed by comment (section 1) (bug 2587)
4948 Section extraction prefixed by comment (section 2) (bug 2587)
4960 Section extraction, mixed wiki and html (section 1) (bug 2607)
4976 Section extraction, mixed wiki and html (section 2) (bug 2607)
4993 Section extraction, heading surrounded by <noinclude> (bug 3342)
4997 <noinclude>==a==</noinclude>
5000 <noinclude>==a==</noinclude>
5006 Section extraction, HTML heading subsections (bug 5272)
5019 Section extraction, HTML headings should be ignored in extensions (bug 3476)
5033 Section replacement test (section 0)
5064 Section replacement test (section 1)
5093 Section replacement test (section 2)
5123 Section replacement test (section 3)
5154 Section replacement test (section 4)
5181 Section replacement test (section 5)
5212 Section replacement test (section 6)
5242 Section replacement test (section 7)
5273 Section replacement test (section 8)
5304 Section replacement test (section 9)
5333 Section replacement test (section 10)
5364 Section extraction, HTML headings not at line boundaries (section 0)
5368 <h2>Evil</h2><i>blah blah blah</i>
5376 <i>extra evil</i><h2>Extra nasty</h2>
5383 Section extraction, HTML headings not at line boundaries (section 1)
5387 <h2>Evil</h2><i>blah blah blah</i>
5395 <i>extra evil</i><h2>Extra nasty</h2>
5399 <h2>Evil</h2><i>blah blah blah</i>
5405 Section extraction, HTML headings not at line boundaries (section 2)
5409 <h2>Evil</h2><i>blah blah blah</i>
5417 <i>extra evil</i><h2>Extra nasty</h2>
5429 Section extraction, HTML headings not at line boundaries (section 3)
5433 <h2>Evil</h2><i>blah blah blah</i>
5441 <i>extra evil</i><h2>Extra nasty</h2>
5445 <h2>Extra nasty</h2>
5452 Section extraction, heading followed by pre with 20 spaces (bug 6398)
5464 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
5476 Handling of 
 in URLs
5480 <ul><li><ul><li><a href="irc://%0Aa" class="external free" title="irc://%0Aa" rel="nofollow">irc://%0Aa</a>
5487 5 quotes, code coverage +1 line
5494 Special:Search page linking.
5498 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
5513 * {{SUBJECTPAGENAME}}
5514 * {{SUBJECTPAGENAMEE}}
5521 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
5523 <ul><li> Parser test
5524 </li><li> Parser test
5525 </li><li> Parser test
5526 </li><li> Parser_test
5527 </li><li> Parser test
5528 </li><li> Parser_test
5529 </li><li> Talk:Parser test
5530 </li><li> Talk:Parser_test
5531 </li><li> Parser test
5532 </li><li> Parser_test
5539 </li><li> <a href="/index.php?title=Template:Dynamic&action=edit" class="new" title="Template:Dynamic">Template:Dynamic</a>
5543 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
5553 image4 |300px| centre
5554 image5.svg| http://///////
5559 <table class="gallery" cellspacing="0" cellpadding="0"><tr><td><div class="gallerybox"><div style="height: 152px;">Image1.png</div><div class="gallerytext">
5561 <td><div class="gallerybox"><div style="height: 152px;">Image2.gif</div><div class="gallerytext">
5562 ||||</div></div></td>
5563 <td><div class="gallerybox"><div style="height: 152px;">Image3</div><div class="gallerytext">
5565 <td><div class="gallerybox"><div style="height: 152px;">Image4</div><div class="gallerytext">
5566 300px| centre</div></div></td>
5567 </tr><tr><td><div class="gallerybox"><div style="height: 152px;">Image5.svg</div><div class="gallerytext">
5568 <a href="http://///////" class="external free" title="http://///////" rel="nofollow">http://///////</a></div></div></td>
5569 <td><div class="gallerybox"><div style="height: 152px;">* image6</div><div class="gallerytext">
5577 HTML Hex character encoding.
5579 JavaScript
5586 __FORCETOC__ override
5600 <p><a href="/index.php?title=Special:Booksources&isbn=983" class="internal">ISBN 983</a> 987
5605 ISBN followed by 5 spaces
5616 disabled # Disabled until Bug 6560 resolved
5620 <p>ISBN <a href="/wiki/index.php?title=Special:Booksources&isbn=1234" class="internal">ISBN 1234</a>
5629 <p>RFC <a href="http://www.ietf.org/rfc/rfc1234.txt" class="external" title="http://www.ietf.org/rfc/rfc1234.txt">RFC 1234</a>
5634 Double RFC with a wiki link
5647 <p><a href="http://www.ietf.org/rfc/rfc983.txt" class="external" title="http://www.ietf.org/rfc/rfc983.txt">RFC 983</a> 987
5652 Centre-aligned image
5654 [[Image:foobar.jpg|centre]]
5656 <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>
5663 [[Image:foobar.jpg|none]]
5665 <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>
5670 Width + Height sized image (using px) (height is ignored)
5672 [[Image:foobar.jpg|640x480px]]
5674 <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>
5679 Another italics / bold test
5687 # Note the results may be incorrect, as parserTest output included this:
5688 # XML error: Mismatched tag at byte 6120:
5689 # ...<dd> </dt></dl> </dd...
5695 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
5715 Try for 100% code coverage