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 -->-->
271 ### Preformatted text
280 And a [[Main Page|link]]
286 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
291 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
315 <dl><dt> name </dt><dd> Definition
325 <dl><dd> Indented text
331 Definition list with no space
335 <dl><dt>name</dt><dd>Definition
341 Definition list with URL link
343 ; http://example.com/ : definition
345 <dl><dt> <a href="http://example.com/" class='external free' title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
351 Definition list with bracketed URL link
353 ;[http://www.example.com/ Example]:Something about it
355 <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
361 Definition list with wikilink containing colon
363 ; [[Help:FAQ]]: The least-read page on Wikipedia
365 <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
370 # At Brion's and JeLuF's insistence... :)
372 Definition list with wikilink containing colon
374 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
376 <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!
382 Malformed definition list with colon
384 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
386 <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
392 Definition lists: colon in external link text
394 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
396 <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
406 External links: non-bracketed
408 Non-bracketed: http://example.com
410 <p>Non-bracketed: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
415 External links: numbered
417 Numbered: [http://example.com]
418 Numbered: [http://example.net]
419 Numbered: [http://example.org]
421 <p>Numbered: <a href="http://example.com" class='external autonumber' title="http://example.com" rel="nofollow">[1]</a>
422 Numbered: <a href="http://example.net" class='external autonumber' title="http://example.net" rel="nofollow">[2]</a>
423 Numbered: <a href="http://example.org" class='external autonumber' title="http://example.org" rel="nofollow">[3]</a>
428 External links: specified text
430 Specified text: [http://example.com link]
432 <p>Specified text: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>
437 External links: trail
439 Linktrails should not work for external links: [http://example.com link]s
441 <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
446 External links: dollar sign in URL
448 http://example.com/1$2345
450 <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>
455 External links: dollar sign in URL (named)
457 [http://example.com/1$2345]
459 <p><a href="http://example.com/1$2345" class='external autonumber' title="http://example.com/1$2345" rel="nofollow">[1]</a>
464 External links: open square bracket forbidden in URL (bug 4377)
466 http://example.com/1[2345
468 <p><a href="http://example.com/1" class='external free' title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
473 External links: open square bracket forbidden in URL (named) (bug 4377)
475 [http://example.com/1[2345]
477 <p><a href="http://example.com/1" class='external text' title="http://example.com/1" rel="nofollow">[2345</a>
484 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
486 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
491 External image from https
493 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
495 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
500 Link to non-http image, no img tag
502 Link to non-http image, no img tag: ftp://example.com/test.jpg
504 <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>
509 External links: terminating separator
511 Terminating separator: http://example.com/thing,
513 <p>Terminating separator: <a href="http://example.com/thing" class='external free' title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
518 External links: intervening separator
520 Intervening separator: http://example.com/1,2,3
522 <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>
527 External links: old bug with URL in query
529 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
531 <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>
536 External links: old URL-in-URL bug, mixed protocols
538 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
540 <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>
545 External links: URL in text
547 URL in text: [http://example.com http://example.com]
549 <p>URL in text: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
554 External links: Clickable images
556 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
558 <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>
563 External links: raw ampersand
565 Old & use: http://x&y
567 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
572 External links: encoded ampersand
574 Old & use: http://x&y
576 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
581 External links: encoded equals (bug 6102)
583 http://example.com/?foo=bar
585 <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>
590 External links: [raw ampersand]
592 Old & use: [http://x&y]
594 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
599 External links: [encoded ampersand]
601 Old & use: [http://x&y]
603 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
608 External links: [encoded equals] (bug 6102)
610 [http://example.com/?foo=bar]
612 <p><a href="http://example.com/?foo=bar" class='external autonumber' title="http://example.com/?foo=bar" rel="nofollow">[1]</a>
617 External links: www.jpeg.org (bug 554)
621 <p><a href="http://www.jpeg.org" class='external free' title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
626 External links: URL within URL (original bug 2)
628 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
630 <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>
635 BUG 361: URL inside bracketed URL
637 [http://www.example.com/foo http://www.example.com/bar]
639 <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>
644 BUG 361: URL within URL, not bracketed
646 http://www.example.com/foo?=http://www.example.com/bar
648 <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>
653 BUG 289: ">"-token in URL-tail
655 http://www.example.com/<hello>
657 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
662 BUG 289: literal ">"-token in URL-tail
664 http://www.example.com/<b>html</b>
666 <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>
671 BUG 289: ">"-token in bracketed URL
673 [http://www.example.com/<hello> stuff]
675 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
680 BUG 289: literal ">"-token in bracketed URL
682 [http://www.example.com/<b>html</b> stuff]
684 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
689 BUG 289: literal double quote at end of URL
691 http://www.example.com/"hello"
693 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
698 BUG 289: literal double quote in bracketed URL
700 [http://www.example.com/"hello" stuff]
702 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
707 External links: invalid character
708 Fixme: the missing char seems to have gone missing
712 [http://www.example.com test]
714 <p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
719 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
721 [http://www.example.com test]
723 <p><a href="http://www.example.com" class='external text' title="http://www.example.com" rel="nofollow">test</a>
728 External links: wiki links within external link (Bug 3695)
730 [http://example.com [[wikilink]] embedded in ext link]
732 <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>
737 BUG 787: Links with one slash after the url protocol are invalid
741 [http:/example.com title]
744 </p><p>[http:/example.com title]
749 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
751 ''[http://example.com text'']
752 [http://example.com '''text]'''
753 ''Something [http://example.com in italic'']
754 ''Something [http://example.com mixed''''', even bold]'''
755 '''''Now [http://example.com both''''']
757 <p><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>text</i></a>
758 <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><b>text</b></a>
759 <i>Something </i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>in italic</i></a>
760 <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>
761 <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>
769 http://www.example.com/?title=AT%26T
771 <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>
776 Bug 4781, 5267: %26 in URL
778 http://www.example.com/?title=100%25_Bran
780 <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>
785 Bug 4781, 5267: %28, %29 in URL
787 http://www.example.com/?title=Ben-Hur_%281959_film%29
789 <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>
795 Bug 4781: %26 in autonumber URL
797 [http://www.example.com/?title=AT%26T]
799 <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>
804 Bug 4781, 5267: %26 in autonumber URL
806 [http://www.example.com/?title=100%25_Bran]
808 <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>
813 Bug 4781, 5267: %28, %29 in autonumber URL
815 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
817 <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>
823 Bug 4781: %26 in bracketed URL
825 [http://www.example.com/?title=AT%26T link]
827 <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>
832 Bug 4781, 5267: %26 in bracketed URL
834 [http://www.example.com/?title=100%25_Bran link]
836 <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>
841 Bug 4781, 5267: %28, %29 in bracketed URL
843 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
845 <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>
850 External link containing double-single-quotes in text '' (bug 4598 sanity check)
852 Some [http://example.com/ pretty ''italics'' and stuff]!
854 <p>Some <a href="http://example.com/" class='external text' title="http://example.com/" rel="nofollow">pretty <i>italics</i> and stuff</a>!
859 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
861 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
863 <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>
876 Normal text. '''Bold text.''' Normal text. ''Italic text.''
878 Normal text. '''''Bold italic text.''''' Normal text.
880 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
881 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
887 Unclosed and unmatched quotes
889 '''''Bold italic text '''with bold deactivated''' in between.'''''
891 '''''Bold italic text ''with italic deactivated'' in between.'''''
895 ..spanning two paragraphs (should not work).'''
897 '''Bold tag left open
899 ''Italic tag left open
903 <!-- Unmatching number of opening, closing tags: -->
904 '''This year''''s election ''should'' beat '''last year''''s.
906 ''Tom'''s car is bigger than ''Susan'''s.
908 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
909 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
910 </p><p><b>Bold text..</b>
911 </p><p>..spanning two paragraphs (should not work).
912 </p><p><b>Bold tag left open</b>
913 </p><p><i>Italic tag left open</i>
915 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
916 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
923 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
926 # This should not produce <table></table> as <table><tr><td></td></tr></table>
927 # is the bare minimun required by the spec, see:
928 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
930 A table with no data.
936 # A table with nothing but a caption is invalid XHTML, we might want to render
937 # this as <p>caption</p>
939 A table with nothing but a caption
947 </caption><tr><td></td></tr></table>
973 {| border="1" cellpadding="2"
974 |+Multiplication table
976 ! × !! 1 !! 2 !! 3
994 <table border="1" cellpadding="2">
995 <caption>Multiplication table
998 <th> × </th><th> 1 </th><th> 2 </th><th> 3
1002 </th><td> 1 </td><td> 2 </td><td> 3
1006 </th><td> 2 </td><td> 4 </td><td> 6
1010 </th><td> 3 </td><td> 6 </td><td> 9
1014 </th><td> 4 </td><td> 8 </td><td> 12
1018 </th><td> 5 </td><td> 10 </td><td> 15
1026 {| align=right border=1
1028 |rowspan=2| Cell 2, row 1 (and 2)
1035 <table align="right" border="1">
1038 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1039 </td><td> Cell 3, row 1
1043 </td><td> Cell 3, row 2
1054 {| bgcolor=#ABCDEF border=2
1059 |the original table again
1066 <table bgcolor="#ABCDEF" border="2">
1073 </td><td>the original table again
1079 Invalid attributes in table cell (bug 1830)
1093 # FIXME: this one has incorrect tag nesting still.
1095 Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)
1098 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1102 <td><a href="ftp://|x||" class='external autonumber' title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1114 Plain link, capitalized
1118 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1123 Plain link, uncapitalized
1127 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1134 [[Main Page|The Main Page]]
1136 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1145 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1152 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1154 <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>
1161 [[Main Page]]xxx, [[Main Page]]XXX
1163 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1168 Link with 3 brackets
1177 Piped link with 3 brackets
1179 [[[main page|the main page]]]
1181 <p>[[[main page|the main page]]]
1186 Link with multiple pipes
1188 [[Main Page|The|Main|Page]]
1190 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1197 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1199 <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>
1204 Piped link to namespace
1206 [[Meta:Disclaimers|The disclaimers]]
1208 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1215 [[Usually caused by a typo (oops}]]
1217 <p>[[Usually caused by a typo (oops}]]
1222 Link containing % (not as a hex sequence)
1226 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1231 Link containing % as a single hex sequence interpreted to char
1235 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1240 Link containing % as a double hex sequence interpreted to hex sequence
1244 <p>[[7%2525 Solution]]
1249 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1250 Example for such a section: == < ==
1252 [[%23%3c]][[%23%3e]]
1254 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1259 Link containing "<#" and ">#" as a hex sequences
1261 [[%3c%23]][[%3e%23]]
1263 <p>[[%3c%23]][[%3e%23]]
1268 Link containing double-single-quotes '' (bug 4598)
1270 [[Lista d''e paise d''o munno]]
1272 <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>
1277 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1279 Some [[Link|pretty ''italics'' and stuff]]!
1281 <p>Some <a href="/index.php?title=Link&action=edit" class="new" title="Link">pretty <i>italics</i> and stuff</a>!
1286 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
1288 ''Some [[Link|pretty ''italics'' and stuff]]!
1290 <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>
1297 [[http://www.example.org]]
1299 <p>[<a href="http://www.example.org" class='external autonumber' title="http://www.example.org" rel="nofollow">[1]</a>]
1303 # I'm fairly sure the expected result here is wrong.
1304 # We want these to be URL links, not pseudo-pages with URLs for titles....
1305 # However the current output is also pretty screwy.
1308 # I'm changing it to match the current output--it arguably makes more
1309 # sense in the light of the test above. Old expected result was:
1310 #<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>
1312 # But I think this test is bordering on "garbage in, garbage out" anyway.
1317 Piped link to URL: [[http://www.example.org|an example URL]]
1319 <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>]
1324 BUG 2: [[page|http://url/]] should link to page, not http://url/
1326 [[Main Page|http://url/]]
1328 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1333 BUG 337: Escaped self-links should be bold
1337 [[Bug462]] [[Bug462]]
1339 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1344 Self-link to section should not be bold
1348 [[Main Page#section]]
1350 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1355 <nowiki> inside a link
1357 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1359 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1364 ### Interwiki links (see maintenance/interwiki.sql)
1368 Inline interwiki link
1370 [[MeatBall:SoftSecurity]]
1372 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1377 Inline interwiki link with empty title (bug 2372)
1381 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class='extiw' title="meatball:">MeatBall:</a>
1386 Interwiki link encoding conversion (bug 1636)
1388 *[[Wikipedia:ro:Olteniţa]]
1389 *[[Wikipedia:ro:Olteniţa]]
1391 <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>
1392 </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>
1398 Interwiki link with fragment (bug 2130)
1400 [[MeatBall:SoftSecurity#foo]]
1402 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1420 Incorrecly removing closing slashes from correctly formed XHTML
1422 <br style="clear:both;" />
1424 <p><br style="clear:both;" />
1429 Failing to transform badly formed HTML into correct XHTML
1435 <p><br clear="left" />
1436 <br clear="right" />
1442 Horizontal ruler (should it add that extra space?)
1456 ### Block-level elements
1479 <ol><li>Numbered list
1496 ***#Number on level 4
1498 **#Number on level 3
1499 **#Number on level 3
1504 <ol><li> with numbers
1506 <ul><li> and bullets
1508 <ol><li> and numbers
1510 </li><li>bullets again
1511 <ul><li>bullet level 2
1512 <ul><li>bullet level 3
1513 <ol><li>Number on level 4
1516 </li><li>bullet level 2
1517 <ol><li>Number on level 3
1518 </li><li>Number on level 3
1521 <ol><li>number level 2
1529 List items are not parsed correctly following a <pre> block (bug 785)
1535 <ul><li> <pre>foo</pre>
1536 </li><li> <pre>bar</pre>
1547 Magic Word: {{CURRENTDAY}}
1556 Magic Word: {{CURRENTDAY2}}
1565 Magic Word: {{CURRENTDAYNAME}}
1574 Magic Word: {{CURRENTDOW}}
1583 Magic Word: {{CURRENTMONTH}}
1592 Magic Word: {{CURRENTMONTHABBREV}}
1594 {{CURRENTMONTHABBREV}}
1601 Magic Word: {{CURRENTMONTHNAME}}
1603 {{CURRENTMONTHNAME}}
1610 Magic Word: {{CURRENTMONTHNAMEGEN}}
1612 {{CURRENTMONTHNAMEGEN}}
1619 Magic Word: {{CURRENTTIME}}
1628 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1637 Magic Word: {{CURRENTYEAR}}
1646 Magic Word: {{FULLPAGENAME}}
1648 title=[[User:Ævar Arnfjörð Bjarmason]]
1652 <p>User:Ævar Arnfjörð Bjarmason
1657 Magic Word: {{FULLPAGENAMEE}}
1659 title=[[User:Ævar Arnfjörð Bjarmason]]
1663 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1668 Magic Word: {{NAMESPACE}}
1670 title=[[User:Ævar Arnfjörð Bjarmason]]
1680 Magic Word: {{NAMESPACEE}}
1682 title=[[User:Ævar Arnfjörð Bjarmason]]
1692 Magic Word: {{NUMBEROFARTICLES}}
1694 {{NUMBEROFARTICLES}}
1701 Magic Word: {{NUMBEROFFILES}}
1710 Magic Word: {{PAGENAME}}
1712 title=[[User:Ævar Arnfjörð Bjarmason]]
1717 <p>Ævar Arnfjörð Bjarmason
1722 Magic Word: {{PAGENAMEE}}
1724 title=[[User:Ævar Arnfjörð Bjarmason]]
1728 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1733 Magic Word: {{REVISIONID}}
1742 Magic Word: {{SCRIPTPATH}}
1751 Magic Word: {{SERVER}}
1755 <p><a href="http://localhost" class='external free' title="http://localhost" rel="nofollow">http://localhost</a>
1760 Magic Word: {{SERVERNAME}}
1769 Magic Word: {{SITENAME}}
1778 Namespace 1 {{ns:1}}
1787 Namespace 1 {{ns:01}}
1796 Namespace 0 {{ns:0}} (bug 4783)
1804 Namespace 0 {{ns:00}} (bug 4783)
1812 Namespace -1 {{ns:-1}}
1821 Namespace Project {{ns:User}}
1834 Magic links: internal link to RFC (bug 479)
1838 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1843 Magic links: RFC (bug 479)
1847 <p><a href='http://www.ietf.org/rfc/rfc822.txt' class='external' title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
1852 Magic links: ISBN (bug 1937)
1856 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1861 Magic links: PMID incorrectly converts space to underscore
1865 <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>
1874 Nonexistant template
1876 {{thistemplatedoesnotexist}}
1878 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1885 This is a test template
1893 <p>This is a test template
1898 Template with explicit namespace
1902 <p>This is a test template
1910 This is a test template with parameter {{{param}}}
1916 {{paramtest|param=foo}}
1918 <p>This is a test template with parameter foo
1923 Template:paramtestnum
1929 Template unnamed parameter
1931 {{paramtestnum|Main Page|the main page}}
1933 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
1938 Template:templatesimple
1944 Template:templateredirect
1946 #redirect [[Template:templatesimple]]
1950 Template:templateasargtestnum
1956 Template:templateasargtest
1958 {{template{{{templ}}}}}
1962 Template:templateasargtest2
1968 Template with template name as unnamed argument
1970 {{templateasargtestnum|templatesimple}}
1977 Template with template name as argument
1979 {{templateasargtest|templ=simple}}
1986 Template with template name as argument (2)
1988 {{templateasargtest2|templ=templatesimple}}
1995 Template:templateasargtestdefault
1997 {{{{{templ|templatesimple}}}}}
2007 Template with default value
2009 {{templateasargtestdefault}}
2016 Template with default value (value set)
2018 {{templateasargtestdefault|templ=templa}}
2027 {{templateredirect}}
2034 Template with argument in separate line
2036 {{ templateasargtest |
2044 Template with complex template as argument
2047 param ={{ templateasargtest |
2050 <p>This is a test template with parameter (test)
2055 Template with thumb image (wiht link in description)
2058 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2060 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>
2065 Template:complextemplate
2067 {{{1}}} {{paramtest|
2068 param ={{{param}}}}}
2072 Template with complex arguments
2075 param ={{ templateasargtest |
2076 templ = simple }}|[[Template:complextemplate|link]]}}
2078 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2083 BUG 553: link with two variables in a piped link
2086 |[[{{{1}}}|{{{2}}}]]
2091 <td>[[{{{1}}}|{{{2}}}]]
2097 Magic variable as template parameter
2099 {{paramtest|param={{SITENAME}}}}
2101 <p>This is a test template with parameter MediaWiki
2108 [[{{{param}}}|link]]
2112 Template parameter as link source
2114 {{linktest|param=Main Page}}
2116 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2124 including another template, {{paramtest|param={{{arg}}}}}
2128 Template passing argument to another template
2130 {{paramtest2|arg='hmm'}}
2132 <p>including another template, This is a test template with parameter 'hmm'
2143 Template as link source
2147 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2165 Template infinite loop
2169 <p>{{loop1}}<!-- WARNING: template loop detected -->
2174 Template from main namespace
2193 BUG 529: Template with table, not included at beginning of line
2210 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2228 BUG 41: Template parameters shown as broken links
2240 ''None'' of '''this''' should be
2242 but rather passed unmodified
2246 # hmm, fix this or just deprecate msgnw and document its behavior?
2252 {{msgnw:MSGNW test}}
2254 <p>''None'' of '''this''' should be
2256 but rather passed unmodified
2264 {{int:youhavenewmessages|lots of money|not!}}
2266 <p>You have lots of money (not!).
2273 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2277 <includeonly> and <noinclude> being included
2288 <onlyinclude>Foo</onlyinclude>bar
2292 <onlyinclude> being included
2304 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2308 <onlyinclude> and <includeonly> being included
2317 <includeonly> and <noinclude> on a page
2319 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2326 <onlyinclude> on a page
2328 <onlyinclude>Foo</onlyinclude>bar
2335 ### Pre-save transform tests
2338 pre-save transform: subst:
2344 This is a test template
2348 pre-save transform: normal template
2358 pre-save transform: nonexistant template
2362 {{thistemplatedoesnotexist}}
2364 {{thistemplatedoesnotexist}}
2369 pre-save transform: subst magic variables
2378 # This is bug 89, which I fixed. -- wtm
2380 pre-save transform: subst: templates with parameters
2384 {{subst:paramtest|param="something else"}}
2386 This is a test template with parameter "something else"
2392 <nowiki>'''not wiki'''</nowiki>
2396 pre-save transform: nowiki in subst (bug 1188)
2400 {{subst:nowikitest}}
2402 <nowiki>'''not wiki'''</nowiki>
2407 Template:commenttest
2409 This template has <!-- a comment --> in it.
2413 pre-save transform: comment in subst (bug 1936)
2417 {{subst:commenttest}}
2419 This template has <!-- a comment --> in it.
2423 pre-save transform: unclosed tag
2427 <nowiki>'''not wiki'''
2429 <nowiki>'''not wiki'''
2433 pre-save transform: mixed tag case
2437 <NOwiki>'''not wiki'''</noWIKI>
2439 <NOwiki>'''not wiki'''</noWIKI>
2443 pre-save transform: unclosed comment in <nowiki>
2447 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2449 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
2455 <span onmouseover="alert('crap')">Oh no</span>
2459 (confirming safety of fix for subst bug 1936)
2461 {{Template:dangerous}}
2463 <p><span>Oh no</span>
2468 pre-save transform: comment containing gallery (bug 5024)
2472 <!-- <gallery>data</gallery> -->
2474 <!-- <gallery>data</gallery> -->
2478 pre-save transform: comment containing extension
2482 <!-- <tag>data</tag> -->
2484 <!-- <tag>data</tag> -->
2488 pre-save transform: comment containing nowiki
2492 <!-- <nowiki>data</nowiki> -->
2494 <!-- <nowiki>data</nowiki> -->
2498 pre-save transform: comment containing math
2502 <!-- <math>data</math> -->
2504 <!-- <math>data</math> -->
2509 ### Message transform tests
2512 message transform: magic variables
2522 message transform: should not transform wiki markup
2537 [[Image:foobar.jpg]]
2539 <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>
2546 [[Image:foobar.jpg|right]]
2548 <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>
2555 [[Image:foobar.jpg|right|Caption text]]
2557 <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>
2562 Image with frame and link
2564 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2566 <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>
2571 Link to image page- image page normally doesn't exists, hence edit link
2572 TODO: Add test with existing image page
2573 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2577 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2582 Frameless image caption with a free URL
2584 [[Image:foobar.jpg|http://example.com]]
2586 <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>
2591 Thumbnail image caption with a free URL
2593 [[Image:foobar.jpg|thumb|http://example.com]]
2595 <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>
2600 BUG 1887: A ISBN with a thumbnail
2602 [[Image:foobar.jpg|thumb|ISBN 12354]]
2604 <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>
2609 BUG 1887: A RFC with a thumbnail
2611 [[Image:foobar.jpg|thumb|This is RFC 12354]]
2613 <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>
2618 BUG 1887: A mailto link with a thumbnail
2620 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
2622 <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>
2627 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
2628 so math is not stripped and turns up as escaped <math> tags.
2630 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2632 <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>
2637 BUG 1887, part 2: A <math> with a thumbnail- math enabled
2641 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2643 <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>
2647 # Pending resolution to bug 368
2649 BUG 648: Frameless image caption with a link
2651 [[Image:foobar.jpg|text with a [[link]] in it]]
2653 <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>
2658 BUG 648: Frameless image caption with a link (suffix)
2660 [[Image:foobar.jpg|text with a [[link]]foo in it]]
2662 <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>
2667 BUG 648: Frameless image caption with an interwiki link
2669 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
2671 <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>
2676 BUG 648: Frameless image caption with a piped interwiki link
2678 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
2680 <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>
2685 Escape HTML special chars in image alt text
2687 [[Image:foobar.jpg|& < > "]]
2689 <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>
2694 BUG 499: Alt text should have Ӓ, not &1234;
2696 [[Image:foobar.jpg|♀]]
2698 <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>
2703 Broken image caption with link
2705 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
2707 <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.
2712 Image caption containing another image
2714 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
2716 <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>
2721 Image caption containing a newline
2723 [[Image:Foobar.jpg|This
2726 <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>
2732 Bug 3090: External links other than http: in image captions
2734 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
2736 <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>
2745 Subpage test/subpage
2753 subpage title=[[Subpage test]]
2757 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
2762 Subpage noslash link
2764 subpage title=[[Subpage test]]
2768 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
2777 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
2782 BUG 561: {{/Subpage}}
2784 subpage title=[[Page]]
2788 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
2796 Category:MediaWiki User's Guide
2804 [[:Category:MediaWiki User's Guide]]
2806 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
2815 [[Category:MediaWiki User's Guide]]
2817 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
2821 ### Inter-language links
2824 Inter-language links
2830 [[zh:食品]]
2832 es:Alimento fr:Nourriture zh:食品
2839 Basic section headings
2841 title=[[Parser test script]]
2848 ===Smaller headline===
2851 <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>
2854 <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>
2857 <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>
2863 Section headings with TOC
2865 title=[[Parser test script]]
2868 === Subheadline 1 ===
2869 ===== Skipping a level =====
2870 ====== Skipping a level ======
2874 ===Another headline===
2876 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2878 <li class='toclevel-1'><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
2880 <li class='toclevel-2'><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
2882 <li class='toclevel-3'><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
2884 <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>
2891 <li class='toclevel-1'><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
2893 <li class='toclevel-2'><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
2897 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2898 <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>
2899 <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>
2900 <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>
2901 <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>
2902 <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>
2905 <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>
2909 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
2911 Handling of sections up to level 6 and beyond
2914 == Level 2 Heading==
2915 === Level 3 Heading===
2916 ==== Level 4 Heading====
2917 ===== Level 5 Heading=====
2918 ====== Level 6 Heading======
2919 ======= Level 7 Heading=======
2920 ======== Level 8 Heading========
2921 ========= Level 9 Heading=========
2922 ========== Level 10 Heading==========
2924 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2926 <li class='toclevel-1'><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
2928 <li class='toclevel-2'><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
2930 <li class='toclevel-3'><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
2932 <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>
2934 <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>
2936 <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>
2937 <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>
2938 <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>
2939 <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>
2940 <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>
2952 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2953 <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>
2954 <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>
2955 <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>
2956 <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>
2957 <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>
2958 <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>
2959 <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>
2960 <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>
2961 <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>
2962 <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>
2967 Resolving duplicate section names
2969 title=[[Parser test script]]
2974 <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>
2975 <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>
2987 Template with sections, __NOTOC__
2989 title=[[Parser test script]]
2996 <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>
2997 <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>
2998 <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>
2999 <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>
3004 __NOEDITSECTION__ keyword
3010 <a name="Section_1"></a><h2>Section 1</h2>
3011 <a name="Section_2"></a><h2>Section 2</h2>
3016 Link inside a section heading
3018 title=[[Parser test script]]
3020 ==Section with a [[Main Page|link]] in it==
3022 <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>
3028 BUG 1219 URL next to image (good)
3030 http://example.com [[Image:foobar.jpg]]
3032 <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>
3037 BUG 1219 URL next to image (broken)
3039 http://example.com[[Image:foobar.jpg]]
3041 <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>
3046 Bug 1186 news: in the middle of text
3048 http://en.wikinews.org/wiki/Wikinews:Workplace
3050 <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>
3056 Namespaced link must have a title
3065 Namespaced link must have a title (bad fragment version)
3067 [[Project:#fragment]]
3069 <p>[[Project:#fragment]]
3075 div with no attributes
3077 <div>HTML rocks</div>
3079 <div>HTML rocks</div>
3084 div with double-quoted attribute
3086 <div id="rock">HTML rocks</div>
3088 <div id="rock">HTML rocks</div>
3093 div with single-quoted attribute
3095 <div id='rock'>HTML rocks</div>
3097 <div id="rock">HTML rocks</div>
3102 div with unquoted attribute
3104 <div id=rock>HTML rocks</div>
3106 <div id="rock">HTML rocks</div>
3111 div with illegal double attributes
3113 <div align="center" align="right">HTML rocks</div>
3115 <div align="right">HTML rocks</div>
3120 HTML multiple attributes correction
3122 <p class="error" class="awesome">Awesome!</p>
3124 <p class="awesome">Awesome!</p>
3129 Table multiple attributes correction
3132 !+ class="error" class="awesome"| status
3137 <th class="awesome"> status
3145 <DIV ALIGN="center">HTML ROCKS</DIV>
3147 <div align="center">HTML ROCKS</div>
3153 text with amp in the middle of nowhere
3157 <p>Remember AT&T?
3162 text with character entity: eacute
3164 I always thought é was a cute letter.
3166 <p>I always thought é was a cute letter.
3171 text with undefined character entity: xacute
3173 I always thought &xacute; was a cute letter.
3175 <p>I always thought &xacute; was a cute letter.
3187 [[Media:Foobar.jpg]]
3189 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Media:Foobar.jpg</a>
3194 Media link with text
3196 [[Media:Foobar.jpg|A neat file to look at]]
3198 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">A neat file to look at</a>
3202 # FIXME: this is still bad HTML tag nesting
3204 Media link with nasty text
3205 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3207 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3209 <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>
3214 Media link to nonexistent file (bug 1702)
3216 [[Media:No such.jpg]]
3218 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class='new' title="No such.jpg">Media:No such.jpg</a>
3223 Image link to nonexistent file (bug 1850 - good)
3225 [[Image:No such.jpg]]
3227 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3232 :Image link to nonexistent file (bug 1850 - bad)
3234 [[:Image:No such.jpg]]
3236 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3243 Character reference normalization in link text (bug 1938)
3245 [[Main Page|this&that]]
3247 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3252 Empty attribute crash test (bug 2067)
3254 <font color="">foo</font>
3256 <p><font color="">foo</font>
3261 Empty attribute crash test single-quotes (bug 2067)
3263 <font color=''>foo</font>
3265 <p><font color="">foo</font>
3270 Attribute test: equals, then nothing
3272 <font color=>foo</font>
3279 Attribute test: unquoted value
3281 <font color=x>foo</font>
3283 <p><font color="x">foo</font>
3288 Attribute test: unquoted but illegal value (hash)
3290 <font color=#x>foo</font>
3292 <p><font color="#x">foo</font>
3297 Attribute test: no value
3299 <font color>foo</font>
3301 <p><font color="color">foo</font>
3306 Bug 2095: link with three closing brackets
3310 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3315 Bug 2095: link with pipe and three closing brackets
3319 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3324 Bug 2095: link with pipe and three closing brackets, version 2
3326 [[Main Page|[http://example.com/]]]
3328 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3338 Template:Dangerous attribute
3340 " onmouseover="alert(document.cookie)
3344 Template:Dangerous style attribute
3346 border-size: expression(alert(document.cookie))
3352 <div style="float: right; {{{1}}}">Magic div</div>
3356 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3358 <div title="{{test}}"></div>
3360 <div title="This is a test template"></div>
3365 Bug 2304: HTML attribute safety (dangerous template; 2309)
3367 <div title="{{dangerous attribute}}"></div>
3369 <div title=""></div>
3374 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3376 <div style="{{dangerous style attribute}}"></div>
3383 Bug 2304: HTML attribute safety (safe parameter; 2309)
3385 {{div style|width: 200px}}
3387 <div style="float: right; width: 200px">Magic div</div>
3392 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3394 {{div style|width: expression(alert(document.cookie))}}
3396 <div>Magic div</div>
3401 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3403 {{div style|"><script>alert(document.cookie)</script>}}
3405 <div>Magic div</div>
3410 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3412 {{div style|" ><script>alert(document.cookie)</script>}}
3414 <div style="float: right; ">Magic div</div>
3419 Bug 2304: HTML attribute safety (link)
3421 <div title="[[Main Page]]"></div>
3423 <div title="[[Main Page]]"></div>
3428 Bug 2304: HTML attribute safety (italics)
3430 <div title="''foobar''"></div>
3432 <div title="''foobar''"></div>
3437 Bug 2304: HTML attribute safety (bold)
3439 <div title="'''foobar'''"></div>
3441 <div title="'''foobar'''"></div>
3447 Bug 2304: HTML attribute safety (ISBN)
3449 <div title="ISBN 1234567890"></div>
3451 <div title="ISBN 1234567890"></div>
3456 Bug 2304: HTML attribute safety (RFC)
3458 <div title="RFC 1234"></div>
3460 <div title="RFC 1234"></div>
3465 Bug 2304: HTML attribute safety (PMID)
3467 <div title="PMID 1234567890"></div>
3469 <div title="PMID 1234567890"></div>
3474 Bug 2304: HTML attribute safety (web link)
3476 <div title="http://example.com/"></div>
3478 <div title="http://example.com/"></div>
3483 Bug 2304: HTML attribute safety (named web link)
3485 <div title="[http://example.com/ link]"></div>
3487 <div title="[http://example.com/ link]"></div>
3492 Bug 3244: HTML attribute safety (extension; safe)
3494 <div style="<nowiki>background:blue</nowiki>"></div>
3496 <div style="background:blue"></div>
3501 Bug 3244: HTML attribute safety (extension; unsafe)
3503 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3510 Math section safety when disabled
3512 <math><script>alert(document.cookies);</script></math>
3514 <p><math><script>alert(document.cookies);</script></math>
3518 # More MSIE fun discovered by Tom Gilder
3521 MSIE CSS safety test: spurious slash
3523 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3530 MSIE CSS safety test: hex code
3532 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3539 MSIE CSS safety test: comment in url
3541 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3543 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3548 MSIE CSS safety test: comment in expression
3550 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3552 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3558 Table attribute legitimate extension
3561 !+ style="<nowiki>color:blue</nowiki>"| status
3566 <th style="color:blue"> status
3572 Table attribute safety
3575 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3586 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3589 Parser hook: empty input
3602 Parser hook: empty input using terminated empty elements
3615 Parser hook: empty input using terminated empty elements (space before)
3628 Parser hook: basic input
3642 Parser hook: case insensetive
3656 Parser hook: case insensetive, redux
3669 Parser hook: nested tags
3673 <tag><tag></tag></tag>
3684 Parser hook: basic arguments
3686 <tag width=200 height = "100" depth = '50' square></tag>
3705 Parser hook: argument containing a forward slash (bug 5344)
3707 <tag filename='/tmp/bla'></tag>
3713 string(8) "/tmp/bla"
3720 Parser hook: empty input using terminated empty elements (bug 2374)
3734 # </tag> should be output literally since there is no matching tag that begins it
3736 Parser hook: basic arguments using terminated empty elements (bug 2374)
3738 <tag width=200 height = "100" depth = '50' square/>
3761 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
3765 Parser hook: static parser hook not inside a comment
3767 <statictag>hello, world</statictag>
3768 <statictag action=flush/>
3776 Parser hook: static parser hook inside a comment
3778 <!-- <statictag>hello, world</statictag> -->
3779 <statictag action=flush/>
3785 # Nested template calls; this case was broken by Parser.php rev 1.506,
3789 Template:One-parameter
3791 (My parameter is: {{{1}}})
3795 Template:Map-one-parameter
3801 Nested template calls
3803 {{Map-one-parameter|One-parameter|param}}
3805 <p>(My parameter is: param)
3814 Sanitizer: Closing of open tags
3816 <s></s><table></table>
3818 <s></s><table></table>
3823 Sanitizer: Closing of open but not closed tags
3832 Sanitizer: Closing of closed but not open tags
3841 Sanitizer: Closing of closed but not open table tags
3843 Table not started</td></tr></table>
3845 <p>Table not started</td></tr></table>
3850 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
3852 <span id="æ: v">byte</span>[[#æ: v|backlink]]
3854 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
3859 Sanitizer: Validating the contents of the id attribute (bug 4515)
3865 Something, but defenetly not <br id="9" />...
3869 Language converter: output gets cut off unexpectedly (bug 5757)
3873 this bit is safe: }-
3875 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
3877 then we get cut off here: }-
3879 all additional text is vanished
3881 <p>this bit is safe: }-
3882 </p><p>but if we add a conversion instance: xxx
3883 </p><p>then we get cut off here: }-
3884 </p><p>all additional text is vanished
3889 Self closed html pairs (bug 5487)
3892 <center><font id="bug" />Centered text</center>
3893 <div><font id="bug2" />In div text</div>
3895 <div class="center"><font id="bug" />Centered text</div>
3896 <div><font id="bug2" />In div text</div>
3905 HTML bullet list, closed tags (bug 5497)
3920 HTML bullet list, unclosed tags (bug 5497)
3935 HTML ordered list, closed tags (bug 5497)
3950 HTML ordered list, unclosed tags (bug 5497)
3965 HTML nested bullet list, closed tags (bug 5497)
3990 HTML nested bullet list, open tags (bug 5497)
4014 HTML nested ordered list, closed tags (bug 5497)
4039 HTML nested ordered list, open tags (bug 5497)
4063 HTML ordered list item with parameters oddity
4065 <ol><li id="fragment">One</li></ol>
4067 <ol><li id="fragment">One</li></ol>
4072 bug 5918: autonumbering
4074 [http://first/] [http://second] [ftp://ftp]
4078 [mailto:enclosed@mail.tld With target]
4080 [mailto:enclosed@mail.tld]
4082 mailto:inline@mail.tld
4084 <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>
4085 </p><p><a href="ftp://inlineftp" class='external free' title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4086 </p><p><a href="mailto:enclosed@mail.tld" class='external text' title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4087 </p><p><a href="mailto:enclosed@mail.tld" class='external autonumber' title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4088 </p><p><a href="mailto:inline@mail.tld" class='external free' title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4094 # Security and HTML correctness
4095 # From Nick Jenkins' fuzz testing
4099 Fuzz testing: Parser13
4114 Fuzz testing: Parser14
4119 <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>
4120 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4122 <li class='toclevel-1'><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4124 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4129 Fuzz testing: Parser14-table
4134 <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>
4135 <table style="__TOC__">
4141 # Known to produce bogus xml (extra </td>)
4143 Fuzz testing: Parser16
4152 <th>https://</th><th></th><th></th><th>
4160 Fuzz testing: Parser21
4163 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4168 <th> <a href="irc://{{ftp://a" class='external free' title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4177 Fuzz testing: Parser22
4179 http://===r:::https://b
4183 <p><a href="http://===r:::https://b" class='external free' title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4191 # Known to produce bad XML for now
4193 Fuzz testing: Parser24
4200 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4201 <br style="onmouseover='alert(document.cookie);' " />
4203 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4208 <u class="|">} >
4209 <br style="onmouseover='alert(document.cookie);' " />
4211 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4220 # Known to produce bad XML for now
4222 Fuzz testing: Parser25 (bug 6055)
4230 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4232 <li class="||">
4233 blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4238 Fuzz testing: URL adjacent extension (with space, clean)
4241 http://example.com <nowiki>junk</nowiki>
4243 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a> junk
4248 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4251 http://example.com<nowiki>junk</nowiki>
4253 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>junk
4258 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4261 http://example.com<pre>junk</pre>
4263 <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>