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>
298 <dl><dt> name </dt><dd> Definition
308 <dl><dd> Indented text
314 Definition list with no space
318 <dl><dt>name</dt><dd>Definition
324 Definition list with URL link
326 ; http://example.com/ : definition
328 <dl><dt> <a href="http://example.com/" class='external free' title="http://example.com/" rel="nofollow">http://example.com/</a> </dt><dd> definition
334 Definition list with bracketed URL link
336 ;[http://www.example.com/ Example]:Something about it
338 <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
344 Definition list with wikilink containing colon
346 ; [[Help:FAQ]]: The least-read page on Wikipedia
348 <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
353 # At Brion's and JeLuF's insistence... :)
355 Definition list with wikilink containing colon
357 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
359 <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!
365 Malformed definition list with colon
367 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
369 <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
375 Definition lists: colon in external link text
377 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
379 <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
389 External links: non-bracketed
391 Non-bracketed: http://example.com
393 <p>Non-bracketed: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
398 External links: numbered
400 Numbered: [http://example.com]
401 Numbered: [http://example.net]
402 Numbered: [http://example.org]
404 <p>Numbered: <a href="http://example.com" class='external autonumber' title="http://example.com" rel="nofollow">[1]</a>
405 Numbered: <a href="http://example.net" class='external autonumber' title="http://example.net" rel="nofollow">[2]</a>
406 Numbered: <a href="http://example.org" class='external autonumber' title="http://example.org" rel="nofollow">[3]</a>
411 External links: specified text
413 Specified text: [http://example.com link]
415 <p>Specified text: <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">link</a>
420 External links: trail
422 Linktrails should not work for external links: [http://example.com link]s
424 <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
429 External links: dollar sign in URL
431 http://example.com/1$2345
433 <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>
438 External links: dollar sign in URL (named)
440 [http://example.com/1$2345]
442 <p><a href="http://example.com/1$2345" class='external autonumber' title="http://example.com/1$2345" rel="nofollow">[1]</a>
447 External links: open square bracket forbidden in URL (bug 4377)
449 http://example.com/1[2345
451 <p><a href="http://example.com/1" class='external free' title="http://example.com/1" rel="nofollow">http://example.com/1</a>[2345
456 External links: open square bracket forbidden in URL (named) (bug 4377)
458 [http://example.com/1[2345]
460 <p><a href="http://example.com/1" class='external text' title="http://example.com/1" rel="nofollow">[2345</a>
467 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
469 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
474 External image from https
476 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
478 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
483 Link to non-http image, no img tag
485 Link to non-http image, no img tag: ftp://example.com/test.jpg
487 <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>
492 External links: terminating separator
494 Terminating separator: http://example.com/thing,
496 <p>Terminating separator: <a href="http://example.com/thing" class='external free' title="http://example.com/thing" rel="nofollow">http://example.com/thing</a>,
501 External links: intervening separator
503 Intervening separator: http://example.com/1,2,3
505 <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>
510 External links: old bug with URL in query
512 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
514 <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>
519 External links: old URL-in-URL bug, mixed protocols
521 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
523 <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>
528 External links: URL in text
530 URL in text: [http://example.com http://example.com]
532 <p>URL in text: <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>
537 External links: Clickable images
539 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
541 <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>
546 External links: raw ampersand
548 Old & use: http://x&y
550 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
555 External links: encoded ampersand
557 Old & use: http://x&y
559 <p>Old & use: <a href="http://x&y" class='external free' title="http://x&y" rel="nofollow">http://x&y</a>
564 External links: encoded equals (bug 6102)
566 http://example.com/?foo=bar
568 <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>
573 External links: [raw ampersand]
575 Old & use: [http://x&y]
577 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
582 External links: [encoded ampersand]
584 Old & use: [http://x&y]
586 <p>Old & use: <a href="http://x&y" class='external autonumber' title="http://x&y" rel="nofollow">[1]</a>
591 External links: [encoded equals] (bug 6102)
593 [http://example.com/?foo=bar]
595 <p><a href="http://example.com/?foo=bar" class='external autonumber' title="http://example.com/?foo=bar" rel="nofollow">[1]</a>
600 External links: www.jpeg.org (bug 554)
604 <p><a href="http://www.jpeg.org" class='external free' title="http://www.jpeg.org" rel="nofollow">http://www.jpeg.org</a>
609 External links: URL within URL (original bug 2)
611 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
613 <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>
618 BUG 361: URL inside bracketed URL
620 [http://www.example.com/foo http://www.example.com/bar]
622 <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>
627 BUG 361: URL within URL, not bracketed
629 http://www.example.com/foo?=http://www.example.com/bar
631 <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>
636 BUG 289: ">"-token in URL-tail
638 http://www.example.com/<hello>
640 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a><hello>
645 BUG 289: literal ">"-token in URL-tail
647 http://www.example.com/<b>html</b>
649 <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>
654 BUG 289: ">"-token in bracketed URL
656 [http://www.example.com/<hello> stuff]
658 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><hello> stuff</a>
663 BUG 289: literal ">"-token in bracketed URL
665 [http://www.example.com/<b>html</b> stuff]
667 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow"><b>html</b> stuff</a>
672 BUG 289: literal double quote at end of URL
674 http://www.example.com/"hello"
676 <p><a href="http://www.example.com/" class='external free' title="http://www.example.com/" rel="nofollow">http://www.example.com/</a>"hello"
681 BUG 289: literal double quote in bracketed URL
683 [http://www.example.com/"hello" stuff]
685 <p><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow">"hello" stuff</a>
690 External links: invalid character
691 Fixme: the missing char seems to have gone missing
695 [http://www.example.com test]
697 <p>[<a href="http://www.example.com" class='external free' title="http://www.example.com" rel="nofollow">http://www.example.com</a> test]
702 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
704 [http://www.example.com test]
706 <p><a href="http://www.example.com" class='external text' title="http://www.example.com" rel="nofollow">test</a>
711 External links: wiki links within external link (Bug 3695)
713 [http://example.com [[wikilink]] embedded in ext link]
715 <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>
720 BUG 787: Links with one slash after the url protocol are invalid
724 [http:/example.com title]
727 </p><p>[http:/example.com title]
732 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
734 ''[http://example.com text'']
735 [http://example.com '''text]'''
736 ''Something [http://example.com in italic'']
737 ''Something [http://example.com mixed''''', even bold]'''
738 '''''Now [http://example.com both''''']
740 <p><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>text</i></a>
741 <a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><b>text</b></a>
742 <i>Something </i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>in italic</i></a>
743 <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>
744 <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>
752 http://www.example.com/?title=AT%26T
754 <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>
759 Bug 4781, 5267: %26 in URL
761 http://www.example.com/?title=100%25_Bran
763 <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>
768 Bug 4781, 5267: %28, %29 in URL
770 http://www.example.com/?title=Ben-Hur_%281959_film%29
772 <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>
778 Bug 4781: %26 in autonumber URL
780 [http://www.example.com/?title=AT%26T]
782 <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>
787 Bug 4781, 5267: %26 in autonumber URL
789 [http://www.example.com/?title=100%25_Bran]
791 <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>
796 Bug 4781, 5267: %28, %29 in autonumber URL
798 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
800 <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>
806 Bug 4781: %26 in bracketed URL
808 [http://www.example.com/?title=AT%26T link]
810 <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>
815 Bug 4781, 5267: %26 in bracketed URL
817 [http://www.example.com/?title=100%25_Bran link]
819 <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>
824 Bug 4781, 5267: %28, %29 in bracketed URL
826 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
828 <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>
840 Normal text. '''Bold text.''' Normal text. ''Italic text.''
842 Normal text. '''''Bold italic text.''''' Normal text.
844 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
845 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
851 Unclosed and unmatched quotes
853 '''''Bold italic text '''with bold deactivated''' in between.'''''
855 '''''Bold italic text ''with italic deactivated'' in between.'''''
859 ..spanning two paragraphs (should not work).'''
861 '''Bold tag left open
863 ''Italic tag left open
867 <!-- Unmatching number of opening, closing tags: -->
868 '''This year''''s election ''should'' beat '''last year''''s.
870 ''Tom'''s car is bigger than ''Susan'''s.
872 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
873 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
874 </p><p><b>Bold text..</b>
875 </p><p>..spanning two paragraphs (should not work).
876 </p><p><b>Bold tag left open</b>
877 </p><p><i>Italic tag left open</i>
879 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
880 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
887 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
890 # This should not produce <table></table> as <table><tr><td></td></tr></table>
891 # is the bare minimun required by the spec, see:
892 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
894 A table with no data.
900 # A table with nothing but a caption is invalid XHTML, we might want to render
901 # this as <p>caption</p>
903 A table with nothing but a caption
911 </caption><tr><td></td></tr></table>
937 {| border="1" cellpadding="2"
938 |+Multiplication table
940 ! × !! 1 !! 2 !! 3
958 <table border="1" cellpadding="2">
959 <caption>Multiplication table
962 <th> × </th><th> 1 </th><th> 2 </th><th> 3
966 </th><td> 1 </td><td> 2 </td><td> 3
970 </th><td> 2 </td><td> 4 </td><td> 6
974 </th><td> 3 </td><td> 6 </td><td> 9
978 </th><td> 4 </td><td> 8 </td><td> 12
982 </th><td> 5 </td><td> 10 </td><td> 15
990 {| align=right border=1
992 |rowspan=2| Cell 2, row 1 (and 2)
999 <table align="right" border="1">
1002 </td><td rowspan="2"> Cell 2, row 1 (and 2)
1003 </td><td> Cell 3, row 1
1007 </td><td> Cell 3, row 2
1018 {| bgcolor=#ABCDEF border=2
1023 |the original table again
1030 <table bgcolor="#ABCDEF" border="2">
1037 </td><td>the original table again
1043 Invalid attributes in table cell (bug 1830)
1057 # FIXME: this one has incorrect tag nesting still.
1059 Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)
1062 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
1066 <td><a href="ftp://|x||" class='external autonumber' title="ftp://|x||" rel="nofollow">[1]</td><td></a>" onmouseover="alert(document.cookie)">test
1078 Plain link, capitalized
1082 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
1087 Plain link, uncapitalized
1091 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
1098 [[Main Page|The Main Page]]
1100 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
1109 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit" class="new" title="Zigzagzogzagzig">Zigzagzogzagzig</a>
1116 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
1118 <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>
1125 [[Main Page]]xxx, [[Main Page]]XXX
1127 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX
1132 Link with 3 brackets
1141 Piped link with 3 brackets
1143 [[[main page|the main page]]]
1145 <p>[[[main page|the main page]]]
1150 Link with multiple pipes
1152 [[Main Page|The|Main|Page]]
1154 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
1161 [[Talk:Parser testing]], [[Meta:Disclaimers]]
1163 <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>
1168 Piped link to namespace
1170 [[Meta:Disclaimers|The disclaimers]]
1172 <p><a href="/index.php?title=Meta:Disclaimers&action=edit" class="new" title="Meta:Disclaimers">The disclaimers</a>
1179 [[Usually caused by a typo (oops}]]
1181 <p>[[Usually caused by a typo (oops}]]
1186 Link containing % (not as a hex sequence)
1190 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1195 Link containing % as a single hex sequence interpreted to char
1199 <p><a href="/index.php?title=7%25_Solution&action=edit" class="new" title="7% Solution">7% Solution</a>
1204 Link containing % as a double hex sequence interpreted to hex sequence
1208 <p>[[7%2525 Solution]]
1213 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
1214 Example for such a section: == < ==
1216 [[%23%3c]][[%23%3e]]
1218 <p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a>
1223 Link containing "<#" and ">#" as a hex sequences
1225 [[%3c%23]][[%3e%23]]
1227 <p>[[%3c%23]][[%3e%23]]
1232 Link containing double-single-quotes '' (bug 4598)
1234 [[Lista d''e paise d''o munno]]
1236 <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>
1241 Link containing double-single-quotes '' in text (bug 4598 sanity check)
1243 [[Link|Lista d''e paise d''o munno]]
1245 <p><a href="/index.php?title=Link&action=edit" class="new" title="Link">Lista d<i>e paise d</i>o munno</a>
1252 [[http://www.example.org]]
1254 <p>[<a href="http://www.example.org" class='external autonumber' title="http://www.example.org" rel="nofollow">[1]</a>]
1258 # I'm fairly sure the expected result here is wrong.
1259 # We want these to be URL links, not pseudo-pages with URLs for titles....
1260 # However the current output is also pretty screwy.
1263 # I'm changing it to match the current output--it arguably makes more
1264 # sense in the light of the test above. Old expected result was:
1265 #<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>
1267 # But I think this test is bordering on "garbage in, garbage out" anyway.
1272 Piped link to URL: [[http://www.example.org|an example URL]]
1274 <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>]
1279 BUG 2: [[page|http://url/]] should link to page, not http://url/
1281 [[Main Page|http://url/]]
1283 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
1288 BUG 337: Escaped self-links should be bold
1292 [[Bug462]] [[Bug462]]
1294 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
1299 Self-link to section should not be bold
1303 [[Main Page#section]]
1305 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
1310 <nowiki> inside a link
1312 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
1314 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
1319 ### Interwiki links (see maintenance/interwiki.sql)
1323 Inline interwiki link
1325 [[MeatBall:SoftSecurity]]
1327 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
1332 Inline interwiki link with empty title (bug 2372)
1336 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class='extiw' title="meatball:">MeatBall:</a>
1341 Interwiki link encoding conversion (bug 1636)
1343 *[[Wikipedia:ro:Olteniţa]]
1344 *[[Wikipedia:ro:Olteniţa]]
1346 <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>
1347 </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>
1353 Interwiki link with fragment (bug 2130)
1355 [[MeatBall:SoftSecurity#foo]]
1357 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class='extiw' title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
1375 Incorrecly removing closing slashes from correctly formed XHTML
1377 <br style="clear:both;" />
1379 <p><br style="clear:both;" />
1384 Failing to transform badly formed HTML into correct XHTML
1390 <p><br clear="left" />
1391 <br clear="right" />
1397 Horizontal ruler (should it add that extra space?)
1411 ### Block-level elements
1434 <ol><li>Numbered list
1451 ***#Number on level 4
1453 **#Number on level 3
1454 **#Number on level 3
1459 <ol><li> with numbers
1461 <ul><li> and bullets
1463 <ol><li> and numbers
1465 </li><li>bullets again
1466 <ul><li>bullet level 2
1467 <ul><li>bullet level 3
1468 <ol><li>Number on level 4
1471 </li><li>bullet level 2
1472 <ol><li>Number on level 3
1473 </li><li>Number on level 3
1476 <ol><li>number level 2
1484 List items are not parsed correctly following a <pre> block (bug 785)
1490 <ul><li> <pre>foo</pre>
1491 </li><li> <pre>bar</pre>
1502 Magic Word: {{CURRENTDAY}}
1511 Magic Word: {{CURRENTDAY2}}
1520 Magic Word: {{CURRENTDAYNAME}}
1529 Magic Word: {{CURRENTDOW}}
1538 Magic Word: {{CURRENTMONTH}}
1547 Magic Word: {{CURRENTMONTHABBREV}}
1549 {{CURRENTMONTHABBREV}}
1556 Magic Word: {{CURRENTMONTHNAME}}
1558 {{CURRENTMONTHNAME}}
1565 Magic Word: {{CURRENTMONTHNAMEGEN}}
1567 {{CURRENTMONTHNAMEGEN}}
1574 Magic Word: {{CURRENTTIME}}
1583 Magic Word: {{CURRENTWEEK}} (@bug 4594)
1592 Magic Word: {{CURRENTYEAR}}
1601 Magic Word: {{FULLPAGENAME}}
1603 title=[[User:Ævar Arnfjörð Bjarmason]]
1607 <p>User:Ævar Arnfjörð Bjarmason
1612 Magic Word: {{FULLPAGENAMEE}}
1614 title=[[User:Ævar Arnfjörð Bjarmason]]
1618 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1623 Magic Word: {{NAMESPACE}}
1625 title=[[User:Ævar Arnfjörð Bjarmason]]
1635 Magic Word: {{NAMESPACEE}}
1637 title=[[User:Ævar Arnfjörð Bjarmason]]
1647 Magic Word: {{NUMBEROFARTICLES}}
1649 {{NUMBEROFARTICLES}}
1656 Magic Word: {{NUMBEROFFILES}}
1665 Magic Word: {{PAGENAME}}
1667 title=[[User:Ævar Arnfjörð Bjarmason]]
1672 <p>Ævar Arnfjörð Bjarmason
1677 Magic Word: {{PAGENAMEE}}
1679 title=[[User:Ævar Arnfjörð Bjarmason]]
1683 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
1688 Magic Word: {{REVISIONID}}
1697 Magic Word: {{SCRIPTPATH}}
1706 Magic Word: {{SERVER}}
1710 <p><a href="http://localhost" class='external free' title="http://localhost" rel="nofollow">http://localhost</a>
1715 Magic Word: {{SERVERNAME}}
1724 Magic Word: {{SITENAME}}
1733 Namespace 1 {{ns:1}}
1742 Namespace 1 {{ns:01}}
1751 Namespace 0 {{ns:0}} (bug 4783)
1759 Namespace 0 {{ns:00}} (bug 4783)
1767 Namespace -1 {{ns:-1}}
1776 Namespace Project {{ns:User}}
1789 Magic links: internal link to RFC (bug 479)
1793 <p><a href="/index.php?title=RFC_123&action=edit" class="new" title="RFC 123">RFC 123</a>
1798 Magic links: RFC (bug 479)
1802 <p><a href='http://www.ietf.org/rfc/rfc822.txt' class='external' title="http://www.ietf.org/rfc/rfc822.txt">RFC 822</a>
1807 Magic links: ISBN (bug 1937)
1811 <p><a href="/index.php?title=Special:Booksources&isbn=0306406152" class="internal">ISBN 0-306-40615-2</a>
1816 Magic links: PMID incorrectly converts space to underscore
1820 <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>
1829 Nonexistant template
1831 {{thistemplatedoesnotexist}}
1833 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit" class="new" title="Template:Thistemplatedoesnotexist">Template:Thistemplatedoesnotexist</a>
1840 This is a test template
1848 <p>This is a test template
1853 Template with explicit namespace
1857 <p>This is a test template
1865 This is a test template with parameter {{{param}}}
1871 {{paramtest|param=foo}}
1873 <p>This is a test template with parameter foo
1878 Template:paramtestnum
1884 Template unnamed parameter
1886 {{paramtestnum|Main Page|the main page}}
1888 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
1893 Template:templatesimple
1899 Template:templateredirect
1901 #redirect [[Template:templatesimple]]
1905 Template:templateasargtestnum
1911 Template:templateasargtest
1913 {{template{{{templ}}}}}
1917 Template:templateasargtest2
1923 Template with template name as unnamed argument
1925 {{templateasargtestnum|templatesimple}}
1932 Template with template name as argument
1934 {{templateasargtest|templ=simple}}
1941 Template with template name as argument (2)
1943 {{templateasargtest2|templ=templatesimple}}
1950 Template:templateasargtestdefault
1952 {{{{{templ|templatesimple}}}}}
1962 Template with default value
1964 {{templateasargtestdefault}}
1971 Template with default value (value set)
1973 {{templateasargtestdefault|templ=templa}}
1982 {{templateredirect}}
1989 Template with argument in separate line
1991 {{ templateasargtest |
1999 Template with complex template as argument
2002 param ={{ templateasargtest |
2005 <p>This is a test template with parameter (test)
2010 Template with thumb image (wiht link in description)
2013 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
2015 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>
2020 Template:complextemplate
2022 {{{1}}} {{paramtest|
2023 param ={{{param}}}}}
2027 Template with complex arguments
2030 param ={{ templateasargtest |
2031 templ = simple }}|[[Template:complextemplate|link]]}}
2033 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
2038 BUG 553: link with two variables in a piped link
2041 |[[{{{1}}}|{{{2}}}]]
2046 <td>[[{{{1}}}|{{{2}}}]]
2052 Magic variable as template parameter
2054 {{paramtest|param={{SITENAME}}}}
2056 <p>This is a test template with parameter MediaWiki
2063 [[{{{param}}}|link]]
2067 Template parameter as link source
2069 {{linktest|param=Main Page}}
2071 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
2079 including another template, {{paramtest|param={{{arg}}}}}
2083 Template passing argument to another template
2085 {{paramtest2|arg='hmm'}}
2087 <p>including another template, This is a test template with parameter 'hmm'
2098 Template as link source
2102 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
2120 Template infinite loop
2124 <p>{{loop1}}<!-- WARNING: template loop detected -->
2129 Template from main namespace
2148 BUG 529: Template with table, not included at beginning of line
2165 BUG 523: Template shouldn't eat newline (or add an extra one before table)
2183 BUG 41: Template parameters shown as broken links
2195 ''None'' of '''this''' should be
2197 but rather passed unmodified
2201 # hmm, fix this or just deprecate msgnw and document its behavior?
2207 {{msgnw:MSGNW test}}
2209 <p>''None'' of '''this''' should be
2211 but rather passed unmodified
2219 {{int:youhavenewmessages|lots of money|not!}}
2221 <p>You have lots of money (not!).
2228 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2232 <includeonly> and <noinclude> being included
2243 <onlyinclude>Foo</onlyinclude>bar
2247 <onlyinclude> being included
2259 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
2263 <onlyinclude> and <includeonly> being included
2272 <includeonly> and <noinclude> on a page
2274 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
2281 <onlyinclude> on a page
2283 <onlyinclude>Foo</onlyinclude>bar
2290 ### Pre-save transform tests
2293 pre-save transform: subst:
2299 This is a test template
2303 pre-save transform: normal template
2313 pre-save transform: nonexistant template
2317 {{thistemplatedoesnotexist}}
2319 {{thistemplatedoesnotexist}}
2324 pre-save transform: subst magic variables
2333 # This is bug 89, which I fixed. -- wtm
2335 pre-save transform: subst: templates with parameters
2339 {{subst:paramtest|param="something else"}}
2341 This is a test template with parameter "something else"
2347 <nowiki>'''not wiki'''</nowiki>
2351 pre-save transform: nowiki in subst (bug 1188)
2355 {{subst:nowikitest}}
2357 <nowiki>'''not wiki'''</nowiki>
2362 Template:commenttest
2364 This template has <!-- a comment --> in it.
2368 pre-save transform: comment in subst (bug 1936)
2372 {{subst:commenttest}}
2374 This template has <!-- a comment --> in it.
2381 <span onmouseover="alert('crap')">Oh no</span>
2385 (confirming safety of fix for subst bug 1936)
2387 {{Template:dangerous}}
2389 <p><span>Oh no</span>
2394 pre-save transform: comment containing gallery (bug 5024)
2398 <!-- <gallery>data</gallery> -->
2400 <!-- <gallery>data</gallery> -->
2404 pre-save transform: comment containing extension
2408 <!-- <tag>data</tag> -->
2410 <!-- <tag>data</tag> -->
2414 pre-save transform: comment containing nowiki
2418 <!-- <nowiki>data</nowiki> -->
2420 <!-- <nowiki>data</nowiki> -->
2424 pre-save transform: comment containing math
2428 <!-- <math>data</math> -->
2430 <!-- <math>data</math> -->
2435 ### Message transform tests
2438 message transform: magic variables
2448 message transform: should not transform wiki markup
2463 [[Image:foobar.jpg]]
2465 <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>
2472 [[Image:foobar.jpg|right]]
2474 <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>
2481 [[Image:foobar.jpg|right|Caption text]]
2483 <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>
2488 Image with frame and link
2490 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
2492 <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>
2497 Link to image page- image page normally doesn't exists, hence edit link
2498 TODO: Add test with existing image page
2499 #<p><a href="/wiki/Image:Test" title="Image:Test">Image:test</a>
2503 <p><a href="/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a>
2508 Frameless image caption with a free URL
2510 [[Image:foobar.jpg|http://example.com]]
2512 <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>
2517 Thumbnail image caption with a free URL
2519 [[Image:foobar.jpg|thumb|http://example.com]]
2521 <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>
2526 BUG 1887: A ISBN with a thumbnail
2528 [[Image:foobar.jpg|thumb|ISBN 12354]]
2530 <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>
2535 BUG 1887: A RFC with a thumbnail
2537 [[Image:foobar.jpg|thumb|This is RFC 12354]]
2539 <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>
2544 BUG 1887: A mailto link with a thumbnail
2546 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
2548 <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>
2553 BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
2554 so math is not stripped and turns up as escaped <math> tags.
2556 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2558 <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>
2563 BUG 1887, part 2: A <math> with a thumbnail- math enabled
2567 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
2569 <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>
2573 # Pending resolution to bug 368
2575 BUG 648: Frameless image caption with a link
2577 [[Image:foobar.jpg|text with a [[link]] in it]]
2579 <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>
2584 BUG 648: Frameless image caption with a link (suffix)
2586 [[Image:foobar.jpg|text with a [[link]]foo in it]]
2588 <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>
2593 BUG 648: Frameless image caption with an interwiki link
2595 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
2597 <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>
2602 BUG 648: Frameless image caption with a piped interwiki link
2604 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
2606 <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>
2611 Escape HTML special chars in image alt text
2613 [[Image:foobar.jpg|& < > "]]
2615 <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>
2620 BUG 499: Alt text should have Ӓ, not &1234;
2622 [[Image:foobar.jpg|♀]]
2624 <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>
2629 Broken image caption with link
2631 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
2633 <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.
2638 Image caption containing another image
2640 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
2642 <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>
2647 Image caption containing a newline
2649 [[Image:Foobar.jpg|This
2652 <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>
2658 Bug 3090: External links other than http: in image captions
2660 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
2662 <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>
2671 Subpage test/subpage
2679 subpage title=[[Subpage test]]
2683 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
2688 Subpage noslash link
2690 subpage title=[[Subpage test]]
2694 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
2703 <p><a href="/index.php?title=/subpage&action=edit" class="new" title="/subpage">/subpage</a>
2708 BUG 561: {{/Subpage}}
2710 subpage title=[[Page]]
2714 <p><a href="/index.php?title=Page/Subpage&action=edit" class="new" title="Page/Subpage">Page/Subpage</a>
2722 Category:MediaWiki User's Guide
2730 [[:Category:MediaWiki User's Guide]]
2732 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
2741 [[Category:MediaWiki User's Guide]]
2743 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
2747 ### Inter-language links
2750 Inter-language links
2756 [[zh:食品]]
2758 es:Alimento fr:Nourriture zh:食品
2765 Basic section headings
2767 title=[[Parser test script]]
2774 ===Smaller headline===
2777 <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>
2780 <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>
2783 <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>
2789 Section headings with TOC
2791 title=[[Parser test script]]
2794 === Subheadline 1 ===
2795 ===== Skipping a level =====
2796 ====== Skipping a level ======
2800 ===Another headline===
2802 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2804 <li class='toclevel-1'><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
2806 <li class='toclevel-2'><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
2808 <li class='toclevel-3'><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
2810 <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>
2817 <li class='toclevel-1'><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
2819 <li class='toclevel-2'><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
2823 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2824 <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>
2825 <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>
2826 <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>
2827 <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>
2828 <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>
2831 <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>
2835 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
2837 Handling of sections up to level 6 and beyond
2840 == Level 2 Heading==
2841 === Level 3 Heading===
2842 ==== Level 4 Heading====
2843 ===== Level 5 Heading=====
2844 ====== Level 6 Heading======
2845 ======= Level 7 Heading=======
2846 ======== Level 8 Heading========
2847 ========= Level 9 Heading=========
2848 ========== Level 10 Heading==========
2850 <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
2852 <li class='toclevel-1'><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
2854 <li class='toclevel-2'><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
2856 <li class='toclevel-3'><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
2858 <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>
2860 <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>
2862 <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>
2863 <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>
2864 <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>
2865 <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>
2866 <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>
2878 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
2879 <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>
2880 <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>
2881 <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>
2882 <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>
2883 <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>
2884 <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>
2885 <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>
2886 <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>
2887 <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>
2888 <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>
2893 Resolving duplicate section names
2895 title=[[Parser test script]]
2900 <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>
2901 <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>
2913 Template with sections, __NOTOC__
2915 title=[[Parser test script]]
2922 <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>
2923 <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>
2924 <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>
2925 <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>
2930 __NOEDITSECTION__ keyword
2936 <a name="Section_1"></a><h2>Section 1</h2>
2937 <a name="Section_2"></a><h2>Section 2</h2>
2942 Link inside a section heading
2944 title=[[Parser test script]]
2946 ==Section with a [[Main Page|link]] in it==
2948 <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>
2954 BUG 1219 URL next to image (good)
2956 http://example.com [[Image:foobar.jpg]]
2958 <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>
2963 BUG 1219 URL next to image (broken)
2965 http://example.com[[Image:foobar.jpg]]
2967 <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>
2972 Bug 1186 news: in the middle of text
2974 http://en.wikinews.org/wiki/Wikinews:Workplace
2976 <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>
2982 Namespaced link must have a title
2991 Namespaced link must have a title (bad fragment version)
2993 [[Project:#fragment]]
2995 <p>[[Project:#fragment]]
3001 div with no attributes
3003 <div>HTML rocks</div>
3005 <div>HTML rocks</div>
3010 div with double-quoted attribute
3012 <div id="rock">HTML rocks</div>
3014 <div id="rock">HTML rocks</div>
3019 div with single-quoted attribute
3021 <div id='rock'>HTML rocks</div>
3023 <div id="rock">HTML rocks</div>
3028 div with unquoted attribute
3030 <div id=rock>HTML rocks</div>
3032 <div id="rock">HTML rocks</div>
3037 div with illegal double attributes
3039 <div align="center" align="right">HTML rocks</div>
3041 <div align="right">HTML rocks</div>
3046 HTML multiple attributes correction
3048 <p class="error" class="awesome">Awesome!</p>
3050 <p class="awesome">Awesome!</p>
3055 Table multiple attributes correction
3058 !+ class="error" class="awesome"| status
3063 <th class="awesome"> status
3071 <DIV ALIGN="center">HTML ROCKS</DIV>
3073 <div align="center">HTML ROCKS</div>
3079 text with amp in the middle of nowhere
3083 <p>Remember AT&T?
3088 text with character entity: eacute
3090 I always thought é was a cute letter.
3092 <p>I always thought é was a cute letter.
3097 text with undefined character entity: xacute
3099 I always thought &xacute; was a cute letter.
3101 <p>I always thought &xacute; was a cute letter.
3113 [[Media:Foobar.jpg]]
3115 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">Media:Foobar.jpg</a>
3120 Media link with text
3122 [[Media:Foobar.jpg|A neat file to look at]]
3124 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class='internal' title="Foobar.jpg">A neat file to look at</a>
3128 # FIXME: this is still bad HTML tag nesting
3130 Media link with nasty text
3131 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
3133 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
3135 <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>
3140 Media link to nonexistent file (bug 1702)
3142 [[Media:No such.jpg]]
3144 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class='new' title="No such.jpg">Media:No such.jpg</a>
3149 Image link to nonexistent file (bug 1850 - good)
3151 [[Image:No such.jpg]]
3153 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3158 :Image link to nonexistent file (bug 1850 - bad)
3160 [[:Image:No such.jpg]]
3162 <p><a href="/index.php?title=Image:No_such.jpg&action=edit" class="new" title="Image:No such.jpg">Image:No such.jpg</a>
3169 Character reference normalization in link text (bug 1938)
3171 [[Main Page|this&that]]
3173 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
3178 Empty attribute crash test (bug 2067)
3180 <font color="">foo</font>
3182 <p><font color="">foo</font>
3187 Empty attribute crash test single-quotes (bug 2067)
3189 <font color=''>foo</font>
3191 <p><font color="">foo</font>
3196 Attribute test: equals, then nothing
3198 <font color=>foo</font>
3205 Attribute test: unquoted value
3207 <font color=x>foo</font>
3209 <p><font color="x">foo</font>
3214 Attribute test: unquoted but illegal value (hash)
3216 <font color=#x>foo</font>
3218 <p><font color="#x">foo</font>
3223 Attribute test: no value
3225 <font color>foo</font>
3227 <p><font color="color">foo</font>
3232 Bug 2095: link with three closing brackets
3236 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
3241 Bug 2095: link with pipe and three closing brackets
3245 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
3250 Bug 2095: link with pipe and three closing brackets, version 2
3252 [[Main Page|[http://example.com/]]]
3254 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
3264 Template:Dangerous attribute
3266 " onmouseover="alert(document.cookie)
3270 Template:Dangerous style attribute
3272 border-size: expression(alert(document.cookie))
3278 <div style="float: right; {{{1}}}">Magic div</div>
3282 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
3284 <div title="{{test}}"></div>
3286 <div title="This is a test template"></div>
3291 Bug 2304: HTML attribute safety (dangerous template; 2309)
3293 <div title="{{dangerous attribute}}"></div>
3295 <div title=""></div>
3300 Bug 2304: HTML attribute safety (dangerous style template; 2309)
3302 <div style="{{dangerous style attribute}}"></div>
3309 Bug 2304: HTML attribute safety (safe parameter; 2309)
3311 {{div style|width: 200px}}
3313 <div style="float: right; width: 200px">Magic div</div>
3318 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
3320 {{div style|width: expression(alert(document.cookie))}}
3322 <div>Magic div</div>
3327 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
3329 {{div style|"><script>alert(document.cookie)</script>}}
3331 <div>Magic div</div>
3336 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
3338 {{div style|" ><script>alert(document.cookie)</script>}}
3340 <div style="float: right; ">Magic div</div>
3345 Bug 2304: HTML attribute safety (link)
3347 <div title="[[Main Page]]"></div>
3349 <div title="[[Main Page]]"></div>
3354 Bug 2304: HTML attribute safety (italics)
3356 <div title="''foobar''"></div>
3358 <div title="''foobar''"></div>
3363 Bug 2304: HTML attribute safety (bold)
3365 <div title="'''foobar'''"></div>
3367 <div title="'''foobar'''"></div>
3373 Bug 2304: HTML attribute safety (ISBN)
3375 <div title="ISBN 1234567890"></div>
3377 <div title="ISBN 1234567890"></div>
3382 Bug 2304: HTML attribute safety (RFC)
3384 <div title="RFC 1234"></div>
3386 <div title="RFC 1234"></div>
3391 Bug 2304: HTML attribute safety (PMID)
3393 <div title="PMID 1234567890"></div>
3395 <div title="PMID 1234567890"></div>
3400 Bug 2304: HTML attribute safety (web link)
3402 <div title="http://example.com/"></div>
3404 <div title="http://example.com/"></div>
3409 Bug 2304: HTML attribute safety (named web link)
3411 <div title="[http://example.com/ link]"></div>
3413 <div title="[http://example.com/ link]"></div>
3418 Bug 3244: HTML attribute safety (extension; safe)
3420 <div style="<nowiki>background:blue</nowiki>"></div>
3422 <div style="background:blue"></div>
3427 Bug 3244: HTML attribute safety (extension; unsafe)
3429 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
3436 Math section safety when disabled
3438 <math><script>alert(document.cookies);</script></math>
3440 <p><math><script>alert(document.cookies);</script></math>
3444 # More MSIE fun discovered by Tom Gilder
3447 MSIE CSS safety test: spurious slash
3449 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
3456 MSIE CSS safety test: hex code
3458 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
3465 MSIE CSS safety test: comment in url
3467 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
3469 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
3474 MSIE CSS safety test: comment in expression
3476 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
3478 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
3484 Table attribute legitimate extension
3487 !+ style="<nowiki>color:blue</nowiki>"| status
3492 <th style="color:blue"> status
3498 Table attribute safety
3501 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
3512 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
3515 Parser hook: empty input
3528 Parser hook: empty input using terminated empty elements
3541 Parser hook: empty input using terminated empty elements (space before)
3554 Parser hook: basic input
3568 Parser hook: case insensetive
3582 Parser hook: case insensetive, redux
3595 Parser hook: nested tags
3599 <tag><tag></tag></tag>
3610 Parser hook: basic arguments
3612 <tag width=200 height = "100" depth = '50' square></tag>
3631 Parser hook: argument containing a forward slash (bug 5344)
3633 <tag filename='/tmp/bla'></tag>
3639 string(8) "/tmp/bla"
3646 Parser hook: empty input using terminated empty elements (bug 2374)
3660 # </tag> should be output literally since there is no matching tag that begins it
3662 Parser hook: basic arguments using terminated empty elements (bug 2374)
3664 <tag width=200 height = "100" depth = '50' square/>
3687 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
3691 Parser hook: static parser hook not inside a comment
3693 <statictag>hello, world</statictag>
3694 <statictag action=flush/>
3702 Parser hook: static parser hook inside a comment
3704 <!-- <statictag>hello, world</statictag> -->
3705 <statictag action=flush/>
3711 # Nested template calls; this case was broken by Parser.php rev 1.506,
3715 Template:One-parameter
3717 (My parameter is: {{{1}}})
3721 Template:Map-one-parameter
3727 Nested template calls
3729 {{Map-one-parameter|One-parameter|param}}
3731 <p>(My parameter is: param)
3740 Sanitizer: Closing of open tags
3742 <s></s><table></table>
3744 <s></s><table></table>
3749 Sanitizer: Closing of open but not closed tags
3758 Sanitizer: Closing of closed but not open tags
3767 Sanitizer: Closing of closed but not open table tags
3769 Table not started</td></tr></table>
3771 <p>Table not started</td></tr></table>
3776 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
3778 <span id="æ: v">byte</span>[[#æ: v|backlink]]
3780 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a>
3785 Sanitizer: Validating the contents of the id attribute (bug 4515)
3791 Something, but defenetly not <br id="9" />...
3795 Language converter: output gets cut off unexpectedly (bug 5757)
3799 this bit is safe: }-
3801 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
3803 then we get cut off here: }-
3805 all additional text is vanished
3807 <p>this bit is safe: }-
3808 </p><p>but if we add a conversion instance: xxx
3809 </p><p>then we get cut off here: }-
3810 </p><p>all additional text is vanished
3815 Self closed html pairs (bug 5487)
3818 <center><font id="bug" />Centered text</center>
3819 <div><font id="bug2" />In div text</div>
3821 <div class="center"><font id="bug" />Centered text</div>
3822 <div><font id="bug2" />In div text</div>
3831 HTML bullet list, closed tags (bug 5497)
3846 HTML bullet list, unclosed tags (bug 5497)
3861 HTML ordered list, closed tags (bug 5497)
3876 HTML ordered list, unclosed tags (bug 5497)
3891 HTML nested bullet list, closed tags (bug 5497)
3916 HTML nested bullet list, open tags (bug 5497)
3940 HTML nested ordered list, closed tags (bug 5497)
3965 HTML nested ordered list, open tags (bug 5497)
3989 bug 5918: autonumbering
3991 [http://first/] [http://second] [ftp://ftp]
3995 [mailto:enclosed@mail.tld With target]
3997 [mailto:enclosed@mail.tld]
3999 mailto:inline@mail.tld
4001 <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>
4002 </p><p><a href="ftp://inlineftp" class='external free' title="ftp://inlineftp" rel="nofollow">ftp://inlineftp</a>
4003 </p><p><a href="mailto:enclosed@mail.tld" class='external text' title="mailto:enclosed@mail.tld" rel="nofollow">With target</a>
4004 </p><p><a href="mailto:enclosed@mail.tld" class='external autonumber' title="mailto:enclosed@mail.tld" rel="nofollow">[4]</a>
4005 </p><p><a href="mailto:inline@mail.tld" class='external free' title="mailto:inline@mail.tld" rel="nofollow">mailto:inline@mail.tld</a>
4011 # Security and HTML correctness
4012 # From Nick Jenkins' fuzz testing
4016 Fuzz testing: Parser13
4031 Fuzz testing: Parser14
4036 <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>
4037 http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
4039 <li class='toclevel-1'><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
4041 </td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
4046 Fuzz testing: Parser14-table
4051 <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>
4052 <table style="__TOC__">
4058 # Known to produce bogus xml (extra </td>)
4060 Fuzz testing: Parser16
4069 <th>https://</th><th></th><th></th><th>
4077 Fuzz testing: Parser21
4080 ! irc://{{ftp://a" onmouseover="alert('hello world');"
4085 <th> <a href="irc://{{ftp://a" class='external free' title="irc://{{ftp://a" rel="nofollow">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
4094 Fuzz testing: Parser22
4096 http://===r:::https://b
4100 <p><a href="http://===r:::https://b" class='external free' title="http://===r:::https://b" rel="nofollow">http://===r:::https://b</a>
4108 # Known to produce bad XML for now
4110 Fuzz testing: Parser24
4117 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
4118 <br style="onmouseover='alert(document.cookie);' " />
4120 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4125 <u class="|">} >
4126 <br style="onmouseover='alert(document.cookie);' " />
4128 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
4137 # Known to produce bad XML for now
4139 Fuzz testing: Parser25 (bug 6055)
4147 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
4149 <li class="||">
4150 blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
4155 Fuzz testing: URL adjacent extension (with space, clean)
4158 http://example.com <nowiki>junk</nowiki>
4160 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a> junk
4165 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
4168 http://example.com<nowiki>junk</nowiki>
4170 <p><a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a>junk
4175 Fuzz testing: URL adjacent extension (no space, dirty; pre)
4178 http://example.com<pre>junk</pre>
4180 <a href="http://example.com" class='external free' title="http://example.com" rel="nofollow">http://example.com</a><pre>junk</pre>