1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well formdness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # disabled do not run test
24 # For testing purposes, temporary articles can created:
25 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
26 # where '/' denotes a newline.
28 # This is the standard article assumed to exist.
48 This is a simple paragraph.
50 <p>This is a simple paragraph.
70 * plain''italic''plain
71 * plain''italic''plain''italic''plain
72 * plain'''bold'''plain
73 * plain'''bold'''plain'''bold'''plain
74 * plain''italic''plain'''bold'''plain
75 * plain'''bold'''plain''italic''plain
76 * plain''italic'''bold-italic'''italic''plain
77 * plain'''bold''bold-italic''bold'''plain
78 * plain'''''bold-italic'''italic''plain
79 * plain'''''bold-italic''bold'''plain
80 * plain''italic'''bold-italic'''''plain
81 * plain'''bold''bold-italic'''''plain
82 * plain l'''italic''plain
85 </li><li> plain<i>italic</i>plain
86 </li><li> plain<i>italic</i>plain<i>italic</i>plain
87 </li><li> plain<b>bold</b>plain
88 </li><li> plain<b>bold</b>plain<b>bold</b>plain
89 </li><li> plain<i>italic</i>plain<b>bold</b>plain
90 </li><li> plain<b>bold</b>plain<i>italic</i>plain
91 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
92 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
93 </li><li> plain<i><b>bold-italic</b>italic</i>plain
94 </li><li> plain<b><i>bold-italic</i>bold</b>plain
95 </li><li> plain<i>italic<b>bold-italic</b></i>plain
96 </li><li> plain<b>bold<i>bold-italic</i></b>plain
97 </li><li> plain l'<i>italic</i>plain
103 ### <nowiki> test cases
107 <nowiki> unordered list
109 <nowiki>* This is not an unordered list item.</nowiki>
111 <p>* This is not an unordered list item.
118 <nowiki>Lorem ipsum dolor
139 :There is not nowiki.
140 :There is <nowiki>nowiki</nowiki>.
142 #There is not nowiki.
143 #There is <nowiki>nowiki</nowiki>.
145 *There is not nowiki.
146 *There is <nowiki>nowiki</nowiki>.
148 <dl><dd>There is not nowiki.
149 </dd><dd>There is nowiki.
151 <ol><li>There is not nowiki.
152 </li><li>There is nowiki.
154 <ul><li>There is not nowiki.
155 </li><li>There is nowiki.
166 <!-- comment 1 --> asdf
202 asdf<!-- comment 1 -->jkl
212 <!-- foo --> b <!-- bar -->
226 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
232 Comment semantics and delimiters
234 <!-- --><!----><!-----><!------>
240 Comment semantics and delimiters, redux
242 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
243 -- foo -- funky huh? ... -->
249 Comment semantics and delimiters: directors cut
251 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
252 everything starting with < followed by !-- until the first -- and > we see,
253 that wouldn't be valid XML however, since in XML -- has to terminate a comment
261 Comment semantics: nesting
263 <!--<!-- no, we're not going to do anything fancy here -->-->
270 Comment semantics: unclosed comment at end
272 <!--This comment will run out to the end of the document
279 ### Preformatted text
288 And a [[Main Page|link]]
294 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
299 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
323 <dl><dt> name </dt><dd> Definition
333 <dl><dd> Indented text
339 Definition list with no space
343 <dl><dt>name</dt><dd>Definition
349 Definition list with URL link
351 ; http://example.com/ : definition
353 <dl><dt> <a href="http://example.com/" class='external free' title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
359 Definition list with bracketed URL link
361 ;[http://www.example.com/ Example]:Something about it
363 <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
369 Definition list with wikilink containing colon
371 ; [[Help:FAQ]]: The least-read page on Wikipedia
373 <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
378 # At Brion's and JeLuF's insistence... :)
380 Definition list with wikilink containing colon
382 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
384 <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!
390 Malformed definition list with colon
392 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
394 <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
400 Definition lists: colon in external link text
402 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
404 <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
410 Definition lists: colon in HTML attribute
412 ;<b style="display: inline">bold</b>
414 <dl><dt><b style="display: inline">bold</b>
421 Definition lists: self-closed tag
423 ;one<br/>two : two-line fun
425 <dl><dt>one<br />two </dt><dd> two-line fun
435 External links: non-bracketed
437 Non-bracketed: http://example.com
439 <p>Non-bracketed: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
444 External links: numbered
446 Numbered: [http://example.com]
447 Numbered: [http://example.net]
448 Numbered: [http://example.org]
450 <p>Numbered: <a href="http://example.com" class='external autonumber' title="http://example.com" rel="nofollow">[1]</a>
451 Numbered: <a href="http://example.net" class='external autonumber' title="http://example.net" rel="nofollow">[2]</a>
452 Numbered: <a href="http://example.org" class='external autonumber' title="http://example.org" rel="nofollow">[3]</a>
457 External links: specified text
459 Specified text: [http://example.com link]
461 <p>Specified text: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>
466 External links: trail
468 Linktrails should not work for external links: [http://example.com link]s
470 <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
475 External links: dollar sign in URL
477 http://example.com/1$2345
479 <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>
484 External links: dollar sign in URL (named)
486 [http://example.com/1$2345]
488 <p><a href="http://example.com/1$2345" class='external autonumber' title="http://example.com/1$2345" rel="nofollow">[1]</a>
493 External links: open square bracket forbidden in URL (bug 4377)
495 http://example.com/1[2345
497 <p><a href="http://example.com/1" class='external free' title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
502 External links: open square bracket forbidden in URL (named) (bug 4377)
504 [http://example.com/1[2345]
506 <p><a href="http://example.com/1" class='external text' title="http://example.com/1" rel="nofollow">[2345</a>
513 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
515 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
520 External image from https
522 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
524 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
529 Link to non-http image, no img tag
531 Link to non-http image, no img tag: ftp://example.com/test.jpg
533 <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>
538 External links: terminating separator
540 Terminating separator: http://example.com/thing,
542 <p>Terminating separator: <a href="http://example.com/thing" class='external free' title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
547 External links: intervening separator
549 Intervening separator: http://example.com/1,2,3
551 <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>
556 External links: old bug with URL in query
558 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
560 <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>
565 External links: old URL-in-URL bug, mixed protocols
567 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
569 <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>
574 External links: URL in text
576 URL in text: [http://example.com http://example.com]
578 <p>URL in text: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
583 External links: Clickable images
585 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
587 <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>
592 External links: raw ampersand
594 Old & use: http://x&y
596 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
601 External links: encoded ampersand
603 Old & use: http://x&y
605 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
610 External links: encoded equals (bug 6102)
612 http://example.com/?foo=bar
614 <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>
619 External links: [raw ampersand]
621 Old & use: [http://x&y]
623 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
628 External links: [encoded ampersand]
630 Old & use: [http://x&y]
632 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
637 External links: [encoded equals] (bug 6102)
639 [http://example.com/?foo=bar]
641 <p><a href="http://example.com/?foo=bar" class='external autonumber' title="http://example.com/?foo=bar" rel="nofollow">[1]</a>
646 External links: www.jpeg.org (bug 554)
650 <p><a href="http://www.jpeg.org" class='external free' title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
655 External links: URL within URL (original bug 2)
657 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
659 <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>
664 BUG 361: URL inside bracketed URL
666 [http://www.example.com/foo http://www.example.com/bar]
668 <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>
673 BUG 361: URL within URL, not bracketed
675 http://www.example.com/foo?=http://www.example.com/bar
677 <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>
682 BUG 289: ">"-token in URL-tail
684 http://www.example.com/<hello>
686 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
691 BUG 289: literal ">"-token in URL-tail
693 http://www.example.com/<b>html</b>
695 <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>
700 BUG 289: ">"-token in bracketed URL
702 [http://www.example.com/<hello> stuff]
704 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
709 BUG 289: literal ">"-token in bracketed URL
711 [http://www.example.com/<b>html</b> stuff]
713 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
718 BUG 289: literal double quote at end of URL
720 http://www.example.com/"hello"
722 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
727 BUG 289: literal double quote in bracketed URL
729 [http://www.example.com/"hello" stuff]
731 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
736 External links: invalid character
737 Fixme: the missing char seems to have gone missing
741 [http://www.example.com test]
743 <p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
748 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
750 [http://www.example.com test]
752 <p><a href="http://www.example.com" class='external text' title="http://www.example.com" rel="nofollow">test</a>
757 External links: wiki links within external link (Bug 3695)
759 [http://example.com [[wikilink]] embedded in ext link]
761 <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>
766 BUG 787: Links with one slash after the url protocol are invalid
770 [http:/example.com title]
773 </p><p>[http:/example.com title]
778 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
780 ''[http://example.com text'']
781 [http://example.com '''text]'''
782 ''Something [http://example.com in italic'']
783 ''Something [http://example.com mixed''''', even bold]'''
784 '''''Now [http://example.com both''''']
786 <p><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>text</i></a>
787 <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><b>text</b></a>
788 <i>Something </i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>in italic</i></a>
789 <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>
790 <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>
798 http://www.example.com/?title=AT%26T
800 <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>
805 Bug 4781, 5267: %26 in URL
807 http://www.example.com/?title=100%25_Bran
809 <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>
814 Bug 4781, 5267: %28, %29 in URL
816 http://www.example.com/?title=Ben-Hur_%281959_film%29
818 <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>
824 Bug 4781: %26 in autonumber URL
826 [http://www.example.com/?title=AT%26T]
828 <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>
833 Bug 4781, 5267: %26 in autonumber URL
835 [http://www.example.com/?title=100%25_Bran]
837 <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>
842 Bug 4781, 5267: %28, %29 in autonumber URL
844 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
846 <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>
852 Bug 4781: %26 in bracketed URL
854 [http://www.example.com/?title=AT%26T link]
856 <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>
861 Bug 4781, 5267: %26 in bracketed URL
863 [http://www.example.com/?title=100%25_Bran link]
865 <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>
870 Bug 4781, 5267: %28, %29 in bracketed URL
872 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
874 <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>
879 External link containing double-single-quotes in text '' (bug 4598 sanity check)
881 Some [http://example.com/ pretty ''italics'' and stuff]!
883 <p>Some <a href="http://example.com/" class='external text' title="http://example.com/" rel="nofollow">pretty <i>italics</i> and stuff</a>!
888 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
890 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
892 <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>
905 Normal text. '''Bold text.''' Normal text. ''Italic text.''
907 Normal text. '''''Bold italic text.''''' Normal text.
909 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
910 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
916 Unclosed and unmatched quotes
918 '''''Bold italic text '''with bold deactivated''' in between.'''''
920 '''''Bold italic text ''with italic deactivated'' in between.'''''
924 ..spanning two paragraphs (should not work).'''
926 '''Bold tag left open
928 ''Italic tag left open
932 <!-- Unmatching number of opening, closing tags: -->
933 '''This year''''s election ''should'' beat '''last year''''s.
935 ''Tom'''s car is bigger than ''Susan'''s.
937 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
938 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
939 </p><p><b>Bold text..</b>
940 </p><p>..spanning two paragraphs (should not work).
941 </p><p><b>Bold tag left open</b>
942 </p><p><i>Italic tag left open</i>
944 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
945 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
952 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
955 # This should not produce <table></table> as <table><tr><td></td></tr></table>
956 # is the bare minimun required by the spec, see:
957 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
959 A table with no data.
965 # A table with nothing but a caption is invalid XHTML, we might want to render
966 # this as <p>caption</p>
968 A table with nothing but a caption
976 </caption><tr><td></td></tr></table>
1000 Multiplication table
1002 {| border="1" cellpadding="2"
1003 |+Multiplication table
1005 ! × !! 1 !! 2 !! 3
1023 <table border="1" cellpadding="2">
1024 <caption>Multiplication table
1027 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1031 </th><td> 1 </td><td> 2 </td><td> 3
1035 </th><td> 2 </td><td> 4 </td><td> 6
1039 </th><td> 3 </td><td> 6 </td><td> 9
1043 </th><td> 4 </td><td> 8 </td><td> 12
1047 </th><td> 5 </td><td> 10 </td><td> 15
1055 {| align=right border=1
1057 |rowspan=2| Cell 2, row 1 (and 2)
1064 <table align="right" border="1">
1067 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1068 </td><td> Cell 3, row 1
1072 </td><td> Cell 3, row 2
1083 {| bgcolor=#ABCDEF border=2
1088 |the original table again
1095 <table bgcolor="#ABCDEF" border="2">
1102 </td><td>the original table again
1108 Invalid attributes in table cell (bug 1830)
1122 # FIXME: this one has incorrect tag nesting still.
1124 Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)
1127 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1131 <td><a href="ftp://|x||" class='external autonumber' title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1143 Plain link, capitalized
1147 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1152 Plain link, uncapitalized
1156 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1163 [[Main Page|The Main Page]]
1165 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1174 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1181 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1183 <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>
1190 [[Main Page]]xxx, [[Main Page]]XXX
1192 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1197 Link with 3 brackets
1206 Piped link with 3 brackets
1208 [[[main page|the main page]]]
1210 <p>[[[main page|the main page]]]
1215 Link with multiple pipes
1217 [[Main Page|The|Main|Page]]
1219 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1226 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1228 <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>
1233 Piped link to namespace
1235 [[Meta:Disclaimers|The disclaimers]]
1237 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1244 [[Usually caused by a typo (oops}]]
1246 <p>[[Usually caused by a typo (oops}]]
1251 Link containing % (not as a hex sequence)
1255 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1260 Link containing % as a single hex sequence interpreted to char
1264 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1269 Link containing % as a double hex sequence interpreted to hex sequence
1273 <p>[[7%2525 Solution]]
1278 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1279 Example for such a section: == < ==
1281 [[%23%3c]][[%23%3e]]
1283 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1288 Link containing "<#" and ">#" as a hex sequences
1290 [[%3c%23]][[%3e%23]]
1292 <p>[[%3c%23]][[%3e%23]]
1297 Link containing double-single-quotes '' (bug 4598)
1299 [[Lista d''e paise d''o munno]]
1301 <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>
1306 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1308 Some [[Link|pretty ''italics'' and stuff]]!
1310 <p>Some <a href="/index.php?title=Link&action=edit" class="new" title="Link">pretty <i>italics</i> and stuff</a>!
1315 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1317 ''Some [[Link|pretty ''italics'' and stuff]]!
1319 <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>
1326 [[http://www.example.org]]
1328 <p>[<a href="http://www.example.org" class='external autonumber' title="http://www.example.org" rel="nofollow">[1]</a>]
1332 # I'm fairly sure the expected result here is wrong.
1333 # We want these to be URL links, not pseudo-pages with URLs for titles....
1334 # However the current output is also pretty screwy.
1337 # I'm changing it to match the current output--it arguably makes more
1338 # sense in the light of the test above. Old expected result was:
1339 #<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>
1341 # But I think this test is bordering on "garbage in, garbage out" anyway.
1346 Piped link to URL: [[http://www.example.org|an example URL]]
1348 <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>]
1353 BUG 2: [[page|http://url/]] should link to page, not http://url/
1355 [[Main Page|http://url/]]
1357 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1362 BUG 337: Escaped self-links should be bold
1366 [[Bug462]] [[Bug462]]
1368 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1373 Self-link to section should not be bold
1377 [[Main Page#section]]
1379 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1384 <nowiki> inside a link
1386 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1388 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1393 ### Interwiki links (see maintenance/interwiki.sql)
1397 Inline interwiki link
1399 [[MeatBall:SoftSecurity]]
1401 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1406 Inline interwiki link with empty title (bug 2372)
1410 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class='extiw' title="meatball:">MeatBall:</a>
1415 Interwiki link encoding conversion (bug 1636)
1417 *[[Wikipedia:ro:Olteniţa]]
1418 *[[Wikipedia:ro:Olteniţa]]
1420 <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>
1421 </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>
1427 Interwiki link with fragment (bug 2130)
1429 [[MeatBall:SoftSecurity#foo]]
1431 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1449 Incorrecly removing closing slashes from correctly formed XHTML
1451 <br style="clear:both;" />
1453 <p><br style="clear:both;" />
1458 Failing to transform badly formed HTML into correct XHTML
1464 <p><br clear="left" />
1465 <br clear="right" />
1471 Horizontal ruler (should it add that extra space?)
1485 ### Block-level elements
1508 <ol><li>Numbered list
1525 ***#Number on level 4
1527 **#Number on level 3
1528 **#Number on level 3
1533 <ol><li> with numbers
1535 <ul><li> and bullets
1537 <ol><li> and numbers
1539 </li><li>bullets again
1540 <ul><li>bullet level 2
1541 <ul><li>bullet level 3
1542 <ol><li>Number on level 4
1545 </li><li>bullet level 2
1546 <ol><li>Number on level 3
1547 </li><li>Number on level 3
1550 <ol><li>number level 2
1558 List items are not parsed correctly following a <pre> block (bug 785)
1564 <ul><li> <pre>foo</pre>
1565 </li><li> <pre>bar</pre>
1576 Magic Word: {{CURRENTDAY}}
1585 Magic Word: {{CURRENTDAY2}}
1594 Magic Word: {{CURRENTDAYNAME}}
1603 Magic Word: {{CURRENTDOW}}
1612 Magic Word: {{CURRENTMONTH}}
1621 Magic Word: {{CURRENTMONTHABBREV}}
1623 {{CURRENTMONTHABBREV}}
1630 Magic Word: {{CURRENTMONTHNAME}}
1632 {{CURRENTMONTHNAME}}
1639 Magic Word: {{CURRENTMONTHNAMEGEN}}
1641 {{CURRENTMONTHNAMEGEN}}
1648 Magic Word: {{CURRENTTIME}}
1657 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1666 Magic Word: {{CURRENTYEAR}}
1675 Magic Word: {{FULLPAGENAME}}
1677 title=[[User:Ævar Arnfjörð Bjarmason]]
1681 <p>User:Ævar Arnfjörð Bjarmason
1686 Magic Word: {{FULLPAGENAMEE}}
1688 title=[[User:Ævar Arnfjörð Bjarmason]]
1692 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1697 Magic Word: {{NAMESPACE}}
1699 title=[[User:Ævar Arnfjörð Bjarmason]]
1709 Magic Word: {{NAMESPACEE}}
1711 title=[[User:Ævar Arnfjörð Bjarmason]]
1721 Magic Word: {{NUMBEROFARTICLES}}
1723 {{NUMBEROFARTICLES}}
1730 Magic Word: {{NUMBEROFFILES}}
1739 Magic Word: {{PAGENAME}}
1741 title=[[User:Ævar Arnfjörð Bjarmason]]
1746 <p>Ævar Arnfjörð Bjarmason
1751 Magic Word: {{PAGENAMEE}}
1753 title=[[User:Ævar Arnfjörð Bjarmason]]
1757 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1762 Magic Word: {{REVISIONID}}
1771 Magic Word: {{SCRIPTPATH}}
1780 Magic Word: {{SERVER}}
1784 <p><a href="http://localhost" class='external free' title="http://localhost" rel="nofollow">http://localhost</a>
1789 Magic Word: {{SERVERNAME}}
1798 Magic Word: {{SITENAME}}
1807 Namespace 1 {{ns:1}}
1816 Namespace 1 {{ns:01}}
1825 Namespace 0 {{ns:0}} (bug 4783)
1833 Namespace 0 {{ns:00}} (bug 4783)
1841 Namespace -1 {{ns:-1}}
1850 Namespace Project {{ns:User}}
1863 Magic links: internal link to RFC (bug 479)
1867 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1872 Magic links: RFC (bug 479)
1876 <p><a href='http://www.ietf.org/rfc/rfc822.txt' class='external' title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
1881 Magic links: ISBN (bug 1937)
1885 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1890 Magic links: PMID incorrectly converts space to underscore
1894 <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>
1903 Nonexistant template
1905 {{thistemplatedoesnotexist}}
1907 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1914 This is a test template
1922 <p>This is a test template
1927 Template with explicit namespace
1931 <p>This is a test template
1939 This is a test template with parameter {{{param}}}
1945 {{paramtest|param=foo}}
1947 <p>This is a test template with parameter foo
1952 Template:paramtestnum
1958 Template unnamed parameter
1960 {{paramtestnum|Main Page|the main page}}
1962 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
1967 Template:templatesimple
1973 Template:templateredirect
1975 #redirect [[Template:templatesimple]]
1979 Template:templateasargtestnum
1985 Template:templateasargtest
1987 {{template{{{templ}}}}}
1991 Template:templateasargtest2
1997 Template with template name as unnamed argument
1999 {{templateasargtestnum|templatesimple}}
2006 Template with template name as argument
2008 {{templateasargtest|templ=simple}}
2015 Template with template name as argument (2)
2017 {{templateasargtest2|templ=templatesimple}}
2024 Template:templateasargtestdefault
2026 {{{{{templ|templatesimple}}}}}
2036 Template with default value
2038 {{templateasargtestdefault}}
2045 Template with default value (value set)
2047 {{templateasargtestdefault|templ=templa}}
2056 {{templateredirect}}
2063 Template with argument in separate line
2065 {{ templateasargtest |
2073 Template with complex template as argument
2076 param ={{ templateasargtest |
2079 <p>This is a test template with parameter (test)
2084 Template with thumb image (wiht link in description)
2087 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2089 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>
2094 Template:complextemplate
2096 {{{1}}} {{paramtest|
2097 param ={{{param}}}}}
2101 Template with complex arguments
2104 param ={{ templateasargtest |
2105 templ = simple }}|[[Template:complextemplate|link]]}}
2107 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2112 BUG 553: link with two variables in a piped link
2115 |[[{{{1}}}|{{{2}}}]]
2120 <td>[[{{{1}}}|{{{2}}}]]
2126 Magic variable as template parameter
2128 {{paramtest|param={{SITENAME}}}}
2130 <p>This is a test template with parameter MediaWiki
2137 [[{{{param}}}|link]]
2141 Template parameter as link source
2143 {{linktest|param=Main Page}}
2145 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2153 including another template, {{paramtest|param={{{arg}}}}}
2157 Template passing argument to another template
2159 {{paramtest2|arg='hmm'}}
2161 <p>including another template, This is a test template with parameter 'hmm'
2172 Template as link source
2176 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2194 Template infinite loop
2198 <p>{{loop1}}<!-- WARNING: template loop detected -->
2203 Template from main namespace
2222 BUG 529: Template with table, not included at beginning of line
2239 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2257 BUG 41: Template parameters shown as broken links
2269 ''None'' of '''this''' should be
2271 but rather passed unmodified
2275 # hmm, fix this or just deprecate msgnw and document its behavior?
2281 {{msgnw:MSGNW test}}
2283 <p>''None'' of '''this''' should be
2285 but rather passed unmodified
2293 {{int:youhavenewmessages|lots of money|not!}}
2295 <p>You have lots of money (not!).
2302 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2306 <includeonly> and <noinclude> being included
2317 <onlyinclude>Foo</onlyinclude>bar
2321 <onlyinclude> being included
2333 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2337 <onlyinclude> and <includeonly> being included
2346 <includeonly> and <noinclude> on a page
2348 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2355 <onlyinclude> on a page
2357 <onlyinclude>Foo</onlyinclude>bar
2364 ### Pre-save transform tests
2367 pre-save transform: subst:
2373 This is a test template
2377 pre-save transform: normal template
2387 pre-save transform: nonexistant template
2391 {{thistemplatedoesnotexist}}
2393 {{thistemplatedoesnotexist}}
2398 pre-save transform: subst magic variables
2407 # This is bug 89, which I fixed. -- wtm
2409 pre-save transform: subst: templates with parameters
2413 {{subst:paramtest|param="something else"}}
2415 This is a test template with parameter "something else"
2421 <nowiki>'''not wiki'''</nowiki>
2425 pre-save transform: nowiki in subst (bug 1188)
2429 {{subst:nowikitest}}
2431 <nowiki>'''not wiki'''</nowiki>
2436 Template:commenttest
2438 This template has <!-- a comment --> in it.
2442 pre-save transform: comment in subst (bug 1936)
2446 {{subst:commenttest}}
2448 This template has <!-- a comment --> in it.
2452 pre-save transform: unclosed tag
2456 <nowiki>'''not wiki'''
2458 <nowiki>'''not wiki'''
2462 pre-save transform: mixed tag case
2466 <NOwiki>'''not wiki'''</noWIKI>
2468 <NOwiki>'''not wiki'''</noWIKI>
2472 pre-save transform: unclosed comment in <nowiki>
2476 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2478 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2484 <span onmouseover="alert('crap')">Oh no</span>
2488 (confirming safety of fix for subst bug 1936)
2490 {{Template:dangerous}}
2492 <p><span>Oh no</span>
2497 pre-save transform: comment containing gallery (bug 5024)
2501 <!-- <gallery>data</gallery> -->
2503 <!-- <gallery>data</gallery> -->
2507 pre-save transform: comment containing extension
2511 <!-- <tag>data</tag> -->
2513 <!-- <tag>data</tag> -->
2517 pre-save transform: comment containing nowiki
2521 <!-- <nowiki>data</nowiki> -->
2523 <!-- <nowiki>data</nowiki> -->
2527 pre-save transform: comment containing math
2531 <!-- <math>data</math> -->
2533 <!-- <math>data</math> -->
2538 ### Message transform tests
2541 message transform: magic variables
2551 message transform: should not transform wiki markup
2566 [[Image:foobar.jpg]]
2568 <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>
2575 [[Image:foobar.jpg|right]]
2577 <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>
2584 [[Image:foobar.jpg|right|Caption text]]
2586 <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>
2591 Image with frame and link
2593 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2595 <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>
2600 Link to image page- image page normally doesn't exists, hence edit link
2601 TODO: Add test with existing image page
2602 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2606 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2611 Frameless image caption with a free URL
2613 [[Image:foobar.jpg|http://example.com]]
2615 <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>
2620 Thumbnail image caption with a free URL
2622 [[Image:foobar.jpg|thumb|http://example.com]]
2624 <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>
2629 BUG 1887: A ISBN with a thumbnail
2631 [[Image:foobar.jpg|thumb|ISBN 12354]]
2633 <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>
2638 BUG 1887: A RFC with a thumbnail
2640 [[Image:foobar.jpg|thumb|This is RFC 12354]]
2642 <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>
2647 BUG 1887: A mailto link with a thumbnail
2649 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
2651 <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>
2656 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
2657 so math is not stripped and turns up as escaped <math> tags.
2659 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2661 <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>
2666 BUG 1887, part 2: A <math> with a thumbnail- math enabled
2670 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2672 <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>
2676 # Pending resolution to bug 368
2678 BUG 648: Frameless image caption with a link
2680 [[Image:foobar.jpg|text with a [[link]] in it]]
2682 <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>
2687 BUG 648: Frameless image caption with a link (suffix)
2689 [[Image:foobar.jpg|text with a [[link]]foo in it]]
2691 <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>
2696 BUG 648: Frameless image caption with an interwiki link
2698 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
2700 <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>
2705 BUG 648: Frameless image caption with a piped interwiki link
2707 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
2709 <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>
2714 Escape HTML special chars in image alt text
2716 [[Image:foobar.jpg|& < > "]]
2718 <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>
2723 BUG 499: Alt text should have Ӓ, not &1234;
2725 [[Image:foobar.jpg|♀]]
2727 <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>
2732 Broken image caption with link
2734 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
2736 <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.
2741 Image caption containing another image
2743 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
2745 <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>
2750 Image caption containing a newline
2752 [[Image:Foobar.jpg|This
2755 <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>
2761 Bug 3090: External links other than http: in image captions
2763 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
2765 <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>
2774 Subpage test/subpage
2782 subpage title=[[Subpage test]]
2786 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
2791 Subpage noslash link
2793 subpage title=[[Subpage test]]
2797 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
2806 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
2811 BUG 561: {{/Subpage}}
2813 subpage title=[[Page]]
2817 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
2825 Category:MediaWiki User's Guide
2833 [[:Category:MediaWiki User's Guide]]
2835 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
2844 [[Category:MediaWiki User's Guide]]
2846 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
2850 ### Inter-language links
2853 Inter-language links
2859 [[zh:食品]]
2861 es:Alimento fr:Nourriture zh:食品
2868 Basic section headings
2870 title=[[Parser test script]]
2877 ===Smaller headline===
2880 <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>
2883 <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>
2886 <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>
2892 Section headings with TOC
2894 title=[[Parser test script]]
2897 === Subheadline 1 ===
2898 ===== Skipping a level =====
2899 ====== Skipping a level ======
2903 ===Another headline===
2905 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2907 <li class='toclevel-1'><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
2909 <li class='toclevel-2'><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
2911 <li class='toclevel-3'><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
2913 <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>
2920 <li class='toclevel-1'><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
2922 <li class='toclevel-2'><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
2926 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2927 <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>
2928 <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>
2929 <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>
2930 <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>
2931 <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>
2934 <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>
2938 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
2940 Handling of sections up to level 6 and beyond
2943 == Level 2 Heading==
2944 === Level 3 Heading===
2945 ==== Level 4 Heading====
2946 ===== Level 5 Heading=====
2947 ====== Level 6 Heading======
2948 ======= Level 7 Heading=======
2949 ======== Level 8 Heading========
2950 ========= Level 9 Heading=========
2951 ========== Level 10 Heading==========
2953 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2955 <li class='toclevel-1'><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
2957 <li class='toclevel-2'><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
2959 <li class='toclevel-3'><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
2961 <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>
2963 <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>
2965 <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>
2966 <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>
2967 <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>
2968 <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>
2969 <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>
2981 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2982 <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>
2983 <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>
2984 <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>
2985 <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>
2986 <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>
2987 <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>
2988 <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>
2989 <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>
2990 <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>
2991 <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>
2996 Resolving duplicate section names
2998 title=[[Parser test script]]
3003 <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>
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: Foo bar">edit</a>]</div><a name="Foo_bar_2"></a><h2> Foo bar </h2>
3016 Template with sections, __NOTOC__
3018 title=[[Parser test script]]
3025 <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>
3026 <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>
3027 <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>
3028 <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>
3033 __NOEDITSECTION__ keyword
3039 <a name="Section_1"></a><h2>Section 1</h2>
3040 <a name="Section_2"></a><h2>Section 2</h2>
3045 Link inside a section heading
3047 title=[[Parser test script]]
3049 ==Section with a [[Main Page|link]] in it==
3051 <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>
3057 BUG 1219 URL next to image (good)
3059 http://example.com [[Image:foobar.jpg]]
3061 <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>
3066 BUG 1219 URL next to image (broken)
3068 http://example.com[[Image:foobar.jpg]]
3070 <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>
3075 Bug 1186 news: in the middle of text
3077 http://en.wikinews.org/wiki/Wikinews:Workplace
3079 <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>
3085 Namespaced link must have a title
3094 Namespaced link must have a title (bad fragment version)
3096 [[Project:#fragment]]
3098 <p>[[Project:#fragment]]
3104 div with no attributes
3106 <div>HTML rocks</div>
3108 <div>HTML rocks</div>
3113 div with double-quoted attribute
3115 <div id="rock">HTML rocks</div>
3117 <div id="rock">HTML rocks</div>
3122 div with single-quoted attribute
3124 <div id='rock'>HTML rocks</div>
3126 <div id="rock">HTML rocks</div>
3131 div with unquoted attribute
3133 <div id=rock>HTML rocks</div>
3135 <div id="rock">HTML rocks</div>
3140 div with illegal double attributes
3142 <div align="center" align="right">HTML rocks</div>
3144 <div align="right">HTML rocks</div>
3149 HTML multiple attributes correction
3151 <p class="error" class="awesome">Awesome!</p>
3153 <p class="awesome">Awesome!</p>
3158 Table multiple attributes correction
3161 !+ class="error" class="awesome"| status
3166 <th class="awesome"> status
3174 <DIV ALIGN="center">HTML ROCKS</DIV>
3176 <div align="center">HTML ROCKS</div>
3182 text with amp in the middle of nowhere
3186 <p>Remember AT&T?
3191 text with character entity: eacute
3193 I always thought é was a cute letter.
3195 <p>I always thought é was a cute letter.
3200 text with undefined character entity: xacute
3202 I always thought &xacute; was a cute letter.
3204 <p>I always thought &xacute; was a cute letter.
3216 [[Media:Foobar.jpg]]
3218 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Media:Foobar.jpg</a>
3223 Media link with text
3225 [[Media:Foobar.jpg|A neat file to look at]]
3227 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">A neat file to look at</a>
3231 # FIXME: this is still bad HTML tag nesting
3233 Media link with nasty text
3234 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3236 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3238 <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>
3243 Media link to nonexistent file (bug 1702)
3245 [[Media:No such.jpg]]
3247 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class='new' title="No such.jpg">Media:No such.jpg</a>
3252 Image link to nonexistent file (bug 1850 - good)
3254 [[Image:No such.jpg]]
3256 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3261 :Image link to nonexistent file (bug 1850 - bad)
3263 [[:Image:No such.jpg]]
3265 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3272 Character reference normalization in link text (bug 1938)
3274 [[Main Page|this&that]]
3276 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3281 Empty attribute crash test (bug 2067)
3283 <font color="">foo</font>
3285 <p><font color="">foo</font>
3290 Empty attribute crash test single-quotes (bug 2067)
3292 <font color=''>foo</font>
3294 <p><font color="">foo</font>
3299 Attribute test: equals, then nothing
3301 <font color=>foo</font>
3308 Attribute test: unquoted value
3310 <font color=x>foo</font>
3312 <p><font color="x">foo</font>
3317 Attribute test: unquoted but illegal value (hash)
3319 <font color=#x>foo</font>
3321 <p><font color="#x">foo</font>
3326 Attribute test: no value
3328 <font color>foo</font>
3330 <p><font color="color">foo</font>
3335 Bug 2095: link with three closing brackets
3339 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3344 Bug 2095: link with pipe and three closing brackets
3348 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3353 Bug 2095: link with pipe and three closing brackets, version 2
3355 [[Main Page|[http://example.com/]]]
3357 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3367 Template:Dangerous attribute
3369 " onmouseover="alert(document.cookie)
3373 Template:Dangerous style attribute
3375 border-size: expression(alert(document.cookie))
3381 <div style="float: right; {{{1}}}">Magic div</div>
3385 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3387 <div title="{{test}}"></div>
3389 <div title="This is a test template"></div>
3394 Bug 2304: HTML attribute safety (dangerous template; 2309)
3396 <div title="{{dangerous attribute}}"></div>
3398 <div title=""></div>
3403 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3405 <div style="{{dangerous style attribute}}"></div>
3412 Bug 2304: HTML attribute safety (safe parameter; 2309)
3414 {{div style|width: 200px}}
3416 <div style="float: right; width: 200px">Magic div</div>
3421 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3423 {{div style|width: expression(alert(document.cookie))}}
3425 <div>Magic div</div>
3430 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3432 {{div style|"><script>alert(document.cookie)</script>}}
3434 <div>Magic div</div>
3439 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3441 {{div style|" ><script>alert(document.cookie)</script>}}
3443 <div style="float: right; ">Magic div</div>
3448 Bug 2304: HTML attribute safety (link)
3450 <div title="[[Main Page]]"></div>
3452 <div title="[[Main Page]]"></div>
3457 Bug 2304: HTML attribute safety (italics)
3459 <div title="''foobar''"></div>
3461 <div title="''foobar''"></div>
3466 Bug 2304: HTML attribute safety (bold)
3468 <div title="'''foobar'''"></div>
3470 <div title="'''foobar'''"></div>
3476 Bug 2304: HTML attribute safety (ISBN)
3478 <div title="ISBN 1234567890"></div>
3480 <div title="ISBN 1234567890"></div>
3485 Bug 2304: HTML attribute safety (RFC)
3487 <div title="RFC 1234"></div>
3489 <div title="RFC 1234"></div>
3494 Bug 2304: HTML attribute safety (PMID)
3496 <div title="PMID 1234567890"></div>
3498 <div title="PMID 1234567890"></div>
3503 Bug 2304: HTML attribute safety (web link)
3505 <div title="http://example.com/"></div>
3507 <div title="http://example.com/"></div>
3512 Bug 2304: HTML attribute safety (named web link)
3514 <div title="[http://example.com/ link]"></div>
3516 <div title="[http://example.com/ link]"></div>
3521 Bug 3244: HTML attribute safety (extension; safe)
3523 <div style="<nowiki>background:blue</nowiki>"></div>
3525 <div style="background:blue"></div>
3530 Bug 3244: HTML attribute safety (extension; unsafe)
3532 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3539 Math section safety when disabled
3541 <math><script>alert(document.cookies);</script></math>
3543 <p><math><script>alert(document.cookies);</script></math>
3547 # More MSIE fun discovered by Tom Gilder
3550 MSIE CSS safety test: spurious slash
3552 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3559 MSIE CSS safety test: hex code
3561 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3568 MSIE CSS safety test: comment in url
3570 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3572 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3577 MSIE CSS safety test: comment in expression
3579 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3581 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3587 Table attribute legitimate extension
3590 !+ style="<nowiki>color:blue</nowiki>"| status
3595 <th style="color:blue"> status
3601 Table attribute safety
3604 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3615 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3618 Parser hook: empty input
3631 Parser hook: empty input using terminated empty elements
3644 Parser hook: empty input using terminated empty elements (space before)
3657 Parser hook: basic input
3671 Parser hook: case insensetive
3685 Parser hook: case insensetive, redux
3698 Parser hook: nested tags
3702 <tag><tag></tag></tag>
3713 Parser hook: basic arguments
3715 <tag width=200 height = "100" depth = '50' square></tag>
3734 Parser hook: argument containing a forward slash (bug 5344)
3736 <tag filename='/tmp/bla'></tag>
3742 string(8) "/tmp/bla"
3749 Parser hook: empty input using terminated empty elements (bug 2374)
3763 # </tag> should be output literally since there is no matching tag that begins it
3765 Parser hook: basic arguments using terminated empty elements (bug 2374)
3767 <tag width=200 height = "100" depth = '50' square/>
3790 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
3794 Parser hook: static parser hook not inside a comment
3796 <statictag>hello, world</statictag>
3797 <statictag action=flush/>
3805 Parser hook: static parser hook inside a comment
3807 <!-- <statictag>hello, world</statictag> -->
3808 <statictag action=flush/>
3814 # Nested template calls; this case was broken by Parser.php rev 1.506,
3818 Template:One-parameter
3820 (My parameter is: {{{1}}})
3824 Template:Map-one-parameter
3830 Nested template calls
3832 {{Map-one-parameter|One-parameter|param}}
3834 <p>(My parameter is: param)
3843 Sanitizer: Closing of open tags
3845 <s></s><table></table>
3847 <s></s><table></table>
3852 Sanitizer: Closing of open but not closed tags
3861 Sanitizer: Closing of closed but not open tags
3870 Sanitizer: Closing of closed but not open table tags
3872 Table not started</td></tr></table>
3874 <p>Table not started</td></tr></table>
3879 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
3881 <span id="æ: v">byte</span>[[#æ: v|backlink]]
3883 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
3888 Sanitizer: Validating the contents of the id attribute (bug 4515)
3894 Something, but defenetly not <br id="9" />...
3898 Language converter: output gets cut off unexpectedly (bug 5757)
3902 this bit is safe: }-
3904 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
3906 then we get cut off here: }-
3908 all additional text is vanished
3910 <p>this bit is safe: }-
3911 </p><p>but if we add a conversion instance: xxx
3912 </p><p>then we get cut off here: }-
3913 </p><p>all additional text is vanished
3918 Self closed html pairs (bug 5487)
3921 <center><font id="bug" />Centered text</center>
3922 <div><font id="bug2" />In div text</div>
3924 <div class="center"><font id="bug" />Centered text</div>
3925 <div><font id="bug2" />In div text</div>
3934 HTML bullet list, closed tags (bug 5497)
3949 HTML bullet list, unclosed tags (bug 5497)
3964 HTML ordered list, closed tags (bug 5497)
3979 HTML ordered list, unclosed tags (bug 5497)
3994 HTML nested bullet list, closed tags (bug 5497)
4019 HTML nested bullet list, open tags (bug 5497)
4042 HTML nested ordered list, closed tags (bug 5497)
4067 HTML nested ordered list, open tags (bug 5497)
4090 HTML ordered list item with parameters oddity
4092 <ol><li id="fragment">One</li></ol>
4094 <ol><li id="fragment">One</li></ol>
4099 bug 5918: autonumbering
4101 [http://first/] [http://second] [ftp://ftp]
4105 [mailto:enclosed@mail.tld With target]
4107 [mailto:enclosed@mail.tld]
4109 mailto:inline@mail.tld
4111 <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>
4112 </p><p><a href="ftp://inlineftp" class='external free' title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4113 </p><p><a href="mailto:enclosed@mail.tld" class='external text' title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4114 </p><p><a href="mailto:enclosed@mail.tld" class='external autonumber' title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4115 </p><p><a href="mailto:inline@mail.tld" class='external free' title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4121 # Security and HTML correctness
4122 # From Nick Jenkins' fuzz testing
4126 Fuzz testing: Parser13
4141 Fuzz testing: Parser14
4146 <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>
4147 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4149 <li class='toclevel-1'><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4151 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4156 Fuzz testing: Parser14-table
4161 <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>
4162 <table style="__TOC__">
4168 # Known to produce bogus xml (extra </td>)
4170 Fuzz testing: Parser16
4179 <th>https://</th><th></th><th></th><th>
4187 Fuzz testing: Parser21
4190 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4195 <th> <a href="irc://{{ftp://a" class='external free' title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4204 Fuzz testing: Parser22
4206 http://===r:::https://b
4210 <p><a href="http://===r:::https://b" class='external free' title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4218 # Known to produce bad XML for now
4220 Fuzz testing: Parser24
4227 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4228 <br style="onmouseover='alert(document.cookie);' " />
4230 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4235 <u class="|">} >
4236 <br style="onmouseover='alert(document.cookie);' " />
4238 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4247 # Known to produce bad XML for now
4249 Fuzz testing: Parser25 (bug 6055)
4257 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4259 <li class="||">
4260 blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4265 Fuzz testing: URL adjacent extension (with space, clean)
4268 http://example.com <nowiki>junk</nowiki>
4270 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a> junk
4275 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4278 http://example.com<nowiki>junk</nowiki>
4280 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>junk
4285 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4288 http://example.com<pre>junk</pre>
4290 <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>
4295 Fuzz testing: image with bogus manual thumbnail
4297 [[Image:foobar.jpg|thumbnail= ]]
4299 <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>
4304 Parsing optional HTML elements (Bug 6171)
4309 <td> Some tabular data</td>
4310 <td> More tabular data ...
4311 <td> And yet som tabular data</td>
4317 <td> Some tabular data</td>
4318 <td> More tabular data ...
4319 </td><td> And yet som tabular data</td>
4326 Correct handling of <td>, <tr> (Bug 6171)
4331 <td> Some tabular data</td>
4332 <td> More tabular data ...</td>
4333 <td> And yet som tabular data</td>
4339 <td> Some tabular data</td>
4340 <td> More tabular data ...</td>
4341 <td> And yet som tabular data</td>