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 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-only test (not run by PHP parser)
25 # php php-only test (not run by the parsoid parser)
26 # showtitle make the first line the title
27 # comment run through Linker::formatComment() instead of main parser
28 # local format section links in edit comment text as local links
30 # For testing purposes, temporary articles can created:
31 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
32 # where '/' denotes a newline.
34 # This is the standard article assumed to exist.
59 MediaWiki:bad image list
61 * [[File:Bad.jpg]] except [[Nasty page]]
95 Template:echo_with_span
101 Template:echo_with_div
113 Template:table_attribs
116 |</noinclude>style="color: red"| Foo
138 This is a simple paragraph.
140 <p>This is a simple paragraph.
145 Paragraphs with extra newline spacing
168 Paragraphs with newline spacing with comment lines in between
176 <!--foo--><!--More than 1 comment disables stripping of this line!-->
233 Paragraphs with newline spacing with non-empty white-space lines in between
260 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
268 <!--foo--><!--More than 1 comment disables stripping of this line!-->
309 http://fr.wikipedia.org/wiki/🍺
310 <!-- EasterEgg we love beer, better be able be able to link to it -->
312 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
332 * plain''italic''plain
333 * plain''italic''plain''italic''plain
334 * plain'''bold'''plain
335 * plain'''bold'''plain'''bold'''plain
336 * plain''italic''plain'''bold'''plain
337 * plain'''bold'''plain''italic''plain
338 * plain''italic'''bold-italic'''italic''plain
339 * plain'''bold''bold-italic''bold'''plain
340 * plain'''''bold-italic'''italic''plain
341 * plain'''''bold-italic''bold'''plain
342 * plain''italic'''bold-italic'''''plain
343 * plain'''bold''bold-italic'''''plain
344 * plain l'''italic''plain
345 * plain l''''bold''' plain
348 </li><li> plain<i>italic</i>plain
349 </li><li> plain<i>italic</i>plain<i>italic</i>plain
350 </li><li> plain<b>bold</b>plain
351 </li><li> plain<b>bold</b>plain<b>bold</b>plain
352 </li><li> plain<i>italic</i>plain<b>bold</b>plain
353 </li><li> plain<b>bold</b>plain<i>italic</i>plain
354 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
355 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
356 </li><li> plain<i><b>bold-italic</b>italic</i>plain
357 </li><li> plain<b><i>bold-italic</i>bold</b>plain
358 </li><li> plain<i>italic<b>bold-italic</b></i>plain
359 </li><li> plain<b>bold<i>bold-italic</i></b>plain
360 </li><li> plain l'<i>italic</i>plain
361 </li><li> plain l'<b>bold</b> plain
367 ### 2-quote opening sequence tests
370 Italics and bold: 2-quote opening sequence: (2,2)
380 Italics and bold: 2-quote opening sequence: (2,3)
390 Italics and bold: 2-quote opening sequence: (2,4)
400 Italics and bold: 2-quote opening sequence: (2,5)
410 ### 3-quote opening sequence tests
414 Italics and bold: 3-quote opening sequence: (3,2)
424 Italics and bold: 3-quote opening sequence: (3,3)
434 Italics and bold: 3-quote opening sequence: (3,4)
444 Italics and bold: 3-quote opening sequence: (3,5)
454 ### 4-quote opening sequence tests
458 Italics and bold: 4-quote opening sequence: (4,2)
468 Italics and bold: 4-quote opening sequence: (4,3)
478 Italics and bold: 4-quote opening sequence: (4,4)
488 Italics and bold: 4-quote opening sequence: (4,5)
498 ### 5-quote opening sequence tests
502 Italics and bold: 5-quote opening sequence: (5,2)
512 Italics and bold: 5-quote opening sequence: (5,3)
522 Italics and bold: 5-quote opening sequence: (5,4)
526 <p><i><b>foo'</b></i>
532 Italics and bold: 5-quote opening sequence: (5,5)
541 ### multiple quote sequences in a line
544 Italics and bold: multiple quote sequences: (2,4,2)
548 <p><i>foo'<b>bar</b></i>
554 Italics and bold: multiple quote sequences: (2,4,3)
558 <p><i>foo'<b>bar</b></i>
564 Italics and bold: multiple quote sequences: (2,4,4)
568 <p><i>foo'<b>bar'</b></i>
574 Italics and bold: multiple quote sequences: (3,4,2)
584 Italics and bold: multiple quote sequences: (3,4,3)
593 ### other quote tests
596 Italics and bold: other quote tests: (2,3,5)
598 ''this is about '''foo's family'''''
600 <p><i>this is about <b>foo's family</b></i>
606 Italics and bold: other quote tests: (2,(3,3),2)
608 ''this is about '''foo's''' family''
610 <p><i>this is about <b>foo's</b> family</i>
616 Italics and bold: other quote tests: (3,2,3,2)
618 '''this is about ''foo'''s family''
620 <p><b>this is about <i>foo</i></b><i>s family</i>
626 Italics and bold: other quote tests: (3,2,3,3)
628 '''this is about ''foo'''s family'''
630 <p>'<i>this is about </i>foo<b>s family</b>
636 Italics and bold: other quote tests: (3,(2,2),3)
638 '''this is about ''foo's'' family'''
640 <p><b>this is about <i>foo's</i> family</b>
646 Italicized possessive
648 The ''[[Main Page]]'''s talk page.
650 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
659 Non-html5 tags should be accepted
661 <center>''foo''</center>
664 <strike>''foo''</strike>
667 <center><i>foo</i></center>
668 <p><big><i>foo</i></big>
669 <font><i>foo</i></font>
670 <strike><i>foo</i></strike>
676 ### <nowiki> test cases
680 <nowiki> unordered list
682 <nowiki>* This is not an unordered list item.</nowiki>
684 <p>* This is not an unordered list item.
691 <nowiki>Lorem ipsum dolor
712 :There is not nowiki.
713 :There is <nowiki>nowiki</nowiki>.
715 #There is not nowiki.
716 #There is <nowiki>nowiki</nowiki>.
718 *There is not nowiki.
719 *There is <nowiki>nowiki</nowiki>.
721 <dl><dd>There is not nowiki.
722 </dd><dd>There is nowiki.
724 <ol><li>There is not nowiki.
725 </li><li>There is nowiki.
727 <ul><li>There is not nowiki.
728 </li><li>There is nowiki.
734 Entities inside <nowiki>
736 <nowiki><</nowiki>
747 Comments and Indent-Pre
749 <!-- comment 1 --> asdf
751 <!-- comment 1 --> asdf
754 <!-- comment 1 --> asdf
755 <!-- comment 2 -->xyz
757 <!-- comment 1 --> asdf
758 <!-- comment 2 --> xyz
814 asdf<!-- comment 1 -->jkl
824 <!-- foo --> b <!-- bar -->
838 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
844 Comment semantics and delimiters
846 <!-- --><!----><!-----><!------>
852 Comment semantics and delimiters, redux
854 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
855 -- foo -- funky huh? ... -->
861 Comment semantics and delimiters: directors cut
863 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
864 everything starting with < followed by !-- until the first -- and > we see,
865 that wouldn't be valid XML however, since in XML -- has to terminate a comment
873 Comment semantics: nesting
875 <!--<!-- no, we're not going to do anything fancy here -->-->
882 Comment semantics: unclosed comment at end
884 <!--This comment will run out to the end of the document
890 Comment in template title
899 Comment on its own line post-expand
911 Comment on its own line post-expand with non-significant whitespace
923 ### paragraph wraping tests
937 Block tag on one line
949 Block tag on both lines
961 Multiple lines without block tags
979 Empty lines between lines with block tags
1009 ### Preformatted text
1018 And a [[Main Page|link]]
1024 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1029 Ident preformatting with inline content
1040 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1057 Regression with preformatted in <center>
1070 # Expected output in the following test is not really expected (there should be
1071 # <pre> in the output) -- it's only testing for well-formedness.
1073 Bug 6200: Preformatted in <blockquote>
1086 <pre> with attributes (bug 3202)
1088 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1090 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1095 <pre> with width attribute (bug 3202)
1097 <pre width="8">Narrow screen goodies</pre>
1099 <pre width="8">Narrow screen goodies</pre>
1104 <pre> with forbidden attribute (bug 3202)
1106 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1108 <pre width="8">Narrow screen goodies</pre>
1113 Entities inside <pre>
1122 <pre> with forbidden attribute values (bug 3202)
1124 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1126 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1131 <nowiki> inside <pre> (bug 13238)
1139 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1147 <pre><nowiki>Foo</nowiki></pre>
1152 <nowiki> and <pre> preference (first one wins)
1183 </pre> inside nowiki
1185 <nowiki></pre></nowiki>
1192 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1200 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1210 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1222 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1243 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1247 {{echo| foo}}{{echo| bar}}
1252 {{echo|<!--cmt--> foo}}
1254 <!--cmt-->{{echo| foo}}
1256 {{echo|{{echo| }}bar}}
1274 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1311 Templates: Single-line variant of parameter whitespace stripping test
1317 {{echo|{{echo| a}}}}
1319 {{echo|1={{echo| a}}}}
1332 Templates: Strip whitespace from named parameters, but not positional ones
1360 ### Parsoid-centric tests for testing RT edge cases for pre
1364 1a. Indent-Pre and Comments
1377 1b. Indent-Pre and Comments
1390 1c. Indent-Pre and Comments
1403 2a. Indent-Pre and tables
1424 2b. Indent-Pre and tables
1440 2c. Indent-Pre and tables (bug 42252)
1457 3a. Indent-Pre and block tags (single-line html)
1465 <pre><span> foo </span>
1470 3b. Indent-Pre and block tags (pre-content on separate line)
1522 4. Multiple spaces at start-of-line
1541 5. White-space in indent-pre
1542 NOTE: the white-space char on 2nd line is significant
1555 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
1559 HTML-pre: 1. embedded newlines
1595 HTML-pre: 2: indented text
1608 HTML-pre: 3: other wikitext
1629 ### Definition lists
1636 <dl><dt> name </dt><dd> Definition
1642 Definition list for indentation only
1646 <dl><dd> Indented text
1652 Definition list with no space
1656 <dl><dt>name</dt><dd>Definition
1662 Definition list with URL link
1664 ; http://example.com/ : definition
1666 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt><dd> definition
1672 Definition list with bracketed URL link
1674 ;[http://www.example.com/ Example]:Something about it
1676 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt><dd>Something about it
1682 Definition list with wikilink containing colon
1684 ; [[Help:FAQ]]: The least-read page on Wikipedia
1686 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt><dd> The least-read page on Wikipedia
1691 # At Brion's and JeLuF's insistence... :)
1693 Definition list with news link containing colon
1695 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
1697 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
1703 Malformed definition list with colon
1705 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
1707 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop
1713 Definition lists: colon in external link text
1715 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
1717 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up
1723 Definition lists: colon in HTML attribute
1725 ;<b style="display: inline">bold</b>
1727 <dl><dt><b style="display: inline">bold</b>
1733 Definition lists: self-closed tag
1735 ;one<br/>two : two-line fun
1737 <dl><dt>one<br />two </dt><dd> two-line fun
1743 Bug 11748: Literal closing tags
1747 <dd>test test test test test</dd>
1749 <dd>test test test test test</dd>
1754 <dd>test test test test test</dd>
1756 <dd>test test test test test</dd>
1762 Definition and unordered list using wiki syntax nested in unordered list using html tags.
1765 ; term : description
1771 <dl><dt> term </dt><dd> description
1782 Definition list with empty definition and following paragraph
1787 <dl><dt> term</dt><dd>
1794 Nested definition lists using html syntax
1811 Definition Lists: No nesting: Multiple dd's
1825 Definition Lists: Indentation: Regular
1841 Definition Lists: Indentation: Missing 1st level
1855 Definition Lists: Indentation: Multi-level indent
1859 <dl><dd><dl><dd><dl><dd>i3
1867 Definition Lists: Hacky use to indent tables
1874 should be left alone
1876 <dl><dd><dl><dd><table>
1881 </td></tr></table></dd></dl></dd></dl>
1883 should be left alone
1886 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
1887 ## as an empty dt item. It also ignores all but the last ";" when followed
1888 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
1889 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
1892 ## Ex: ";;t2 ::d2" is transformed into:
1904 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
1905 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
1916 ## All Parsoid only definition list tests have this difference.
1918 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
1919 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
1922 Table / list interaction: indented table with lists in table contents
1944 </td></tr></table></dd></dl>
1949 Table / list interaction: lists nested in tables nested in indented lists
1974 </td></tr></table></dd></dl>
1982 Definition Lists: Nesting: Multi-level (Parsoid only)
2012 Definition Lists: Nesting: Test 2 (Parsoid only)
2032 Definition Lists: Nesting: Test 3 (Parsoid only)
2060 Definition Lists: Nesting: Test 4
2065 <dl><dd><dl><dd><dl><dt>t3
2075 Definition Lists: Mixed Lists: Test 1
2081 <dl><dd><dl><dt><ul><li> foo
2093 Definition Lists: Mixed Lists: Test 2
2107 Definition Lists: Mixed Lists: Test 3
2112 <ul><li><dl><dd><dl><dd><dl><dd> d1
2123 Definition Lists: Mixed Lists: Test 4
2128 <ul><li><dl><dt>d1 </dt><dd>d2
2129 </dd><dt>d3 </dt><dd>d4
2137 Definition Lists: Mixed Lists: Test 5
2152 Definition Lists: Mixed Lists: Test 6
2157 <ol><li><ul><li><dl><dd>d1
2169 Definition Lists: Mixed Lists: Test 7
2183 Definition Lists: Mixed Lists: Test 8
2199 Definition Lists: Mixed Lists: Test 9
2203 <ul><li><dl><dt>foo </dt><dd>bar
2211 Definition Lists: Mixed Lists: Test 10
2215 <ul><li><ol><li><dl><dt>foo </dt><dd>bar
2224 Definition Lists: Mixed Lists: Test 11
2229 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt><dd><ul><li><dl><dt><dl><dt>bar
2234 <dl><dt>boo </dt><dd>baz
2245 Definition Lists: Weird Ones: Test 1
2247 *#;*::;; foo : bar (who uses this?)
2249 <ul><li><ol><li><dl><dt> foo </dt><dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)
2265 External links: non-bracketed
2267 Non-bracketed: http://example.com
2269 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2274 External links: numbered
2276 Numbered: [http://example.com]
2277 Numbered: [http://example.net]
2278 Numbered: [http://example.com]
2280 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
2281 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
2282 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
2287 External links: specified text
2289 Specified text: [http://example.com link]
2291 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
2296 External links: trail
2298 Linktrails should not work for external links: [http://example.com link]s
2300 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
2305 External links: dollar sign in URL
2307 http://example.com/1$2345
2309 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
2314 External links: dollar sign in URL (named)
2316 [http://example.com/1$2345]
2318 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
2323 External links: open square bracket forbidden in URL (bug 4377)
2325 http://example.com/1[2345
2327 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
2332 External links: open square bracket forbidden in URL (named) (bug 4377)
2334 [http://example.com/1[2345]
2336 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
2341 External links: nowiki in URL link text (bug 6230)
2343 [http://example.com/ <nowiki>''example site''</nowiki>]
2345 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
2350 External links: newline forbidden in text (bug 6230 regression check)
2352 [http://example.com/ first
2355 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
2361 External links: Pipe char between url and text
2363 [http://example.com | link]
2365 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
2370 External links: protocol-relative URL in brackets
2372 [//example.com/ Test]
2374 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
2379 External links: protocol-relative URL in brackets without text
2383 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
2388 External links: protocol-relative URL in free text is left alone
2392 <p>//example.com/Foo
2397 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
2399 foo//example.com/Foo
2401 <p>foo//example.com/Foo
2408 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2410 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2415 External image from https
2417 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2419 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2424 Link to non-http image, no img tag
2426 Link to non-http image, no img tag: ftp://example.com/test.jpg
2428 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
2433 External links: terminating separator
2435 Terminating separator: http://example.com/thing,
2437 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
2442 External links: intervening separator
2444 Intervening separator: http://example.com/1,2,3
2446 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
2451 External links: old bug with URL in query
2453 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
2455 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
2460 External links: old URL-in-URL bug, mixed protocols
2462 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
2464 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
2469 External links: URL in text
2471 URL in text: [http://example.com http://example.com]
2473 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2478 External links: Clickable images
2480 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
2482 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a>
2487 External links: raw ampersand
2489 Old & use: http://x&y
2491 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2496 External links: encoded ampersand
2498 Old & use: http://x&y
2500 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2505 External links: encoded equals (bug 6102)
2507 http://example.com/?foo=bar
2509 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
2514 External links: [raw ampersand]
2516 Old & use: [http://x&y]
2518 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2523 External links: [encoded ampersand]
2525 Old & use: [http://x&y]
2527 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2532 External links: [encoded equals] (bug 6102)
2534 [http://example.com/?foo=bar]
2536 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
2541 External links: [IDN ignored character reference in hostname; strip it right off]
2543 [http://e‌xample.com/]
2545 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
2549 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
2550 # Where an external link could easily circumvent the sanitization of the text of
2551 # a link like this (where an IDN-ignore character is in the URL somewhere), this
2552 # test demands a higher standard. That's a bit strange.
2556 # http://example.com -> [http://example.com|http://example.com]
2557 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
2559 # The first example is sanitized, but the second is not. Any security benefits
2560 # from this production are trivial to circumvent. Either remove this test and
2561 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
2562 # the test accordingly.
2567 External links: IDN ignored character reference in hostname; strip it right off
2569 http://e‌xample.com/
2571 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
2576 External links: www.jpeg.org (bug 554)
2580 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
2585 External links: URL within URL (original bug 2)
2587 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
2589 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
2594 BUG 361: URL inside bracketed URL
2596 [http://www.example.com/foo http://www.example.com/bar]
2598 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
2603 BUG 361: URL within URL, not bracketed
2605 http://www.example.com/foo?=http://www.example.com/bar
2607 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
2612 BUG 289: ">"-token in URL-tail
2614 http://www.example.com/<hello>
2616 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
2621 BUG 289: literal ">"-token in URL-tail
2623 http://www.example.com/<b>html</b>
2625 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
2630 BUG 289: ">"-token in bracketed URL
2632 [http://www.example.com/<hello> stuff]
2634 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
2639 BUG 289: literal ">"-token in bracketed URL
2641 [http://www.example.com/<b>html</b> stuff]
2643 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
2648 BUG 289: literal double quote at end of URL
2650 http://www.example.com/"hello"
2652 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
2657 BUG 289: literal double quote in bracketed URL
2659 [http://www.example.com/"hello" stuff]
2661 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
2666 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
2668 [http://www.example.com test]
2670 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
2675 External links: link text with spaces
2677 [http://www.example.com a b c]
2678 [http://www.example.com ''a'' ''b'']
2680 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
2681 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
2686 External links: wiki links within external link (Bug 3695)
2688 [http://example.com [[wikilink]] embedded in ext link]
2690 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
2695 BUG 787: Links with one slash after the url protocol are invalid
2699 [http:/example.com title]
2701 <p>http:/example.com
2702 </p><p>[http:/example.com title]
2707 Bracketed external links with template-generated invalid target
2709 [{{echo|http:/example.com}} title]
2711 <p>[http:/example.com title]
2716 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
2718 ''[http://example.com text'']
2719 [http://example.com '''text]'''
2720 ''Something [http://example.com in italic'']
2721 ''Something [http://example.com mixed''''', even bold]'''
2722 '''''Now [http://example.com both''''']
2724 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
2725 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
2726 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
2727 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
2728 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
2734 Bug 4781: %26 in URL
2736 http://www.example.com/?title=AT%26T
2738 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
2742 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
2743 # % is actually legal in HTML5. Any change in output would need testing though.
2745 Bug 4781, 5267: %25 in URL
2747 http://www.example.com/?title=100%25_Bran
2749 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
2754 Bug 4781, 5267: %28, %29 in URL
2756 http://www.example.com/?title=Ben-Hur_%281959_film%29
2758 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
2764 Bug 4781: %26 in autonumber URL
2766 [http://www.example.com/?title=AT%26T]
2768 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
2773 Bug 4781, 5267: %26 in autonumber URL
2775 [http://www.example.com/?title=100%25_Bran]
2777 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
2782 Bug 4781, 5267: %28, %29 in autonumber URL
2784 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
2786 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
2792 Bug 4781: %26 in bracketed URL
2794 [http://www.example.com/?title=AT%26T link]
2796 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
2801 Bug 4781, 5267: %26 in bracketed URL
2803 [http://www.example.com/?title=100%25_Bran link]
2805 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
2810 Bug 4781, 5267: %28, %29 in bracketed URL
2812 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
2814 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
2819 External link containing double-single-quotes in text '' (bug 4598 sanity check)
2821 Some [http://example.com/ pretty ''italics'' and stuff]!
2823 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
2828 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
2830 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
2832 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
2837 External link containing double-single-quotes with no space separating the url from text in italics
2839 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
2841 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a>
2846 URL-encoding in URL functions (single parameter)
2848 {{localurl:Some page|amp=&}}
2850 <p>/index.php?title=Some_page&amp=&
2855 URL-encoding in URL functions (multiple parameters)
2857 {{localurl:Some page|q=?&=&}}
2859 <p>/index.php?title=Some_page&q=?&amp=&
2866 http://example.com/index.php?foozoid%5B%5D=bar
2868 http://example.com/index.php?foozoid[]=bar
2870 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
2871 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
2876 IPv6 urls (bug 21261)
2880 http://[2404:130:0:1000::187:2]/index.php
2882 <p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
2887 Non-extlinks in brackets
2896 [{{echo|foo}} ''bar'']
2897 [{{echo|foo}}l's] errand
2898 [{{echo|foo}}l's errand]
2900 [url=http://example.com]
2913 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
2924 Normal text. '''Bold text.''' Normal text. ''Italic text.''
2926 Normal text. '''''Bold italic text.''''' Normal text.
2928 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
2929 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
2935 Unclosed and unmatched quotes
2937 '''''Bold italic text '''with bold deactivated''' in between.'''''
2939 '''''Bold italic text ''with italic deactivated'' in between.'''''
2943 ..spanning two paragraphs (should not work).'''
2945 '''Bold tag left open
2947 ''Italic tag left open
2951 <!-- Unmatching number of opening, closing tags: -->
2952 '''This year''''s election ''should'' beat '''last year''''s.
2954 ''Tom'''s car is bigger than ''Susan'''s.
2956 Plain ''italic'''s plain
2958 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
2959 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
2960 </p><p><b>Bold text..</b>
2961 </p><p>..spanning two paragraphs (should not work).
2962 </p><p><b>Bold tag left open</b>
2963 </p><p><i>Italic tag left open</i>
2965 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
2966 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
2967 </p><p>Plain <i>italic'</i>s plain
2974 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
2977 # This should not produce <table></table> as <table><tr><td></td></tr></table>
2978 # is the bare minimun required by the spec, see:
2979 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
2981 A table with no data.
2987 # A table with nothing but a caption is invalid XHTML, we might want to render
2988 # this as <p>caption</p>
2990 A table with nothing but a caption
2998 </caption><tr><td></td></tr></table>
3003 A table with caption with default-spaced attributes and a table row
3006 |+ style="color: red;" | caption1
3012 <caption style="color: red;"> caption1
3021 A table with captions with non-default spaced attributes and a table row
3024 |+style="color: red;"|caption2
3025 |+ style="color: red;"| caption3
3031 <caption style="color: red;">caption2
3033 <caption style="color: red;"> caption3
3042 Table td-cell syntax variations
3046 | foo bar foo || baz
3047 | style='color:red;' | baz
3048 | style='color:red;' || baz
3055 <td> foo bar foo </td>
3058 <td style="color:red;"> baz
3060 <td> style='color:red;' </td>
3088 Simple table but with multiple dashes for row wikitext
3106 Multiplication table
3108 {| border="1" cellpadding="2"
3109 |+Multiplication table
3111 ! × !! 1 !! 2 !! 3
3129 <table border="1" cellpadding="2">
3130 <caption>Multiplication table
3177 Accept "||" in table headings
3192 Accept "||" in indented table headings
3202 </th></tr></table></dd></dl>
3207 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
3224 Accept "| !" at start of line in tables (ignore !-attribute)
3228 | !style="color:red" | bar
3240 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
3244 |style='color:red;'|+1
3245 |style='color:blue;'|-1
3257 <td style="color:red;">+1
3259 <td style="color:blue;">-1
3283 |rowspan=2| Cell 2, row 1 (and 2)
3294 <td rowspan="2"> Cell 2, row 1 (and 2)
3312 {| bgcolor=#ABCDEF border=2
3317 |the original table again
3325 <table bgcolor="#ABCDEF" border="2">
3333 <td>the original table again
3339 Invalid attributes in table cell (bug 1830)
3354 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
3357 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
3361 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
3362 <td>]" onmouseover="alert(document.cookie)">test
3371 Indented table markup mixed with indented pre content (proposed in bug 6200)
3376 Text that should be rendered preformatted
3384 <pre>Text that should be rendered preformatted
3393 Template-generated table cell attributes and cell content
3401 <td style="color: red"> Foo
3407 Table with row followed by newlines and table heading
3425 Table with empty line following the start tag
3442 # FIXME: Preserve the attribute properly (with an empty string as value) in
3443 # the PHP parser. Parsoid implements the behavior below.
3445 Table attributes with empty value
3461 Wikitext table with a lot of comments
3484 Wikitext table with double-line table cell
3501 Table cell with a single comment
3517 # The expected HTML structure in this test is debatable. The PHP parser does
3518 # not parse this kind of table at all. The main focus for Parsoid is on
3519 # round-tripping, so this output is ok for now. TODO: revisit!
3521 Wikitext table with html-syntax row (Parsoid)
3533 <td>foo</td></tr></tbody></table>
3540 Plain link, capitalized
3544 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
3549 Plain link, uncapitalized
3553 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
3560 [[Main Page|The Main Page]]
3562 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
3571 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
3576 Broken link with fragment
3578 [[Zigzagzogzagzig#zug]]
3580 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
3585 Special page link with fragment
3587 [[Special:Version#anchor]]
3589 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
3594 Nonexistent special page link with fragment
3596 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
3598 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
3605 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
3607 <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>
3614 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
3616 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
3627 Bug 43661: Piped links with identical prefixes
3629 [[prefixed article|prefixed articles with spaces]]
3631 [[prefixed article|prefixed articlesaoeu]]
3633 [[Main Page|Main Page test]]
3635 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
3636 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
3637 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
3643 Link with HTML entity in suffix / tail
3645 [[Main Page]]", [[Main Page]]a
3647 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
3652 Link with 3 brackets
3661 Piped link with 3 brackets
3663 [[[main page|the main page]]]
3665 <p>[[[main page|the main page]]]
3670 Link with multiple pipes
3672 [[Main Page|The|Main|Page]]
3674 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
3681 [[Talk:Parser testing]], [[Meta:Disclaimers]]
3683 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
3688 Piped link to namespace
3690 [[Meta:Disclaimers|The disclaimers]]
3692 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
3699 [[Usually caused by a typo (oops}]]
3701 <p>[[Usually caused by a typo (oops}]]
3706 Link containing % (not as a hex sequence)
3710 <p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a>
3715 Link containing % as a single hex sequence interpreted to char
3719 <p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a>
3724 Link containing % as a double hex sequence interpreted to hex sequence
3728 <p>[[7%2525 Solution]]
3733 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
3734 Example for such a section: == < ==
3736 [[%23%3c]][[%23%3e]]
3738 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
3743 Link containing "<#" and ">#" as a hex sequences
3745 [[%3c%23]][[%3e%23]]
3747 <p>[[%3c%23]][[%3e%23]]
3752 Link containing double-single-quotes '' (bug 4598)
3754 [[Lista d''e paise d''o munno]]
3756 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
3761 Link containing double-single-quotes '' in text (bug 4598 sanity check)
3763 Some [[Link|pretty ''italics'' and stuff]]!
3765 <p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
3770 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
3772 ''Some [[Link|pretty ''italics'' and stuff]]!
3774 <p><i>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
3779 Link with double quotes in title part (literal) and alternate part (interpreted)
3781 [[File:Denys Savchenko ''Pentecoste''.jpg]]
3785 [[''Pentecoste''|Pentecoste]]
3787 [[''Pentecoste''|''Pentecoste'']]
3789 <p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
3790 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
3791 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
3792 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a>
3797 Broken image links with HTML captions (bug 39700)
3799 [[File:Nonexistent|<script></script>]]
3800 [[File:Nonexistent|100px|<script></script>]]
3801 [[File:Nonexistent|<]]
3802 [[File:Nonexistent|a<i>b</i>c]]
3804 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
3805 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
3806 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
3807 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
3814 [[http://www.example.com]]
3816 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
3821 Plain link to URL with link text
3823 [[http://www.example.com Link text]]
3825 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
3830 Plain link to protocol-relative URL
3832 [[//www.example.com]]
3834 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
3839 Plain link to protocol-relative URL with link text
3841 [[//www.example.com Link text]]
3843 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
3848 Plain link to page with question mark in title
3854 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
3855 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
3860 # I'm fairly sure the expected result here is wrong.
3861 # We want these to be URL links, not pseudo-pages with URLs for titles....
3862 # However the current output is also pretty screwy.
3865 # I'm changing it to match the current output--it arguably makes more
3866 # sense in the light of the test above. Old expected result was:
3867 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
3869 # But I think this test is bordering on "garbage in, garbage out" anyway.
3874 Piped link to URL: [[http://www.example.com|an example URL]]
3876 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
3881 BUG 2: [[page|http://url/]] should link to page, not http://url/
3883 [[Main Page|http://url/]]
3885 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
3890 BUG 337: Escaped self-links should be bold
3894 [[Bug462]] [[Bug462]]
3896 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
3901 Self-link to section should not be bold
3905 [[Main Page#section]]
3907 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
3918 Self-link to numeric title
3924 <p><strong class="selflink">0</strong>
3929 Link to numeric-equivalent title
3935 <p><a href="/wiki/00" title="00">00</a>
3940 <nowiki> inside a link
3942 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
3944 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
3949 Non-breaking spaces in title
3951 [[ Main Page ]]
3953 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
3958 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
3964 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
3969 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
3975 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
3980 Internal link with en linktrail: no apostrophes (bug 27473)
3986 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
3991 Internal link with ca linktrail with apostrophes (bug 27473)
3997 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
4002 Internal link with kaa linktrail with apostrophes (bug 27473)
4008 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
4013 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
4021 [http://wp.org ''foo'']
4023 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
4024 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
4025 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
4026 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
4031 ### Interwiki links (see maintenance/interwiki.sql)
4035 Inline interwiki link
4037 [[MeatBall:SoftSecurity]]
4039 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
4044 Inline interwiki link with empty title (bug 2372)
4048 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
4053 Interwiki link encoding conversion (bug 1636)
4055 *[[Wikipedia:ro:Olteniţa]]
4056 *[[Wikipedia:ro:Olteniţa]]
4058 <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>
4059 </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>
4065 Interwiki link with fragment (bug 2130)
4067 [[MeatBall:SoftSecurity#foo]]
4069 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
4084 Double interlanguage link
4095 Interlanguage link, with prefix links
4107 Double interlanguage link, with prefix links (bug 8897)
4120 Parsoid-specific test: Wikilinks with should RT properly
4126 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
4144 Broken br tag sanitization
4153 Incorrecly removing closing slashes from correctly formed XHTML
4155 <br style="clear:both;" />
4157 <p><br style="clear:both;" />
4162 Failing to transform badly formed HTML into correct XHTML
4164 <br style="clear: left;">
4165 <br style="clear: right;">
4166 <br style="clear: both;">
4168 <p><br style="clear: left;" />
4169 <br style="clear: right;" />
4170 <br style="clear: both;" />
4175 Handling html with a div self-closing tag
4184 <p><div title />
4188 <p><div title=bar />
4189 <div title=bar/>
4191 <div title="bar/"></div>
4197 Handling html with a br self-closing tag
4206 <p><br title="title" />
4207 <br title="title" />
4216 Horizontal ruler (should it add that extra space?)
4230 Horizontal ruler -- 4+ dashes render hr
4239 Horizontal ruler -- eats additional dashes on the same line
4248 Horizontal ruler -- does not collapse dashes on consecutive lines
4259 Horizontal ruler -- <4 dashes render as plain text
4268 Horizontal ruler -- Supports content following dashes on same line
4277 ### Block-level elements
4300 <ol><li>Numbered list
4317 ***#Number on level 4
4319 **#Number on level 3
4320 **#Number on level 3
4324 #** Level 3, but ordered
4327 <ol><li> with numbers
4329 <ul><li> and bullets
4331 <ol><li> and numbers
4333 </li><li>bullets again
4334 <ul><li>bullet level 2
4335 <ul><li>bullet level 3
4336 <ol><li>Number on level 4
4339 </li><li>bullet level 2
4340 <ol><li>Number on level 3
4341 </li><li>Number on level 3
4344 <ol><li>number level 2
4347 <ul><li><ul><li> Level 3
4351 <ol><li><ul><li><ul><li> Level 3, but ordered
4385 Nested lists 3 (first element empty)
4398 Nested lists 4 (first element empty)
4411 Nested lists 5 (both elements empty)
4424 Nested lists 6 (both elements empty)
4437 Nested lists 7 (skip initial nesting levels)
4441 <ul><li><ul><li><ul><li> foo
4449 Nested lists 8 (multiple nesting transitions)
4457 <ul><li><ul><li> bar
4467 1. Lists with start-of-line-transparent tokens before bullets: Comments
4481 2. Lists with start-of-line-transparent tokens before bullets: Template close
4493 Unbalanced closing block tags break a list
4494 (Disabled since php parser generates broken html -- relies on Tidy to fix up)
4504 </li></ul></div><div>
4510 Unbalanced closing non-block tags don't break a list
4511 (Disabled since php parser generates broken html -- relies on Tidy to fix up)
4521 <ul><li>a<span></span>
4527 Unclosed formatting tags that straddle lists are closed and reopened
4528 (Disabled since php parser generates broken html -- relies on Tidy to fix up)
4536 </li><li> <s> b </s>
4541 List embedded in a non-block tag
4542 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
4550 <p><small></small></p>
4556 <p><small></small></p>
4560 List items are not parsed correctly following a <pre> block (bug 785)
4566 <ul><li> <pre>foo</pre>
4567 </li><li> <pre>bar</pre>
4574 List items from template
4585 * notSOL{{inner list}}
4604 List interrupted by empty line or heading
4614 <ul><li><ul><li> bar
4617 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a>]</span> <span class="mw-headline" id="A_heading">A heading</span></h2>
4618 <ul><li> Another list item
4624 Multiple list tags generated by templates
4639 Single-comment whitespace lines dont break lists, but multi-comment whitespace lines do
4642 <!--This line will NOT split the list-->
4644 <!--This line will NOT split the list either-->
4646 <!--foo--> <!--This line with more than 1 comment will split the list-->
4663 Magic Word: {{CURRENTDAY}}
4672 Magic Word: {{CURRENTDAY2}}
4681 Magic Word: {{CURRENTDAYNAME}}
4690 Magic Word: {{CURRENTDOW}}
4699 Magic Word: {{CURRENTMONTH}}
4708 Magic Word: {{CURRENTMONTHABBREV}}
4710 {{CURRENTMONTHABBREV}}
4717 Magic Word: {{CURRENTMONTHNAME}}
4719 {{CURRENTMONTHNAME}}
4726 Magic Word: {{CURRENTMONTHNAMEGEN}}
4728 {{CURRENTMONTHNAMEGEN}}
4735 Magic Word: {{CURRENTTIME}}
4744 Magic Word: {{CURRENTWEEK}} (@bug 4594)
4753 Magic Word: {{CURRENTYEAR}}
4762 Magic Word: {{FULLPAGENAME}}
4764 title=[[User:Ævar Arnfjörð Bjarmason]]
4768 <p>User:Ævar Arnfjörð Bjarmason
4773 Magic Word: {{FULLPAGENAMEE}}
4775 title=[[User:Ævar Arnfjörð Bjarmason]]
4779 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
4784 Magic Word: {{NAMESPACE}}
4786 title=[[User:Ævar Arnfjörð Bjarmason]]
4795 Magic Word: {{NAMESPACEE}}
4797 title=[[User:Ævar Arnfjörð Bjarmason]]
4806 Magic Word: {{NAMESPACENUMBER}}
4808 title=[[User:Ævar Arnfjörð Bjarmason]]
4817 Magic Word: {{NUMBEROFFILES}}
4826 Magic Word: {{PAGENAME}}
4828 title=[[User:Ævar Arnfjörð Bjarmason]]
4832 <p>Ævar Arnfjörð Bjarmason
4837 Magic Word: {{PAGENAME}} with metacharacters
4839 title=[['foo & bar = baz']]
4843 <p><i>'foo & bar = baz'</i>
4848 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
4850 title=[[*RFC 1234 http://example.com/]]
4854 <p>*RFC 1234 http://example.com/
4859 Magic Word: {{PAGENAMEE}}
4861 title=[[User:Ævar Arnfjörð Bjarmason]]
4865 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
4870 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
4872 title=[[*RFC 1234 http://example.com/]]
4876 <p>*RFC_1234_http://example.com/
4881 Magic Word: {{REVISIONID}}
4890 Magic Word: {{SCRIPTPATH}}
4899 Magic Word: {{SERVER}}
4903 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
4908 Magic Word: {{SERVERNAME}}
4917 Magic Word: {{SITENAME}}
4926 Case-sensitive magic words, when cased differently, should just be template transclusions
4933 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
4934 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
4935 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
4936 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
4941 Case-insensitive magic words should still work with weird casing.
4951 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
4956 Namespace 1 {{ns:1}}
4965 Namespace 1 {{ns:01}}
4974 Namespace 0 {{ns:0}} (bug 4783)
4982 Namespace 0 {{ns:00}} (bug 4783)
4990 Namespace -1 {{ns:-1}}
4999 Namespace User {{ns:User}}
5008 Namespace User talk {{ns:User_talk}}
5017 Namespace User talk {{ns:uSeR tAlK}}
5026 Namespace File {{ns:File}}
5035 Namespace File {{ns:Image}}
5044 Namespace (lang=de) Benutzer {{ns:User}}
5055 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
5061 <p>Benutzer Diskussion
5069 {{urlencode:hi world?!}}
5070 {{urlencode:hi world?!|WIKI}}
5071 {{urlencode:hi world?!|PATH}}
5072 {{urlencode:hi world?!|QUERY}}
5085 Magic links: internal link to RFC (bug 479)
5089 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
5094 Magic links: RFC (bug 479)
5098 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
5103 Magic links: ISBN (bug 1937)
5107 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
5112 Magic links: PMID incorrectly converts space to underscore
5116 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
5125 Nonexistent template
5127 {{thistemplatedoesnotexist}}
5129 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
5134 Template with invalid target containing tags
5136 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5138 <p>{{a<b>b</b>|foo|a=b|a = b}}
5143 Template with invalid target containing unclosed tag
5145 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5147 <p>{{a<b>|foo|a=b|a = b}}</b>
5154 This is a test template
5162 <p>This is a test template
5167 Template with explicit namespace
5171 <p>This is a test template
5179 This is a test template with parameter {{{param}}}
5185 {{paramtest|param=foo}}
5187 <p>This is a test template with parameter foo
5192 Template:paramtestnum
5198 Template unnamed parameter
5200 {{paramtestnum|Main Page|the main page}}
5202 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
5207 Template:templatesimple
5213 Template:templateredirect
5215 #redirect [[Template:templatesimple]]
5219 Template:templateasargtestnum
5225 Template:templateasargtest
5227 {{template{{{templ}}}}}
5231 Template:templateasargtest2
5237 Template with template name as unnamed argument
5239 {{templateasargtestnum|templatesimple}}
5246 Template with template name as argument
5248 {{templateasargtest|templ=simple}}
5255 Template with template name as argument (2)
5257 {{templateasargtest2|templ=templatesimple}}
5264 Template:templateasargtestdefault
5266 {{{{{templ|templatesimple}}}}}
5276 Template with default value
5278 {{templateasargtestdefault}}
5285 Template with default value (value set)
5287 {{templateasargtestdefault|templ=templa}}
5296 {{templateredirect}}
5303 Template with argument in separate line
5305 {{ templateasargtest |
5313 Template with complex template as argument
5316 param ={{ templateasargtest |
5319 <p>This is a test template with parameter (test)
5324 Template with thumb image (with link in description)
5327 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
5329 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
5334 Template:complextemplate
5336 {{{1}}} {{paramtest|
5337 param ={{{param}}}}}
5341 Template with complex arguments
5344 param ={{ templateasargtest |
5345 templ = simple }}|[[Template:complextemplate|link]]}}
5347 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
5352 BUG 553: link with two variables in a piped link
5355 |[[{{{1}}}|{{{2}}}]]
5360 <td>[[{{{1}}}|{{{2}}}]]
5366 Magic variable as template parameter
5368 {{paramtest|param={{SITENAME}}}}
5370 <p>This is a test template with parameter MediaWiki
5377 [[{{{param}}}|link]]
5381 Template parameter as link source
5383 {{linktest|param=Main Page}}
5385 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
5390 Template-generated attribute string (k='v')
5392 <span {{attr_str|id|v1}}>bar</span>
5394 <p><span id="v1">bar</span>
5401 including another template, {{paramtest|param={{{arg}}}}}
5405 Template passing argument to another template
5407 {{paramtest2|arg='hmm'}}
5409 <p>including another template, This is a test template with parameter 'hmm'
5420 Template as link source
5424 [[{{linktest2}}|Main Page]]
5426 [[{{linktest2}}]]Page
5428 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5429 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5430 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
5448 Template infinite loop
5452 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
5457 Template from main namespace
5476 BUG 529: Template with table, not included at beginning of line
5495 BUG 523: Template shouldn't eat newline (or add an extra one before table)
5515 BUG 41: Template parameters shown as broken links
5524 Template with targets containing wikilinks
5528 {{[[{{echo|foo}}]]}}
5530 {{{{echo|[[foo}}]]}}
5532 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
5533 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
5541 ''None'' of '''this''' should be
5543 but rather passed unmodified
5547 # hmm, fix this or just deprecate msgnw and document its behavior?
5553 {{msgnw:MSGNW test}}
5555 <p>''None'' of '''this''' should be
5557 but rather passed unmodified
5565 {{int:youhavenewmessages|lots of money|not!}}
5567 <p>You have lots of money (not!).
5574 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
5578 <includeonly> and <noinclude> being included
5589 <onlyinclude>Foo</onlyinclude>bar
5593 <onlyinclude> being included
5605 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
5609 <onlyinclude> and <includeonly> being included
5618 <includeonly> and <noinclude> on a page
5620 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
5627 Un-closed <noinclude>
5634 <onlyinclude> on a page
5636 <onlyinclude>Foo</onlyinclude>bar
5643 Un-closed <onlyinclude>
5650 Self-closed noinclude, includeonly, onlyinclude tags
5661 Unbalanced includeonly and noinclude tags
5665 |b</noinclude></noinclude>
5666 |c</noinclude></includeonly>
5667 |d</includeonly></includeonly>
5676 <td>c</includeonly>
5678 <td>d</includeonly></includeonly>
5684 Template:Includeonly section
5687 ==Includeonly section==
5693 Bug 6563: Edit link generation for section shown by <includeonly>
5695 {{includeonly section}}
5697 <h2><span class="editsection">[<a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a>]</span> <span class="mw-headline" id="Includeonly_section">Includeonly section</span></h2>
5698 <h2><span class="editsection">[<a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a>]</span> <span class="mw-headline" id="Section_T-1">Section T-1</span></h2>
5702 # Uses same input as the contents of [[Template:Includeonly section]]
5704 Bug 6563: Section extraction for section shown by <includeonly>
5709 ==Includeonly section==
5717 Bug 6563: Edit link generation for section suppressed by <includeonly>
5720 ==Includeonly section==
5724 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a>]</span> <span class="mw-headline" id="Section_1">Section 1</span></h2>
5729 Bug 6563: Section extraction for section suppressed by <includeonly>
5734 ==Includeonly section==
5742 Un-closed <includeonly>
5749 ### <includeonly> and <noinclude> in attributes
5752 0. includeonly around the entire attribute
5754 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
5756 <p><span id="v2">bar</span>
5761 1. includeonly in html attr key
5763 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
5765 <p><span id="foo">bar</span>
5770 2. includeonly in html attr value
5772 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
5773 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
5775 <p><span id="v1">bar</span>
5776 <span id="v1">bar</span>
5781 3. includeonly in part of an attr value
5783 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
5785 <p><span style="color:red;">bar</span>
5790 ### Testing parsing of templates where a template arg
5791 ### has the same name as the template itself.
5801 Templates: Template Name/Arg clash: 1. Use of positional param
5810 Templates: Template Name/Arg clash: 2. Use of named param
5819 Templates: Template Name/Arg clash: 3. Use of named param with empty input
5828 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
5832 Templates: 1. Simple use
5841 Templates: 2. Inside a block tag
5843 <div>{{echo|Foo}}</div>
5850 Templates: P-wrapping: 1a. Templates on consecutive lines
5861 Templates: P-wrapping: 1b. Templates on consecutive lines
5875 Templates: P-wrapping: 1c. Templates on consecutive lines
5878 {{echo|bar}} <div>baz</div>
5887 Templates: Inline Text: 1. Multiple tmeplate uses
5889 {{echo|Foo}}bar{{echo|baz}}
5896 Templates: Inline Text: 2. Back-to-back template uses
5898 {{echo|Foo}}{{echo|bar}}
5905 Templates: Block Tags: 1. Multiple template uses
5907 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
5909 <div>Foo</div><div>bar</div><div>baz</div>
5914 Templates: Block Tags: 2. Back-to-back template uses
5916 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
5918 <div>Foo</div><div>bar</div>
5923 Templates: Links: 1. Simple example
5925 {{echo|[[Foo|bar]]}}
5927 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5932 Templates: Links: 2. Generation of link href
5934 [[{{echo|Foo}}|bar]]
5936 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5941 Templates: Links: 3. Generation of part of a link href
5943 [[Fo{{echo|o}}|bar]]
5947 [[Foo{{echo|bar}}baz]]
5949 [[Foo{{echo|bar}}|bar]]
5951 [[:Foo{{echo|bar}}]]
5953 [[:Foo{{echo|bar}}|bar]]
5955 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5956 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
5957 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
5958 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
5959 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
5960 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
5965 Templates: Links: 4. Multiple templates generating link href
5967 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
5969 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
5974 Templates: Links: 5. Generation of link text
5976 [[Foo|{{echo|bar}}]]
5978 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5983 Templates: Links: 5. Nested templates (only outermost template should be marked)
5985 {{echo|[[{{echo|Foo}}|bar]]}}
5987 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5992 Templates: HTML Tag: 1. Generation of HTML attr. key
5994 <div {{echo|style}}="color:red;">foo</div>
5996 <div style="color:red;">foo</div>
6001 Templates: HTML Tag: 2. Generation of HTML attr. value
6003 <div style={{echo|'color:red;'}}>foo</div>
6005 <div style="color:red;">foo</div>
6010 Templates: HTML Tag: 3. Generation of HTML attr key and value
6012 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
6014 <div style="color:red;">foo</div>
6019 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
6021 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
6023 <div title="This is a long title with just one piece templated">foo</div>
6028 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
6030 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
6032 <div title="This is a long title with just one piece templated">foo</div>
6037 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
6039 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
6041 <div title="This is a long title with just one piece templated">foo</div>
6046 Templates: HTML Tag: 7. Generation of partial attribute key string
6048 <div st{{echo|yle}}="color:red;">foo</div>
6050 <div style="color:red;">foo</div>
6055 Templates: HTML Tables: 1. Generating start of a HTML table
6057 {{echo|<table><tr><td>foo</td>}}</tr></table>
6059 <table><tr><td>foo</td></tr></table>
6064 Templates: HTML Tables: 2a. Generating middle of a HTML table
6066 <table><tr>{{echo|<td>foo</td>}}</tr></table>
6068 <table><tr><td>foo</td></tr></table>
6073 Templates: HTML Tables: 2b. Generating middle of a HTML table
6075 <table>{{echo|<tr><td>foo</td></tr>}}</table>
6077 <table><tr><td>foo</td></tr></table>
6082 Templates: HTML Tables: 3. Generating end of a HTML table
6084 <table><tr>{{echo|<td>foo</td></tr></table>}}
6086 <table><tr><td>foo</td></tr></table>
6091 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
6093 {{echo|<table>}}<tr><td>foo</td></tr></table>
6095 <table><tr><td>foo</td></tr></table>
6100 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
6102 <table>{{echo|<tr>}}<td>foo</td></tr></table>
6104 <table><tr><td>foo</td></tr></table>
6109 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
6111 <table><tr>{{echo|<td>}}foo</td></tr></table>
6113 <table><tr><td>foo</td></tr></table>
6118 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
6120 <table><tr><td>foo{{echo|</td>}}</tr></table>
6122 <table><tr><td>foo</td></tr></table>
6127 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
6129 <table><tr><td>foo</td>{{echo|</tr>}}</table>
6131 <table><tr><td>foo</td></tr></table>
6136 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
6138 <table><tr><td>foo</td></tr>{{echo|</table>}}
6140 <table><tr><td>foo</td></tr></table>
6145 Templates: Wiki Tables: 1a. Fostering of entire template content
6153 <tr><td></td></tr></table>
6158 Templates: Wiki Tables: 1b. Fostering of entire template content
6171 <tr><td></td></tr></table>
6176 Templates: Wiki Tables: 2. Fostering of partial template content
6186 <tr><td></td></tr></table>
6191 Templates: Wiki Tables: 3. td-content via multiple templates
6194 {{echo|{{pipe}}a}}{{echo|b}}
6205 Templates: Wiki Tables: 4. Templated tags, no content
6211 <tr><td></td></tr></table>
6216 Templates: Wiki Tables: 5. Templated tags, regular td-tags
6230 Templates: Wiki Tables: 6. Templated tags, templated td-tags
6244 Templates: Lists: Multi-line list-items via templates
6246 *{{echo|a {{nonexistent|
6248 *{{echo|b {{nonexistent|
6251 <ul><li>a <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a>
6252 </li><li>b <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a>
6258 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
6260 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
6262 <p><i>ab</i>c<i>d</i>e
6267 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
6268 (PHP parser generates misnested html)
6272 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
6274 <p><span><i>a</i></span><i><span>b</span></i><span>c</span><i>d</i><span>e</span></p>
6278 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
6279 (PHP parser generates misnested html)
6283 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
6286 <div><i>b</i>c<i>d</i></div>
6291 Templates: Ugly nesting: 4. Divs opened/closed across templates
6293 a<div>b{{echo|c</div>d}}e
6300 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
6306 |{{echo|foo</table>}}
6310 <table about="#mwt1" typeof="mw:Object/Template ">
6311 <tbody><tr><td>foo</td></tr></tbody></table><span about="#mwt1">
6312 bar</span><span about="#mwt1">
6317 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
6327 <td>1. {{echo|foo </table>}}</td>
6329 <td>2. {{echo|baz </table>}}</td>
6342 <table about="#mwt1" typeof="mw:Object/Template">
6347 <td >1. foo </td></tr></tbody></table></td>
6349 <td >2. baz </td></tr></tbody></table><span about="#mwt1">
6350 </span><span about="#mwt1">
6352 abc</span><span about="#mwt1">
6353 </span><span about="#mwt1">
6354 </span><span about="#mwt1">
6355 </span><span about="#mwt1">
6356 </span><span about="#mwt1">
6358 xyz</span><span about="#mwt1">
6359 </span><span about="#mwt1">
6364 Templates: Ugly templates: 3. newline-only template parameter
6373 # This looks like a bug: a single newline triggers p/br for some reason.
6375 Templates: Ugly templates: 4. newline-only template parameter inconsistency
6386 Parser Functions: 1. Simple example
6395 Parser Functions: 2. Nested use (only outermost should be marked up)
6404 ### Pre-save transform tests
6407 pre-save transform: subst:
6413 This is a test template
6417 pre-save transform: normal template
6427 pre-save transform: nonexistent template
6431 {{thistemplatedoesnotexist}}
6433 {{thistemplatedoesnotexist}}
6438 pre-save transform: subst magic variables
6447 # This is bug 89, which I fixed. -- wtm
6449 pre-save transform: subst: templates with parameters
6453 {{subst:paramtest|param="something else"}}
6455 This is a test template with parameter "something else"
6461 <nowiki>'''not wiki'''</nowiki>
6465 pre-save transform: nowiki in subst (bug 1188)
6469 {{subst:nowikitest}}
6471 <nowiki>'''not wiki'''</nowiki>
6476 Template:commenttest
6478 This template has <!-- a comment --> in it.
6482 pre-save transform: comment in subst (bug 1936)
6486 {{subst:commenttest}}
6488 This template has <!-- a comment --> in it.
6492 pre-save transform: unclosed tag
6496 <nowiki>'''not wiki'''
6498 <nowiki>'''not wiki'''
6502 pre-save transform: mixed tag case
6506 <NOwiki>'''not wiki'''</noWIKI>
6508 <NOwiki>'''not wiki'''</noWIKI>
6512 pre-save transform: unclosed comment in <nowiki>
6516 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
6518 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
6524 <span onmouseover="alert('crap')">Oh no</span>
6528 (confirming safety of fix for subst bug 1936)
6530 {{Template:dangerous}}
6532 <p><span>Oh no</span>
6537 pre-save transform: comment containing gallery (bug 5024)
6541 <!-- <gallery>data</gallery> -->
6543 <!-- <gallery>data</gallery> -->
6547 pre-save transform: comment containing extension
6551 <!-- <tag>data</tag> -->
6553 <!-- <tag>data</tag> -->
6557 pre-save transform: comment containing nowiki
6561 <!-- <nowiki>data</nowiki> -->
6563 <!-- <nowiki>data</nowiki> -->
6567 pre-save transform: <noinclude> in subst (bug 3298)
6577 pre-save transform: <onlyinclude> in subst (bug 3298)
6589 {{<includeonly>subst:</includeonly>Includes}}
6593 Template:SafeSubstTest
6595 {{<includeonly>safesubst:</includeonly>Includes}}
6599 bug 22297: safesubst: works during PST
6603 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
6609 bug 22297: safesubst: works during normal parse
6618 subst: does not work during normal parse
6622 <p>{{subst:Includes}}
6627 pre-save transform: context links ("pipe trick")
6631 [[Article (context)|]]
6634 [[Bar:Article (context)|]]
6635 [[:Bar:Article (context)|]]
6637 [[|Article (context)]]
6641 [[Article (context)|Article]]
6642 [[Bar:Article|Article]]
6643 [[:Bar:Article|Article]]
6644 [[Bar:Article (context)|Article]]
6645 [[:Bar:Article (context)|Article]]
6647 [[Article (context)]]
6648 [[Bar:X (Y) Z|X (Y) Z]]
6649 [[:Bar:X (Y) Z|X (Y) Z]]
6653 pre-save transform: context links ("pipe trick") with interwiki prefix
6657 [[interwiki:Article|]]
6658 [[:interwiki:Article|]]
6659 [[interwiki:Bar:Article|]]
6660 [[:interwiki:Bar:Article|]]
6662 [[interwiki:Article|Article]]
6663 [[:interwiki:Article|Article]]
6664 [[interwiki:Bar:Article|Bar:Article]]
6665 [[:interwiki:Bar:Article|Bar:Article]]
6669 pre-save transform: context links ("pipe trick") with parens in title
6671 pst title=[[Somearticle (context)]]
6675 [[Article (context)|Article]]
6679 pre-save transform: context links ("pipe trick") with comma in title
6681 pst title=[[Someplace, Somewhere]]
6684 [[Otherplace, Elsewhere|]]
6685 [[Otherplace, Elsewhere, Anywhere|]]
6687 [[Otherplace, Somewhere|Otherplace]]
6688 [[Otherplace, Elsewhere|Otherplace]]
6689 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
6693 pre-save transform: context links ("pipe trick") with parens and comma
6695 pst title=[[Someplace (IGNORED), Somewhere]]
6698 [[Otherplace (place), Elsewhere|]]
6700 [[Otherplace, Somewhere|Otherplace]]
6701 [[Otherplace (place), Elsewhere|Otherplace]]
6705 pre-save transform: context links ("pipe trick") with comma and parens
6707 pst title=[[Who, me? (context)]]
6710 [[Me, Myself, and I (1937 song)|]]
6712 [[Yes, you. (context)|Yes, you.]]
6713 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
6717 pre-save transform: context links ("pipe trick") with namespace
6719 pst title=[[Ns:Somearticle]]
6723 [[Ns:Article|Article]]
6727 pre-save transform: context links ("pipe trick") with namespace and parens
6729 pst title=[[Ns:Somearticle (context)]]
6733 [[Ns:Article (context)|Article]]
6737 pre-save transform: context links ("pipe trick") with namespace and comma
6739 pst title=[[Ns:Somearticle, Context, Whatever]]
6743 [[Ns:Article, Context, Whatever|Article]]
6747 pre-save transform: context links ("pipe trick") with namespace, comma and parens
6749 pst title=[[Ns:Somearticle, Context (context)]]
6753 [[Ns:Article (context)|Article]]
6757 pre-save transform: context links ("pipe trick") with namespace, parens and comma
6759 pst title=[[Ns:Somearticle (IGNORED), Context]]
6763 [[Ns:Article, Context|Article]]
6767 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
6771 [[Article(context)|]]
6772 [[Bar:Article(context)|]]
6773 [[:Bar:Article(context)|]]
6774 [[|Article(context)]]
6778 [[Article(context)|Article]]
6779 [[Bar:Article(context)|Article]]
6780 [[:Bar:Article(context)|Article]]
6781 [[Article(context)]]
6783 [[:Bar:X(Y)Z|X(Y)Z]]
6787 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
6791 [[Article (context)|]]
6792 [[Bar:Article (context)|]]
6793 [[:Bar:Article (context)|]]
6794 [[|Article (context)]]
6798 [[Article (context)|Article]]
6799 [[Bar:Article (context)|Article]]
6800 [[:Bar:Article (context)|Article]]
6801 [[Article (context)]]
6802 [[Bar:X (Y) Z|X (Y) Z]]
6803 [[:Bar:X (Y) Z|X (Y) Z]]
6807 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
6811 [[Article(context)|]]
6812 [[Bar:Article(context)|]]
6813 [[:Bar:Article(context)|]]
6814 [[|Article(context)]]
6818 [[Article(context)|Article]]
6819 [[Bar:Article(context)|Article]]
6820 [[:Bar:Article(context)|Article]]
6821 [[Article(context)]]
6823 [[:Bar:X(Y)Z|X(Y)Z]]
6827 pre-save transform: context links ("pipe trick") with commas (bug 21660)
6831 [[Article (context), context|]]
6832 [[Article (context),context|]]
6833 [[Bar:Article (context), context|]]
6834 [[Bar:Article (context),context|]]
6835 [[:Bar:Article (context), context|]]
6836 [[:Bar:Article (context),context|]]
6838 [[Article (context), context|Article]]
6839 [[Article (context),context|Article]]
6840 [[Bar:Article (context), context|Article]]
6841 [[Bar:Article (context),context|Article]]
6842 [[:Bar:Article (context), context|Article]]
6843 [[:Bar:Article (context),context|Article]]
6847 pre-save transform: trim trailing empty lines
6851 Empty lines are trimmed
6857 Empty lines are trimmed
6861 pre-save transform: Signature expansion
6866 * <noinclude>~~~</noinclude>
6867 * <includeonly>~~~</includeonly>
6868 * <onlyinclude>~~~</onlyinclude>
6870 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
6871 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
6872 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
6873 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
6878 pre-save transform: Signature expansion in nowiki tags (bug 93)
6884 <nowiki>~~~~</nowiki>
6886 <includeonly><nowiki>~~~~</nowiki></includeonly>
6888 <noinclude><nowiki>~~~~</nowiki></noinclude>
6890 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
6892 {{subst:Foo}} shall be converted to FOO
6894 As well as inside noinclude/onlyinclude
6895 <noinclude>{{subst:Foo}}</noinclude>
6896 <onlyinclude>{{subst:Foo}}</onlyinclude>
6898 But not inside includeonly
6899 <includeonly>{{subst:Foo}}</includeonly>
6903 <nowiki>~~~~</nowiki>
6905 <includeonly><nowiki>~~~~</nowiki></includeonly>
6907 <noinclude><nowiki>~~~~</nowiki></noinclude>
6909 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
6911 FOO shall be converted to FOO
6913 As well as inside noinclude/onlyinclude
6914 <noinclude>FOO</noinclude>
6915 <onlyinclude>FOO</onlyinclude>
6917 But not inside includeonly
6918 <includeonly>{{subst:Foo}}</includeonly>
6922 ### Message transform tests
6925 message transform: magic variables
6935 message transform: should not transform wiki markup
6945 message transform: <noinclude> in transcluded template (bug 4926)
6955 message transform: <onlyinclude> in transcluded template (bug 4926)
6965 {{#special:}} page name, known
6969 {{#special:Recentchanges}}
6971 Special:RecentChanges
6975 {{#special:}} page name with subpage, known
6979 {{#special:Recentchanges/param}}
6981 Special:RecentChanges/param
6985 {{#special:}} page name, unknown
6989 {{#special:foobarnonexistent}}
6991 No such special page
6995 {{#speciale:}} page name, known
6999 {{#speciale:Recentchanges}}
7001 Special:RecentChanges
7005 {{#speciale:}} page name with subpage, known
7009 {{#speciale:Recentchanges/param}}
7011 Special:RecentChanges/param
7015 {{#speciale:}} page name, unknown
7019 {{#speciale:foobarnonexistent}}
7021 No_such_special_page
7030 [[Image:foobar.jpg]]
7032 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7039 [[Image:foobar.jpg|right]]
7041 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7046 Simple image (using File: namespace, now canonical)
7050 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7057 [[Image:foobar.jpg|right|Caption text]]
7059 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7064 Image with empty attribute
7066 [[Image:foobar.jpg|right||Caption text]]
7068 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7073 Image with link tails
7075 123[[Image:foobar.jpg]]456
7076 123[[Image:foobar.jpg|right]]456
7077 123[[Image:foobar.jpg|thumb]]456
7079 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
7081 123<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>456
7082 123<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div></div></div></div>456
7087 Image with multiple captions -- only last one is accepted
7089 [[Image:foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
7091 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption3 - accepted"><img alt="Caption3 - accepted" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7096 Image with width attribute at different positions
7098 [[Image:foobar.jpg|200px|right|Caption]]
7099 [[Image:foobar.jpg|right|200px|Caption]]
7100 [[Image:foobar.jpg|right|Caption|200px]]
7102 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
7103 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
7104 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
7109 Image with link parameter, wiki target
7111 [[Image:foobar.jpg|link=Target page]]
7113 <p><a href="/wiki/Target_page" title="Target page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7118 Image with link parameter, URL target
7120 [[Image:foobar.jpg|link=http://example.com/]]
7122 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7127 Image with link parameter, wgExternalLinkTarget
7129 [[Image:foobar.jpg|link=http://example.com/]]
7131 wgExternalLinkTarget='foobar'
7133 <p><a href="http://example.com/" target="foobar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7138 Image with link parameter, wgNoFollowLinks set to false
7140 [[Image:foobar.jpg|link=http://example.com/]]
7142 wgNoFollowLinks=false
7144 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7149 Image with link parameter, wgNoFollowDomainExceptions
7151 [[Image:foobar.jpg|link=http://example.com/]]
7153 wgNoFollowDomainExceptions='example.com'
7155 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7160 Image with link parameter, wgExternalLinkTarget, unnamed parameter
7162 [[Image:foobar.jpg|link=http://example.com/|Title]]
7164 wgExternalLinkTarget='foobar'
7166 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7171 Image with empty link parameter
7173 [[Image:foobar.jpg|link=]]
7175 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
7180 Image with link parameter (wiki target) and unnamed parameter
7182 [[Image:foobar.jpg|link=Target page|Title]]
7184 <p><a href="/wiki/Target_page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7189 Image with link parameter (URL target) and unnamed parameter
7191 [[Image:foobar.jpg|link=http://example.com/|Title]]
7193 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7198 Thumbnail image with link parameter
7202 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
7204 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7209 Manually-specified thumbnail image
7213 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
7215 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7220 Manually-specified thumbnail image with explicit link to wiki page
7224 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
7226 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7231 Manually-specified thumbnail image with explicit link to url
7235 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
7237 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="http://example.com"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7242 Manually-specified thumbnail image with explicit no link
7246 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
7248 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7253 Manually-specified thumbnail image with explicit link and alt text
7257 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
7259 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="alttext" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7264 Image with frame and link
7266 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
7268 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
7273 Image with frame and link and explicit alt
7275 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
7277 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
7282 Image with wiki markup in implicit alt
7284 [[Image:Foobar.jpg|testing '''bold''' in alt]]
7286 <p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7291 Image with wiki markup in explicit alt
7293 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
7295 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7300 Link to image page- image page normally doesn't exists, hence edit link
7301 Add test with existing image page
7302 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
7306 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
7311 bug 18784 Link to non-existent image page with caption should use caption as link text
7313 [[:Image:test|caption]]
7315 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
7320 Frameless image caption with a free URL
7322 [[Image:foobar.jpg|http://example.com]]
7324 <p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7329 Thumbnail image caption with a free URL
7331 [[Image:foobar.jpg|thumb|http://example.com]]
7333 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
7338 Thumbnail image caption with a free URL and explicit alt
7340 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
7342 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
7347 BUG 1887: A ISBN with a thumbnail
7349 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
7351 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
7356 BUG 1887: A RFC with a thumbnail
7358 [[Image:foobar.jpg|thumb|This is RFC 12354]]
7360 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
7365 BUG 1887: A mailto link with a thumbnail
7367 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
7369 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
7373 # Pending resolution to bug 368
7375 BUG 648: Frameless image caption with a link
7377 [[Image:foobar.jpg|text with a [[link]] in it]]
7379 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7384 BUG 648: Frameless image caption with a link (suffix)
7386 [[Image:foobar.jpg|text with a [[link]]foo in it]]
7388 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a linkfoo in it"><img alt="text with a linkfoo in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7393 BUG 648: Frameless image caption with an interwiki link
7395 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
7397 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7402 BUG 648: Frameless image caption with a piped interwiki link
7404 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
7406 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7411 Escape HTML special chars in image alt text
7413 [[Image:foobar.jpg|& < > "]]
7415 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7420 BUG 499: Alt text should have Ӓ, not &1234;
7422 [[Image:foobar.jpg|♀]]
7424 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7429 Broken image caption with link
7431 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
7433 <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.
7438 Image caption containing another image
7440 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
7442 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is a caption with another <a href="/index.php?title=Special:Upload&wpDestFile=Icon.png" class="new" title="File:Icon.png">image</a> inside it!</div></div></div>
7447 Image caption containing a newline
7449 [[Image:Foobar.jpg|This
7452 <p><a href="/wiki/File:Foobar.jpg" class="image" title="This *is some text"><img alt="This *is some text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7457 Parsoid: Image caption containing leading space
7458 (The leading space should not trigger nowiki escaping in wt2wt mode)
7460 [[Image:Foobar.jpg|thumb| bar]]
7462 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>bar</div></div></div>
7467 Bug 3090: External links other than http: in image captions
7469 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
7471 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div>
7478 [[Image:foobar.jpg|a|class=b]]
7480 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="b" /></a>
7485 Localized image handling (1).
7489 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
7491 <div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7496 Localized image handling (2).
7500 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
7502 <div class="thumb tleft"><div class="thumbinner" style="width:182px;"><a href="/wiki/Foo" title="Foo"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/Archivo:Foobar.jpg" class="internal" title="Aumentar"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>caption</div></div></div>
7507 "border", "frameless" and "class" attributes on an image.
7509 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
7511 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="extra thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
7518 #REDIRECT [[File:Barfoo.jpg]]
7524 [[Image:Barfoo.jpg]]
7526 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
7531 Missing image with uploads disabled
7535 [[Image:Foobaz.jpg]]
7537 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
7546 Subpage test/subpage
7554 subpage title=[[Subpage test]]
7558 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
7563 Subpage noslash link
7565 subpage title=[[Subpage test]]
7569 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
7578 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
7583 BUG 561: {{/Subpage}}
7585 subpage title=[[Page]]
7589 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
7597 Category:MediaWiki User's Guide
7605 [[:Category:MediaWiki User's Guide]]
7607 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
7616 [[Category:MediaWiki User's Guide]]
7618 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
7622 PAGESINCATEGORY invalid title fatal (r33546 fix)
7624 {{PAGESINCATEGORY:<bogus>}}
7631 Category with different sort key
7635 [[Category:MediaWiki User's Guide|Foo]]
7637 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
7641 Category with identical sort key
7645 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
7647 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
7651 Category with empty sort key
7656 [[Category:MediaWiki User's Guide|]]
7658 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
7662 Category with empty sort key and parentheses
7667 [[Category:Foo (bar)|]]
7669 [[Category:Foo (bar)|Foo]]
7673 Category with link tail
7678 123[[Category:Foo]]456
7680 123[[Category:Foo]]456
7684 Category with template
7689 [[Category:{{echo|Foo}}]]
7691 [[Category:{{echo|Foo}}]]
7695 Category with template in sort key
7700 [[Category:Foo|{{echo|Bar}}]]
7702 [[Category:Foo|{{echo|Bar}}]]
7706 Category with template in sort key and title
7711 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
7713 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
7717 Category / paragraph interactions
7719 Foo [[Category:Baz]] Bar
7721 Foo [[Category:Baz]]
7729 [[Category:Baz]] Bar
7742 {{echo|[[Category:Baz]]}}
7757 ### Inter-language links
7760 Inter-language links
7766 [[zh:食品]]
7768 es:Alimento fr:Nourriture zh:食品
7772 Duplicate interlanguage links (bug 24502)
7788 Basic section headings
7795 ===Smaller headline===
7798 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline" id="Headline_1">Headline 1</span></h2>
7801 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline" id="Headline_2">Headline 2</span></h2>
7804 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</span> <span class="mw-headline" id="Smaller_headline">Smaller headline</span></h3>
7810 Section headings with TOC
7813 === Subheadline 1 ===
7814 ===== Skipping a level =====
7815 ====== Skipping a level ======
7819 ===Another headline===
7821 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7823 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
7825 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
7827 <li class="toclevel-3 tocsection-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
7829 <li class="toclevel-4 tocsection-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
7836 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
7838 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
7843 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline" id="Headline_1">Headline 1</span></h2>
7844 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</span> <span class="mw-headline" id="Subheadline_1">Subheadline 1</span></h3>
7845 <h5><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline" id="Skipping_a_level">Skipping a level</span></h5>
7846 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline" id="Skipping_a_level_2">Skipping a level</span></h6>
7847 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline" id="Headline_2">Headline 2</span></h2>
7850 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a>]</span> <span class="mw-headline" id="Another_headline">Another headline</span></h3>
7854 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
7856 Handling of sections up to level 6 and beyond
7859 == Level 2 Heading==
7860 === Level 3 Heading===
7861 ==== Level 4 Heading====
7862 ===== Level 5 Heading=====
7863 ====== Level 6 Heading======
7864 ======= Level 7 Heading=======
7865 ======== Level 8 Heading========
7866 ========= Level 9 Heading=========
7867 ========== Level 10 Heading==========
7869 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7871 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
7873 <li class="toclevel-2 tocsection-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
7875 <li class="toclevel-3 tocsection-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
7877 <li class="toclevel-4 tocsection-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a>
7879 <li class="toclevel-5 tocsection-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a>
7881 <li class="toclevel-6 tocsection-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>
7882 <li class="toclevel-6 tocsection-7"><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>
7883 <li class="toclevel-6 tocsection-8"><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>
7884 <li class="toclevel-6 tocsection-9"><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>
7885 <li class="toclevel-6 tocsection-10"><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>
7898 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</span> <span class="mw-headline" id="Level_1_Heading">Level 1 Heading</span></h1>
7899 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</span> <span class="mw-headline" id="Level_2_Heading">Level 2 Heading</span></h2>
7900 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</span> <span class="mw-headline" id="Level_3_Heading">Level 3 Heading</span></h3>
7901 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</span> <span class="mw-headline" id="Level_4_Heading">Level 4 Heading</span></h4>
7902 <h5><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</span> <span class="mw-headline" id="Level_5_Heading">Level 5 Heading</span></h5>
7903 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</span> <span class="mw-headline" id="Level_6_Heading">Level 6 Heading</span></h6>
7904 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</span> <span class="mw-headline" id=".3D_Level_7_Heading.3D">= Level 7 Heading=</span></h6>
7905 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</span> <span class="mw-headline" id=".3D.3D_Level_8_Heading.3D.3D">== Level 8 Heading==</span></h6>
7906 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</span> <span class="mw-headline" id=".3D.3D.3D_Level_9_Heading.3D.3D.3D">=== Level 9 Heading===</span></h6>
7907 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</span> <span class="mw-headline" id=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D">==== Level 10 Heading====</span></h6>
7912 TOC regression (bug 9764)
7916 ==== title 1.1.1 ====
7921 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7923 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
7925 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
7927 <li class="toclevel-3 tocsection-3"><a href="#title_1.1.1"><span class="tocnumber">1.1.1</span> <span class="toctext">title 1.1.1</span></a></li>
7930 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
7933 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
7935 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
7940 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1">title 1</span></h2>
7941 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1">title 1.1</span></h3>
7942 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1.1">title 1.1.1</span></h4>
7943 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a>]</span> <span class="mw-headline" id="title_1.2">title 1.2</span></h3>
7944 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline" id="title_2">title 2</span></h2>
7945 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a>]</span> <span class="mw-headline" id="title_2.1">title 2.1</span></h3>
7950 TOC with wgMaxTocLevel=3 (bug 6204)
7956 ==== title 1.1.1 ====
7961 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7963 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
7965 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
7966 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
7969 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
7971 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
7976 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1">title 1</span></h2>
7977 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1">title 1.1</span></h3>
7978 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1.1">title 1.1.1</span></h4>
7979 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a>]</span> <span class="mw-headline" id="title_1.2">title 1.2</span></h3>
7980 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline" id="title_2">title 2</span></h2>
7981 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a>]</span> <span class="mw-headline" id="title_2.1">title 2.1</span></h3>
7986 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
7992 ====Section 1.1.1====
7993 ====Section 1.1.1.1====
7996 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7998 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
8000 <li class="toclevel-2 tocsection-2"><a href="#Section_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Section 1.1</span></a></li>
8003 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
8006 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a>]</span> <span class="mw-headline" id="Section_1">Section 1</span></h2>
8007 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 1.1">edit</a>]</span> <span class="mw-headline" id="Section_1.1">Section 1.1</span></h3>
8008 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 1.1.1">edit</a>]</span> <span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span></h4>
8009 <h4><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 1.1.1.1">edit</a>]</span> <span class="mw-headline" id="Section_1.1.1.1">Section 1.1.1.1</span></h4>
8010 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 2">edit</a>]</span> <span class="mw-headline" id="Section_2">Section 2</span></h2>
8016 Resolving duplicate section names
8021 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline" id="Foo_bar">Foo bar</span></h2>
8022 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline" id="Foo_bar_2">Foo bar</span></h2>
8027 Resolving duplicate section names with differing case (bug 10721)
8032 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline" id="Foo_bar">Foo bar</span></h2>
8033 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a>]</span> <span class="mw-headline" id="Foo_Bar_2">Foo Bar</span></h2>
8045 Template with sections, __NOTOC__
8052 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a>]</span> <span class="mw-headline" id="Section_0">Section 0</span></h2>
8053 <h3><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=T-1" title="Template:Sections">edit</a>]</span> <span class="mw-headline" id="Section_1">Section 1</span></h3>
8054 <h2><span class="editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=T-2" title="Template:Sections">edit</a>]</span> <span class="mw-headline" id="Section_2">Section 2</span></h2>
8055 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a>]</span> <span class="mw-headline" id="Section_4">Section 4</span></h2>
8060 __NOEDITSECTION__ keyword
8066 <h2> <span class="mw-headline" id="Section_1">Section 1</span></h2>
8067 <h2> <span class="mw-headline" id="Section_2">Section 2</span></h2>
8072 Link inside a section heading
8074 ==Section with a [[Main Page|link]] in it==
8076 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</span> <span class="mw-headline" id="Section_with_a_link_in_it">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span></h2>
8081 TOC regression (bug 12077)
8088 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8090 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
8092 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
8095 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
8098 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1">title 1</span></h2>
8099 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1">title 1.1</span></h3>
8100 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline" id="title_2">title 2</span></h2>
8105 BUG 1219 URL next to image (good)
8107 http://example.com [[Image:foobar.jpg]]
8109 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8114 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
8117 The line above must have a trailing space!
8120 But just in case it doesn't...
8122 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D">=</span></h1>
8123 <p>The line above must have a trailing space!
8125 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D_2">=</span></h1>
8126 <p>But just in case it doesn't...
8131 Header with special characters (bug 25462)
8133 The tooltips shall not show entities to the user (ie. be double escaped)
8150 <p>The tooltips shall not show entities to the user (ie. be double escaped)
8152 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8154 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
8155 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
8156 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
8157 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
8158 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
8161 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: text > text">edit</a>]</span> <span class="mw-headline" id="text_.3E_text">text > text</span></h2>
8164 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: text < text">edit</a>]</span> <span class="mw-headline" id="text_.3C_text">text < text</span></h2>
8167 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: text & text">edit</a>]</span> <span class="mw-headline" id="text_.26_text">text & text</span></h2>
8170 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: text ' text">edit</a>]</span> <span class="mw-headline" id="text_.27_text">text ' text</span></h2>
8173 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: text " text">edit</a>]</span> <span class="mw-headline" id="text_.22_text">text " text</span></h2>
8179 Headers with excess '=' characters
8180 (Are similar tests necessary beyond the 1st level?)
8184 =''italic'' heading==
8185 ==''italic'' heading=
8187 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8189 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
8190 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
8191 <li class="toclevel-1 tocsection-3"><a href="#italic_heading.3D"><span class="tocnumber">3</span> <span class="toctext"><i>italic</i> heading=</span></a></li>
8192 <li class="toclevel-1 tocsection-4"><a href="#.3Ditalic_heading"><span class="tocnumber">4</span> <span class="toctext">=<i>italic</i> heading</span></a></li>
8195 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: foo=">edit</a>]</span> <span class="mw-headline" id="foo.3D">foo=</span></h1>
8196 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =foo">edit</a>]</span> <span class="mw-headline" id=".3Dfoo">=foo</span></h1>
8197 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: italic heading=">edit</a>]</span> <span class="mw-headline" id="italic_heading.3D"><i>italic</i> heading=</span></h1>
8198 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: =italic heading">edit</a>]</span> <span class="mw-headline" id=".3Ditalic_heading">=<i>italic</i> heading</span></h1>
8203 HTML headers vs TOC (bug 23393)
8204 (__NOEDITSECTION__ for clearer output, doesn't matter here)
8216 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8218 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
8220 <li class="toclevel-2 tocsection-1"><a href="#Header_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Header 1.1</span></a></li>
8221 <li class="toclevel-2 tocsection-2"><a href="#Header_1.2"><span class="tocnumber">1.2</span> <span class="toctext">Header 1.2</span></a></li>
8224 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
8226 <li class="toclevel-2 tocsection-3"><a href="#Header_2.1"><span class="tocnumber">2.1</span> <span class="toctext">Header 2.1</span></a></li>
8227 <li class="toclevel-2 tocsection-4"><a href="#Header_2.2"><span class="tocnumber">2.2</span> <span class="toctext">Header 2.2</span></a></li>
8232 <h1> <span class="mw-headline" id="Header_1">Header 1</span></h1>
8233 <h2> <span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
8234 <h2> <span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
8235 <h1> <span class="mw-headline" id="Header_2">Header 2</span></h1>
8236 <h2> <span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
8237 <h2> <span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
8242 BUG 1219 URL next to image (broken)
8244 http://example.com[[Image:foobar.jpg]]
8246 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8251 Bug 1186 news: in the middle of text
8253 http://en.wikinews.org/wiki/Wikinews:Workplace
8255 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
8261 Namespaced link must have a title
8270 Namespaced link must have a title (bad fragment version)
8272 [[Project:#fragment]]
8274 <p>[[Project:#fragment]]
8280 ### HTML tags and HTML attributes
8284 div with no attributes
8286 <div>HTML rocks</div>
8288 <div>HTML rocks</div>
8293 div with double-quoted attribute
8295 <div id="rock">HTML rocks</div>
8297 <div id="rock">HTML rocks</div>
8302 div with single-quoted attribute
8304 <div id='rock'>HTML rocks</div>
8306 <div id="rock">HTML rocks</div>
8311 div with unquoted attribute
8313 <div id=rock>HTML rocks</div>
8315 <div id="rock">HTML rocks</div>
8320 div with illegal double attributes
8322 <div id="a" id="b">HTML rocks</div>
8324 <div id="b">HTML rocks</div>
8328 # FIXME: produce empty string instead of "class" in the PHP parser, following
8331 div with empty attribute value, space before equals
8335 <div class =>HTML rocks</div>
8337 <div class="">HTML rocks</div>
8341 # The PHP parser escapes the opening brace to { for some reason, so
8342 # disabled this test for it.
8344 div with braces in attribute value
8348 <div title="{}">Foo</div>
8350 <div title="{}">Foo</div>
8353 # This it very inconsistent in the PHP parser: it returns
8354 # class="class" if there is a space between the name and the equal sign (see
8355 # 'div with empty attribute value, space before equals'), but strips the
8356 # attribute completely if the space is missing. We hope that not much content
8357 # depends on this, so are implementing the behavior below in Parsoid for
8358 # consistencies' sake. Disabled for the PHP parser.
8359 # FIXME: fix this behavior in the PHP parser?
8361 div with empty attribute value, no space before equals
8365 <div class=>HTML rocks</div>
8367 <div class="">HTML rocks</div>
8372 HTML multiple attributes correction
8374 <p class="error" class="awesome">Awesome!</p>
8376 <p class="awesome">Awesome!</p>
8381 Table multiple attributes correction
8384 !+ class="error" class="awesome"| status
8389 <th class="awesome"> status
8397 <DIV ID="x">HTML ROCKS</DIV>
8399 <div id="x">HTML ROCKS</div>
8404 Non-ASCII pseudo-tags are rendered as text
8413 Pseudo-tag with URL 'name' renders as url link
8415 <http://example.com/>
8417 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
8422 text with amp in the middle of nowhere
8426 <p>Remember AT&T?
8431 text with character entity: eacute
8433 I always thought é was a cute letter.
8435 <p>I always thought é was a cute letter.
8440 text with entity-escaped character entity-like string: eacute
8442 I always thought &eacute; was a cute letter.
8444 <p>I always thought &eacute; was a cute letter.
8449 text with undefined character entity: xacute
8451 I always thought &xacute; was a cute letter.
8453 <p>I always thought &xacute; was a cute letter.
8465 [[Media:Foobar.jpg]]
8467 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
8472 Media link with text
8474 [[Media:Foobar.jpg|A neat file to look at]]
8476 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
8480 # FIXME: this is still bad HTML tag nesting
8482 Media link with nasty text
8483 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
8485 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
8487 <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>
8492 Media link to nonexistent file (bug 1702)
8494 [[Media:No such.jpg]]
8496 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
8501 Image link to nonexistent file (bug 1850 - good)
8503 [[Image:No such.jpg]]
8505 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
8510 :Image link to nonexistent file (bug 1850 - bad)
8512 [[:Image:No such.jpg]]
8514 <p><a href="/index.php?title=File:No_such.jpg&action=edit&redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a>
8521 Character reference normalization in link text (bug 1938)
8523 [[Main Page|this&that]]
8525 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
8532 Test for unicode normalization
8534 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
8538 (bug 19451) Links should refer to the normalized form.
8546 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8547 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8548 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8549 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8550 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8555 Empty attribute crash test (bug 2067)
8557 <font color="">foo</font>
8559 <p><font color="">foo</font>
8564 Empty attribute crash test single-quotes (bug 2067)
8566 <font color=''>foo</font>
8568 <p><font color="">foo</font>
8573 Attribute test: equals, then nothing
8575 <font color=>foo</font>
8582 Attribute test: unquoted value
8584 <font color=x>foo</font>
8586 <p><font color="x">foo</font>
8591 Attribute test: unquoted but illegal value (hash)
8593 <font color=#x>foo</font>
8595 <p><font color="#x">foo</font>
8600 Attribute test: no value
8602 <font color>foo</font>
8604 <p><font color="color">foo</font>
8609 Bug 2095: link with three closing brackets
8613 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
8618 Bug 2095: link with pipe and three closing brackets
8622 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
8627 Bug 2095: link with pipe and three closing brackets, version 2
8629 [[Main Page|[http://example.com/]]]
8631 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
8641 Template:Dangerous attribute
8643 " onmouseover="alert(document.cookie)
8647 Template:Dangerous style attribute
8649 border-size: expression(alert(document.cookie))
8655 <div style="float: right; {{{1}}}">Magic div</div>
8659 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
8661 <div title="{{test}}"></div>
8663 <div title="This is a test template"></div>
8668 Bug 2304: HTML attribute safety (dangerous template; 2309)
8670 <div title="{{dangerous attribute}}"></div>
8672 <div title=""></div>
8677 Bug 2304: HTML attribute safety (dangerous style template; 2309)
8679 <div style="{{dangerous style attribute}}"></div>
8681 <div style="/* insecure input */"></div>
8686 Bug 2304: HTML attribute safety (safe parameter; 2309)
8688 {{div style|width: 200px}}
8690 <div style="float: right; width: 200px">Magic div</div>
8695 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
8697 {{div style|width: expression(alert(document.cookie))}}
8699 <div style="/* insecure input */">Magic div</div>
8704 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
8706 {{div style|"><script>alert(document.cookie)</script>}}
8708 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
8713 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
8715 {{div style|" ><script>alert(document.cookie)</script>}}
8717 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
8722 Bug 2304: HTML attribute safety (link)
8724 <div title="[[Main Page]]"></div>
8726 <div title="[[Main Page]]"></div>
8731 Bug 2304: HTML attribute safety (italics)
8733 <div title="''foobar''"></div>
8735 <div title="''foobar''"></div>
8740 Bug 2304: HTML attribute safety (bold)
8742 <div title="'''foobar'''"></div>
8744 <div title="'''foobar'''"></div>
8750 Bug 2304: HTML attribute safety (ISBN)
8752 <div title="ISBN 1234567890"></div>
8754 <div title="ISBN 1234567890"></div>
8759 Bug 2304: HTML attribute safety (RFC)
8761 <div title="RFC 1234"></div>
8763 <div title="RFC 1234"></div>
8768 Bug 2304: HTML attribute safety (PMID)
8770 <div title="PMID 1234567890"></div>
8772 <div title="PMID 1234567890"></div>
8777 Bug 2304: HTML attribute safety (web link)
8779 <div title="http://example.com/"></div>
8781 <div title="http://example.com/"></div>
8786 Bug 2304: HTML attribute safety (named web link)
8788 <div title="[http://example.com/ link]"></div>
8790 <div title="[http://example.com/ link]"></div>
8795 Bug 3244: HTML attribute safety (extension; safe)
8797 <div style="<nowiki>background:blue</nowiki>"></div>
8799 <div style="background:blue"></div>
8804 Bug 3244: HTML attribute safety (extension; unsafe)
8806 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
8808 <div style="/* insecure input */"></div>
8812 # More MSIE fun discovered by Tom Gilder
8815 MSIE CSS safety test: spurious slash
8817 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
8819 <div style="/* insecure input */">evil</div>
8824 MSIE CSS safety test: hex code
8826 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
8828 <div style="/* insecure input */">evil</div>
8833 MSIE CSS safety test: comment in url
8835 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
8837 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
8842 MSIE CSS safety test: comment in expression
8844 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
8846 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
8852 Table attribute legitimate extension
8855 !+ style="<nowiki>color:blue</nowiki>"| status
8860 <th style="color:blue"> status
8866 Table attribute safety
8869 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
8874 <th style="/* insecure input */"> status
8880 CSS line continuation 1
8882 <div style="background-image: u\ rl(test.jpg);"></div>
8884 <div style="/* insecure input */"></div>
8889 CSS line continuation 2
8891 <div style="background-image: u\ rl(test.jpg); "></div>
8893 <div style="/* insecure input */"></div>
8904 Expansion of multi-line templates in attribute values (bug 6255)
8906 <div style="background: {{identity|#00FF00}}">-</div>
8908 <div style="background: #00FF00">-</div>
8914 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
8916 <div style="background:
8919 <div style="background: #00FF00">-</div>
8924 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
8926 <div style="background: #00FF00">-</div>
8928 <div style="background: #00FF00">-</div>
8933 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
8936 Parser hook: empty input
8949 Parser hook: empty input using terminated empty elements
8962 Parser hook: empty input using terminated empty elements (space before)
8975 Parser hook: basic input
8989 Parser hook: case insensitive
9003 Parser hook: case insensitive, redux
9016 Parser hook: nested tags
9020 <tag><tag></tag></tag>
9031 Parser hook: basic arguments
9033 <tag width=200 height = "100" depth = '50' square></tag>
9041 'square' => 'square',
9048 Parser hook: argument containing a forward slash (bug 5344)
9050 <tag filename='/tmp/bla'></tag>
9055 'filename' => '/tmp/bla',
9062 Parser hook: empty input using terminated empty elements (bug 2374)
9075 # </tag> should be output literally since there is no matching tag that begins it
9077 Parser hook: basic arguments using terminated empty elements (bug 2374)
9079 <tag width=200 height = "100" depth = '50' square/>
9089 'square' => 'square',
9098 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
9102 Parser hook: static parser hook not inside a comment
9104 <statictag>hello, world</statictag>
9105 <statictag action=flush/>
9113 Parser hook: static parser hook inside a comment
9115 <!-- <statictag>hello, world</statictag> -->
9116 <statictag action=flush/>
9122 # Nested template calls; this case was broken by Parser.php rev 1.506,
9126 Template:One-parameter
9128 (My parameter is: {{{1}}})
9132 Template:Map-one-parameter
9138 Nested template calls
9140 {{Map-one-parameter|One-parameter|param}}
9142 <p>(My parameter is: param)
9151 Sanitizer: Closing of open tags
9153 <s></s><table></table>
9155 <s></s><table></table>
9160 Sanitizer: Closing of open but not closed tags
9169 Sanitizer: Closing of closed but not open tags
9178 Sanitizer: Closing of closed but not open table tags
9180 Table not started</td></tr></table>
9182 <p>Table not started</td></tr></table>
9187 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
9189 <span id="æ: v">byte</span>[[#æ: v|backlink]]
9191 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
9196 Sanitizer: Validating the contents of the id attribute (bug 4515)
9202 Something, but definitely not <br id="9" />...
9206 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
9210 <br id="foo" /><br id="foo" />
9212 Something need to be done. foo-2 ?
9216 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
9219 <meta itemprop="hello" content="world">
9220 <meta http-equiv="refresh" content="5">
9221 <meta itemprop="hello" http-equiv="refresh" content="5">
9222 <link itemprop="hello" href="{{SERVER}}">
9223 <link rel="stylesheet" href="{{SERVER}}">
9224 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
9227 <div itemscope="itemscope">
9228 <p> <meta itemprop="hello" content="world" />
9229 <meta http-equiv="refresh" content="5">
9230 <meta itemprop="hello" content="5" />
9232 <link itemprop="hello" href="http://example.org" />
9233 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
9234 <link itemprop="hello" href="http://example.org" />
9240 Language converter: output gets cut off unexpectedly (bug 5757)
9244 this bit is safe: }-
9246 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
9248 then we get cut off here: }-
9250 all additional text is vanished
9252 <p>this bit is safe: }-
9253 </p><p>but if we add a conversion instance: xxx
9254 </p><p>then we get cut off here: }-
9255 </p><p>all additional text is vanished
9260 Self closed html pairs (bug 5487)
9263 <center><font id="bug" />Centered text</center>
9264 <div><font id="bug2" />In div text</div>
9266 <center><font id="bug" />Centered text</center>
9267 <div><font id="bug2" />In div text</div>
9276 Punctuation: nbsp before exclamation
9280 <p>C'est grave !
9285 Punctuation: CSS !important (bug 11874)
9287 <div style="width:50% !important">important</div>
9289 <div style="width:50% !important">important</div>
9294 Punctuation: CSS ! important (bug 11874; with space after)
9296 <div style="width:50% ! important">important</div>
9298 <div style="width:50% ! important">important</div>
9304 HTML bullet list, closed tags (bug 5497)
9319 HTML bullet list, unclosed tags (bug 5497)
9336 HTML ordered list, closed tags (bug 5497)
9351 HTML ordered list, unclosed tags (bug 5497)
9368 HTML nested bullet list, closed tags (bug 5497)
9393 HTML nested bullet list, open tags (bug 5497)
9418 HTML nested ordered list, closed tags (bug 5497)
9443 HTML nested ordered list, open tags (bug 5497)
9468 HTML ordered list item with parameters oddity
9470 <ol><li id="fragment">One</li></ol>
9472 <ol><li id="fragment">One</li></ol>
9477 bug 5918: autonumbering
9479 [http://first/] [http://second] [ftp://ftp]
9483 [mailto:enclosed@mail.tld With target]
9485 [mailto:enclosed@mail.tld]
9487 mailto:inline@mail.tld
9489 <p><a rel="nofollow" class="external autonumber" href="http://first/">[1]</a> <a rel="nofollow" class="external autonumber" href="http://second">[2]</a> <a rel="nofollow" class="external autonumber" href="ftp://ftp">[3]</a>
9490 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
9491 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
9492 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
9493 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
9499 # Security and HTML correctness
9500 # From Nick Jenkins' fuzz testing
9504 Fuzz testing: Parser13
9519 Fuzz testing: Parser14
9524 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</span> <span class="mw-headline" id="onmouseover.3D">onmouseover=</span></h2>
9525 http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
9527 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
9534 Fuzz testing: Parser14-table
9539 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline" id="a">a</span></h2>
9540 <table style="__TOC__">
9546 # Known to produce bogus xml (extra </td>)
9548 Fuzz testing: Parser16
9568 Fuzz testing: Parser21
9571 ! irc://{{ftp://a" onmouseover="alert('hello world');"
9576 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
9586 Fuzz testing: Parser22
9588 http://===r:::https://b
9592 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
9600 # Known to produce bad XML for now
9602 Fuzz testing: Parser24
9609 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
9610 <br style="onmouseover='alert(document.cookie);' " />
9612 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
9617 <u class="|">}}}} >
9618 <br style="onmouseover='alert(document.cookie);'" />
9620 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
9629 # Note: the current result listed for this is not what the original one was,
9630 # but the original bug was JavaScript injection, which is fixed in any case.
9631 # It's not clear that the original result listed was any more correct than the
9632 # current one. Original result:
9635 # <li class="||">
9636 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
9638 Fuzz testing: Parser25 (bug 6055)
9644 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
9646 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
9651 Fuzz testing: URL adjacent extension (with space, clean)
9654 http://example.com <nowiki>junk</nowiki>
9656 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
9661 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
9664 http://example.com<nowiki>junk</nowiki>
9666 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
9671 Fuzz testing: URL adjacent extension (no space, dirty; pre)
9674 http://example.com<pre>junk</pre>
9676 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
9681 Fuzz testing: image with bogus manual thumbnail
9683 [[Image:foobar.jpg|thumbnail= ]]
9685 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
9690 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
9692 <pre dir=" "></pre>
9694 <pre dir=" "></pre>
9699 Parsing optional HTML elements (Bug 6171)
9704 <td> Some tabular data</td>
9705 <td> More tabular data ...
9706 <td> And yet som tabular data</td>
9712 <td> Some tabular data</td>
9713 <td> More tabular data ...
9714 </td><td> And yet som tabular data</td>
9721 Correct handling of <td>, <tr> (Bug 6171)
9726 <td> Some tabular data</td>
9727 <td> More tabular data ...</td>
9728 <td> And yet som tabular data</td>
9734 <td> Some tabular data</td>
9735 <td> More tabular data ...</td>
9736 <td> And yet som tabular data</td>
9744 Parsing crashing regression (fr:JavaScript)
9748 <p></body></x>
9753 Inline wiki vs wiki block nesting
9759 <p><b>Bold paragraph</b>
9760 </p><p>New wiki paragraph
9765 Inline HTML vs wiki block nesting
9773 <p><b>Bold paragraph</b>
9774 </p><p>New wiki paragraph
9778 # Original result was this:
9779 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
9781 # While that might be marginally more intuitive, maybe, the six-apostrophe
9782 # construct is clearly pathological and the result stated here (which is what
9783 # the parser actually does) is about as reasonable as anything.
9785 Mixing markup for italics and bold
9788 '''bold''''''bold''bolditalics'''''
9790 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
9798 Article for special page transclusion test
9802 Special page transclusion
9805 {{Special:Prefixindex/Xyzzyx}}
9807 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
9812 Special page transclusion twice (bug 5021)
9815 {{Special:Prefixindex/Xyzzyx}}
9816 {{Special:Prefixindex/Xyzzyx}}
9818 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
9819 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
9824 Transclusion of default MediaWiki message
9826 {{MediaWiki:Mainpage}}
9833 Transclusion of nonexistent MediaWiki message
9835 {{MediaWiki:Mainpagexxx}}
9837 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
9842 Transclusion of MediaWiki message with underscore
9844 {{MediaWiki:history_short}}
9851 Transclusion of MediaWiki message with space
9853 {{MediaWiki:history short}}
9860 Invalid header with following text
9870 Section extraction test (section 0)
9890 Section extraction test (section 1)
9912 Section extraction test (section 2)
9933 Section extraction test (section 3)
9953 Section extraction test (section 4)
9977 Section extraction test (section 5)
9997 Section extraction test (section 6)
10018 Section extraction test (section 7)
10038 Section extraction test (section 8)
10058 Section extraction test (section 9)
10079 Section extraction test (section 10)
10099 Section extraction test (nonexistent section 11)
10118 Section extraction test with bogus heading (section 1)
10123 ==bogus== not a legal section
10127 ==bogus== not a legal section
10131 Section extraction test with bogus heading (section 2)
10136 ==bogus== not a legal section
10143 Section extraction test with comment after heading (section 1)
10155 Section extraction test with comment after heading (section 2)
10167 Section extraction test with bogus <nowiki> heading (section 1)
10172 ==bogus== <nowiki>not a legal section</nowiki>
10176 ==bogus== <nowiki>not a legal section</nowiki>
10180 Section extraction test with bogus <nowiki> heading (section 2)
10185 ==bogus== <nowiki>not a legal section</nowiki>
10192 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
10193 # instead of respecting commented sections
10195 Section extraction prefixed by comment (section 1)
10206 Section extraction prefixed by comment (section 2)
10217 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
10218 # instead of respecting HTML-style headings
10220 Section extraction, mixed wiki and html (section 1)
10236 Section extraction, mixed wiki and html (section 2)
10252 # Formerly testing for bug 3342
10254 Section extraction, heading surrounded by <noinclude>
10258 <noinclude>==unmarked==</noinclude>
10264 # Test behavior of bug 19910
10266 Sectiion with all-equals
10271 The line above must have a trailing space
10274 But just in case it doesn't...
10278 But just in case it doesn't...
10282 Section replacement test (section 0)
10313 Section replacement test (section 1)
10342 Section replacement test (section 2)
10372 Section replacement test (section 3)
10403 Section replacement test (section 4)
10430 Section replacement test (section 5)
10461 Section replacement test (section 6)
10491 Section replacement test (section 7)
10522 Section replacement test (section 8)
10553 Section replacement test (section 9)
10582 Section replacement test (section 10)
10612 Section replacement test with initial whitespace (bug 13728)
10616 Preformatted initial line
10620 Preformatted initial line
10627 Section extraction, heading followed by pre with 20 spaces (bug 6398)
10639 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
10652 Section extraction, <pre> around bogus header (bug 10309)
10669 Section replacement, <pre> around bogus header (bug 10309)
10671 noxml replace=2,"xxx"
10692 Handling of 
 in URLs
10696 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
10703 5 quotes, code coverage +1 line
10710 Special:Search page linking.
10714 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
10726 * {{BASEPAGENAMEE}}
10728 * {{TALKPAGENAMEE}}
10729 * {{SUBJECTPAGENAME}}
10730 * {{SUBJECTPAGENAMEE}}
10736 * {{SUBJECTSPACEE}}
10737 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
10739 <ul><li> Parser test
10740 </li><li> Parser test
10741 </li><li> Parser test
10742 </li><li> Parser_test
10743 </li><li> Parser test
10744 </li><li> Parser_test
10745 </li><li> Talk:Parser test
10746 </li><li> Talk:Parser_test
10747 </li><li> Parser test
10748 </li><li> Parser_test
10755 </li><li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a>
10759 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
10769 image4 |300px| centre
10770 image5.svg| http://///////
10775 <ul class="gallery">
10776 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10777 <div style="height: 150px;">Image1.png</div>
10778 <div class="gallerytext">
10781 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10782 <div style="height: 150px;">Image2.gif</div>
10783 <div class="gallerytext">
10788 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10789 <div style="height: 150px;">Image3</div>
10790 <div class="gallerytext">
10793 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10794 <div style="height: 150px;">Image4</div>
10795 <div class="gallerytext">
10800 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10801 <div style="height: 150px;">Image5.svg</div>
10802 <div class="gallerytext">
10803 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
10807 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10808 <div style="height: 150px;">* image6</div>
10809 <div class="gallerytext">
10817 Gallery (with options)
10819 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
10820 File:Nonexistant.jpg|caption
10821 File:Nonexistant.jpg
10822 image:foobar.jpg|some '''caption''' [[Main Page]]
10824 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
10827 <ul class="gallery" style="max-width: 226px;_width: 226px;">
10828 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
10829 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10830 <div style="height: 70px;">Nonexistant.jpg</div>
10831 <div class="gallerytext">
10836 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10837 <div style="height: 70px;">Nonexistant.jpg</div>
10838 <div class="gallerytext">
10841 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10842 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
10843 <div class="gallerytext">
10844 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10848 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10849 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
10850 <div class="gallerytext">
10853 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10854 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
10855 <div class="gallerytext">
10865 Gallery with wikitext inside caption
10868 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
10869 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
10872 <ul class="gallery">
10873 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10874 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
10875 <div class="gallerytext">
10876 <p><a href="/wiki/File:Foobar.jpg" class="image" title="desc"><img alt="inneralt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
10880 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10881 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
10882 <div class="gallerytext">
10883 <p>This is a test template
10892 gallery (with showfilename option)
10894 <gallery showfilename>
10895 File:Nonexistant.jpg|caption
10896 File:Nonexistant.jpg
10897 image:foobar.jpg|some '''caption''' [[Main Page]]
10901 <ul class="gallery">
10902 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10903 <div style="height: 150px;">Nonexistant.jpg</div>
10904 <div class="gallerytext">
10905 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
10910 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10911 <div style="height: 150px;">Nonexistant.jpg</div>
10912 <div class="gallerytext">
10913 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
10917 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10918 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
10919 <div class="gallerytext">
10920 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
10921 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10925 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10926 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
10927 <div class="gallerytext">
10928 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
10937 Gallery (with namespace-less filenames)
10940 File:Nonexistant.jpg
10946 <ul class="gallery">
10947 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10948 <div style="height: 150px;">Nonexistant.jpg</div>
10949 <div class="gallerytext">
10952 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10953 <div style="height: 150px;">Nonexistant.jpg</div>
10954 <div class="gallerytext">
10957 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10958 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
10959 <div class="gallerytext">
10962 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10963 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
10964 <div class="gallerytext">
10972 HTML Hex character encoding (spells the word "JavaScript")
10974 JavaScript
10976 <p>JavaScript
10981 HTML Hex character encoding bogus encoding (bug 26437 regression check)
10985 <p>&#xsee;&#XSEE;
10990 HTML Hex character encoding mixed case
10999 __FORCETOC__ override
11011 ISBN 978-0-1234-56 789
11013 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
11018 ISBN followed by 5 spaces
11029 ISBN ISBN 1234567890
11031 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
11036 Bug 22905: <abbr> followed by ISBN followed by </a>
11038 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
11040 <p><abbr>(fr)</abbr> <a href="/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a rel="nofollow" class="external text" href="http://www.example.com">example.com</a>
11049 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
11054 Double RFC with a wiki link
11058 <p>RFC <a href="/index.php?title=RFC_1234&action=edit&redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a>
11067 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
11072 Centre-aligned image
11074 [[Image:foobar.jpg|centre]]
11076 <div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div>
11083 [[Image:foobar.jpg|none]]
11085 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11090 Width + Height sized image (using px) (height is ignored)
11092 [[Image:foobar.jpg|640x480px]]
11094 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
11099 Width-sized image (using px, no following whitespace)
11101 [[Image:foobar.jpg|640px]]
11103 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
11108 Width-sized image (using px, with following whitespace - test regression from r39467)
11110 [[Image:foobar.jpg|640px ]]
11112 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
11117 Width-sized image (using px, with preceding whitespace - test regression from r39467)
11119 [[Image:foobar.jpg| 640px]]
11121 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
11126 Another italics / bold test
11134 # Note the results may be incorrect, as parserTest output included this:
11135 # XML error: Mismatched tag at byte 6120:
11136 # ...<dd> </dt></dl> </dd...
11144 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
11155 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
11157 Images with the "|" character in the comment
11159 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
11161 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div>
11166 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
11168 <html><script>alert(1);</script></html>
11170 <p><html><script>alert(1);</script></html>
11175 HTML with raw HTML ($wgRawHtml==true)
11179 <html><script>alert(1);</script></html>
11181 <p><script>alert(1);</script>
11186 Parents of subpages, one level up
11188 subpage title=[[Subpage test/L1/L2/L3]]
11192 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a>
11198 Parents of subpages, one level up, not named
11200 subpage title=[[Subpage test/L1/L2/L3]]
11204 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a>
11211 Parents of subpages, two levels up
11213 subpage title=[[Subpage test/L1/L2/L3]]
11219 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a>2
11220 </p><p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1l</a>
11225 Parents of subpages, two levels up, without trailing slash or name.
11227 subpage title=[[Subpage test/L1/L2/L3]]
11236 Parents of subpages, two levels up, with lots of extra trailing slashes.
11238 subpage title=[[Subpage test/L1/L2/L3]]
11242 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
11247 Definition list code coverage
11253 <dl><dt> title  </dt><dd> def
11254 </dd><dt> title </dt><dd> def
11255 </dd><dt>title</dt><dd> def
11261 Don't fall for the self-closing div
11263 <div>hello world</div/>
11265 <div>hello world</div>
11274 <p>[[:Template:Msg]]
11283 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
11287 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
11289 Always escape literal '>' in output, not just after '<'
11303 <p>This is a test template
11304 This is a test template
11316 Inclusion of !userCanEdit() content
11320 <h2><span class="editsection">[<a href="/index.php?title=MediaWiki:Fake&action=edit&section=T-1" title="MediaWiki:Fake">edit</a>]</span> <span class="mw-headline" id="header">header</span></h2>
11326 Out-of-order TOC heading levels
11335 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
11337 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
11339 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
11340 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
11343 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
11345 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
11346 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
11351 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 2">edit</a>]</span> <span class="mw-headline" id="2">2</span></h2>
11352 <h6><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 6">edit</a>]</span> <span class="mw-headline" id="6">6</span></h6>
11353 <h3><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 3">edit</a>]</span> <span class="mw-headline" id="3">3</span></h3>
11354 <h1><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 1">edit</a>]</span> <span class="mw-headline" id="1">1</span></h1>
11355 <h5><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 5">edit</a>]</span> <span class="mw-headline" id="5">5</span></h5>
11356 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: 2">edit</a>]</span> <span class="mw-headline" id="2_2">2</span></h2>
11362 ISBN with a dummy number
11372 ISBN with space-delimited number
11376 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
11382 ISBN with multiple spaces, no number
11401 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
11402 </p><p>ISBN 12345678901
11408 ISBN with trailing year (bug 8110)
11410 ISBN 1-234-56789-0 - 2006
11412 ISBN 1 234 56789 0 - 2006
11414 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
11415 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
11423 {{anchorencode:foo bar©#%n}}
11425 <p>foo_bar.C2.A9.23.25n
11430 anchorencode trims spaces
11432 {{anchorencode: __pretty__please__}}
11439 anchorencode deals with links
11441 {{anchorencode: [[hello|world]] [[hi]]}}
11448 anchorencode deals with templates
11450 {{anchorencode: {{Foo}} }}
11457 anchorencode encodes like the TOC generator: (bug 18431)
11459 === _ +:.3A%3A&&]] ===
11460 {{anchorencode: _ +:.3A%3A&&]] }}
11463 <h3> <span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
11464 <p>.2B:.3A.253A.26.26.5D.5D
11468 # Expected output in the following test is not necessarily expected (there
11469 # should probably be <p> tags inside the <blockquote> in the output) -- it's
11470 # only testing for well-formedness.
11472 Bug 6200: blockquotes and paragraph formatting
11492 Bug 8293: Use of center tag ruins paragraph formatting
11513 Parsing of overlapping (improperly nested) inline html tags (PHP parser)
11517 <span><s>x</span></s>
11519 <p><span><s>x</span></s></span>
11524 Parsing of overlapping (improperly nested) inline html tags (Parsoid)
11528 <span><s>x</span></s>
11530 <p><span><s>x</s></span><s></s>
11535 ### Language variants related tests
11538 Self-link in language variants
11540 title=[[Dunav]] language=sr
11542 Both [[Dunav]] and [[Дунав]] are names for this river.
11544 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
11555 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
11557 title=[[Duna]] language=sr
11559 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
11561 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <strong class="selflink">Duna</strong> and <strong class="selflink">Dуна</strong> are still self-links.
11566 Link to pages in language variants
11570 Main Page can be written as [[Маин Паге]]
11572 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
11578 Multiple links to pages in language variants
11582 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
11584 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a> same as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>.
11590 Simple template in language variants
11596 <p>This is a test template
11602 Template with explicit namespace in language variants
11608 <p>This is a test template
11614 Basic test for template parameter in language variants
11618 {{парамтест|param=foo}}
11620 <p>This is a test template with parameter foo
11626 Simple category in language variants
11630 [[Category:МедиаWики Усер'с Гуиде]]
11632 <a href="/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%98%D0%B0:MediaWiki_User%27s_Guide" title="Категорија:MediaWiki User's Guide">MediaWiki User's Guide</a>
11649 Don't convert blue categorylinks to another variant (bug 33210)
11653 [[A]][[Category:分类]]
11655 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
11660 Stripping -{}- tags (language variants)
11664 Latin proverb: -{Ne nuntium necare}-
11666 <p>Latin proverb: Ne nuntium necare
11672 Prevent conversion with -{}- tags (language variants)
11674 language=sr variant=sr-ec
11676 Latinski: -{Ne nuntium necare}-
11678 <p>Латински: Ne nuntium necare
11684 Prevent conversion of text with -{}- tags (language variants)
11686 language=sr variant=sr-ec
11688 Latinski: -{Ne nuntium necare}-
11690 <p>Латински: Ne nuntium necare
11696 Prevent conversion of links with -{}- tags (language variants)
11698 language=sr variant=sr-ec
11702 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11708 -{}- tags within headlines (within html for parserConvert())
11710 language=sr variant=sr-ec
11714 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Уредите одељак „Naslov“">уреди</a>]</span> <span class="mw-headline" id="-.7BNaslov.7D-">Naslov</span></h2>
11720 Explicit definition of language variant alternatives
11722 language=zh variant=zh-tw
11724 -{zh:China;zh-tw:Taiwan}-, not China
11726 <p>Taiwan, not China
11732 Conversion around HTML tags
11734 language=sr variant=sr-ec
11736 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
11737 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
11740 <span title="ЛаCтин">ски</span>
11746 Explicit session-wise language variant mapping (A flag and - flag)
11748 language=zh variant=zh-tw
11750 Taiwan is not China.
11751 But -{A|zh:China;zh-tw:Taiwan}- is China,
11752 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
11753 and -{China}- is China.
11755 <p>Taiwan is not China.
11756 But Taiwan is Taiwan,
11757 (This should be stripped!)
11758 and China is China.
11763 Explicit session-wise language variant mapping (H flag for hide)
11765 language=zh variant=zh-tw
11767 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
11770 <p>(This should be stripped!)
11776 Adding explicit conversion rule for title (T flag)
11778 language=zh variant=zh-tw showtitle
11780 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
11783 <p>Should be stripped!
11788 Testing that changing the language variant here in the tests actually works
11790 language=zh variant=zh showtitle
11792 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
11795 <p>Should be stripped!
11800 Recursive conversion of alt and title attrs shouldn't clear converter state
11802 language=zh variant=zh-cn showtitle
11804 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
11805 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
11809 Should be stripped<span title="Exclamation">!</span>
11814 Bug 24072: more test on conversion rule for title
11816 language=zh variant=zh-tw showtitle
11818 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
11819 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
11822 <p>This should be stripped!
11823 This won't take interferes with the title rule.
11828 Raw output of variant escape tags (R flag)
11830 language=zh variant=zh-tw
11832 Raw: -{R|zh:China;zh-tw:Taiwan}-
11834 <p>Raw: zh:China;zh-tw:Taiwan
11839 Nested using of manual convert syntax
11841 language=zh variant=zh-hk
11843 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
11845 <p>Nested: Hello Hong Kong!
11850 Proper conversion of text in external links
11852 language=sr variant=sr-ec
11854 http://www.google.com
11855 gopher://www.google.com
11856 [http://www.google.com http://www.google.com]
11857 [gopher://www.google.com gopher://www.google.com]
11858 [https://www.google.com irc://www.google.com]
11859 [ftp://www.google.com www.google.com/ftp://dir]
11860 [//www.google.com www.google.com]
11862 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
11863 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
11864 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
11865 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
11866 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
11867 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
11868 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
11873 Do not convert roman numbers to language variants
11875 language=sr variant=sr-ec
11879 <p>Фридрих IV је цар.
11884 Unclosed language converter markup "-{"
11895 Don't convert raw rule "-{R|=>}-" to "=>"
11912 Bug 529: Uncovered bullet
11922 # Plain MediaWiki does not remove empty lists, but tidy actually does.
11923 # Templates in Wikipedia rely on this behavior, as tidy has always been
11924 # enabled there. These tests are normally run *without* tidy, so specify the
11925 # full output here.
11926 # To test realistic parsing behavior, apply a tidy-like transformation to both
11927 # the expected output and your parser's output.
11929 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
11931 ******* Foo {{bullet}}
11933 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
11946 Bug 529: Uncovered table already at line-start
11969 Bug 529: Uncovered bullet in parser function result
11971 * Foo {{lc:{{bullet}} }}
11980 Bug 5678: Double-parsed template argument
11982 {{lc:{{{1}}}|hello}}
11989 Bug 5678: Double-parsed template invocation
11991 {{lc:{{paramtest {{!}} param = hello }} }}
11993 <p>{{paramtest | param = hello }}
11998 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
12001 title=[[Main Page]]
12003 {{PRVNÍVELKÉ:ěščř}}
12004 {{prvnívelké:ěščř}}
12024 Morwen/13: Unclosed link followed by heading
12031 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a>]</span> <span class="mw-headline" id="heading">heading</span></h2>
12036 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
12043 <h1> <span class="mw-headline" id="heading">heading</span></h1>
12048 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
12055 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a>]</span> <span class="mw-headline" id="heading">heading</span></h2>
12070 Paragraphs inside divs (no extra line breaks)
12082 Paragraphs inside divs (extra line break on open)
12097 Paragraphs inside divs (extra line break on close)
12112 Paragraphs inside divs (extra line break on open and close)
12129 Nesting tags, paragraphs on lines which begin with <div>
12133 <div></div><strong>A
12142 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
12144 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
12148 <blockquote>Line one
12150 Line two</blockquote>
12152 <blockquote>Line one
12153 Line two</blockquote>
12158 Bug 6200: paragraphs inside blockquotes (extra line break on open)
12165 Line two</blockquote>
12170 Line two</blockquote>
12175 Bug 6200: paragraphs inside blockquotes (extra line break on close)
12179 <blockquote>Line one
12184 <blockquote>Line one
12192 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
12211 Paragraphs inside blockquotes/divs (no extra line breaks)
12213 <blockquote><div>Line one
12215 Line two</div></blockquote>
12217 <blockquote><div>Line one
12218 Line two</div></blockquote>
12223 Paragraphs inside blockquotes/divs (extra line break on open)
12228 Line two</div></blockquote>
12233 Line two</div></blockquote>
12238 Paragraphs inside blockquotes/divs (extra line break on close)
12240 <blockquote><div>Line one
12243 </div></blockquote>
12245 <blockquote><div>Line one
12248 </div></blockquote>
12253 Paragraphs inside blockquotes/divs (extra line break on open and close)
12259 </div></blockquote>
12265 </div></blockquote>
12270 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
12272 wgLinkHolderBatchSize=0
12278 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
12279 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
12280 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
12285 Free external link invading image caption
12287 [[Image:Foobar.jpg|thumb|http://x|hello]]
12289 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>hello</div></div></div>
12294 Bug 15196: localised external link numbers
12298 [http://en.wikipedia.org/]
12300 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
12305 Multibyte character in padleft
12307 {{padleft:-Hello|7|Æ}}
12314 Multibyte character in padright
12316 {{padright:Hello-|7|Æ}}
12323 formatdate parser function
12325 {{#formatdate:2009-03-24}}
12327 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
12332 formatdate parser function, with default format
12334 {{#formatdate:2009-03-24|mdy}}
12336 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
12341 Spacing of numbers in formatted dates
12343 {{#formatdate:January 15}}
12345 <p><span class="mw-formatted-date" title="01-15">January 15</span>
12350 formatdate parser function, with default format and on a page of which the content language is always English and different from the wiki content language
12352 language=nl title=[[MediaWiki:Common.css]]
12354 {{#formatdate:2009-03-24|dmy}}
12356 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
12369 Edit comment with link
12373 I like the [[Main Page]] a lot
12375 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
12379 Edit comment with link and link text
12383 I like the [[Main Page|best pages]] a lot
12385 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
12389 Edit comment with link and link text with suffix
12393 I like the [[Main Page|best page]]s a lot
12395 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
12399 Edit comment with section link (non-local, eg in history list)
12401 comment title=[[Main Page]]
12403 /* External links */ removed bogus entries
12405 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
12409 Edit comment with section link and text before it (non-local, eg in history list)
12411 comment title=[[Main Page]]
12413 pre-comment text /* External links */ removed bogus entries
12415 pre-comment text - <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
12419 Edit comment with section link (local, eg in diff view)
12421 comment local title=[[Main Page]]
12423 /* External links */ removed bogus entries
12425 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
12429 Edit comment with subpage link (bug 14080)
12433 title=[[Subpage test]]
12435 Poked at a [[/subpage]] here...
12437 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
12441 Edit comment with subpage link and link text (bug 14080)
12445 title=[[Subpage test]]
12447 Poked at a [[/subpage|neat little page]] here...
12449 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
12453 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
12456 title=[[Subpage test]]
12458 Poked at a [[/subpage]] here...
12460 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
12464 Edit comment with bare anchor link (local, as on diff)
12468 title=[[Main Page]]
12472 <a href="#section">#section</a>
12476 Edit comment with bare anchor link (non-local, as on history)
12479 title=[[Main Page]]
12483 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
12487 Anchor starting with underscore
12491 <p><a href="#_ref">One</a>
12496 Id starting with underscore
12498 <div id="_ref"></div>
12500 <div id="_ref"></div>
12505 Space normalisation on autocomment (bug 22784)
12508 title=[[Main Page]]
12510 /* __hello__world__ */
12512 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
12516 percent-encoding and + signs in comments (Bug 26410)
12520 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
12522 <a href="/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">ABC3D% ++</a> <a href="/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">+%20</a>
12526 Bad images - basic functionality
12535 Bad images - bug 16039: text after bad image disappears
12549 Verify that displaytitle works (bug #22501) no displaytitle
12553 wgAllowDisplayTitle=true
12554 wgRestrictDisplayTitle=false
12556 this is not the the title
12559 <p>this is not the the title
12564 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
12569 wgAllowDisplayTitle=true
12570 wgRestrictDisplayTitle=false
12572 this is not the the title
12573 {{DISPLAYTITLE:whatever}}
12576 <p>this is not the the title
12581 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
12586 wgAllowDisplayTitle=true
12587 wgRestrictDisplayTitle=true
12589 this is not the the title
12590 {{DISPLAYTITLE:whatever}}
12593 <p>this is not the the title
12598 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
12603 wgAllowDisplayTitle=true
12604 wgRestrictDisplayTitle=true
12606 this is not the the title
12607 {{DISPLAYTITLE:screen}}
12610 <p>this is not the the title
12615 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
12620 wgAllowDisplayTitle=false
12622 this is not the the title
12623 {{DISPLAYTITLE:screen}}
12626 <p>this is not the the title
12627 <a href="/index.php?title=Template:DISPLAYTITLE:screen&action=edit&redlink=1" class="new" title="Template:DISPLAYTITLE:screen (page does not exist)">Template:DISPLAYTITLE:screen</a>
12632 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
12637 wgAllowDisplayTitle=false
12639 this is not the the title
12642 <p>this is not the the title
12647 preload: check <noinclude> and <includeonly>
12651 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
12657 preload: check <onlyinclude>
12661 Goodbye <onlyinclude>Hello world</onlyinclude>
12667 preload: can pass tags through if we want to
12671 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
12673 <includeonly>Hello world</includeonly>
12677 preload: check that it doesn't try to do tricks
12681 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
12683 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
12687 Play a bit with r67090 and bug 3158
12691 <div style="width:50% !important"> </div>
12692 <div style="width:50% !important"> </div>
12693 <div style="width:50% !important"> </div>
12694 <div style="border : solid;"> </div>
12696 <div style="width:50% !important"> </div>
12697 <div style="width:50% !important"> </div>
12698 <div style="width:50% !important"> </div>
12699 <div style="border : solid;"> </div>
12704 HTML5 data attributes
12706 <span data-foo="bar">Baz</span>
12707 <p data-abc-def_hij="">Quuz</p>
12709 <p><span data-foo="bar">Baz</span>
12711 <p data-abc-def_hij="">Quuz</p>
12716 percent-encoding and + signs in internal links (Bug 26410)
12718 [[User:+%]] [[Page+title%]]
12719 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
12720 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
12721 [[%33%45]] [[%33%45+]]
12723 <p><a href="/index.php?title=User:%2B%25&action=edit&redlink=1" class="new" title="User:+% (page does not exist)">User:+%</a> <a href="/index.php?title=Page%2Btitle%25&action=edit&redlink=1" class="new" title="Page+title% (page does not exist)">Page+title%</a>
12724 <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+</a> <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%20</a> <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+ </a> <a href="/index.php?title=%25%2Br&action=edit&redlink=1" class="new" title="%+r (page does not exist)">%+r</a>
12725 <a href="/index.php?title=%25&action=edit&redlink=1" class="new" title="% (page does not exist)">%</a> <a href="/index.php?title=%2B&action=edit&redlink=1" class="new" title="+ (page does not exist)">+</a> <a href="/index.php?title=Special:Upload&wpDestFile=%25%2Babc9" class="new" title="File:%+abc9">bar</a>
12726 <a href="/index.php?title=3E&action=edit&redlink=1" class="new" title="3E (page does not exist)">3E</a> <a href="/index.php?title=3E%2B&action=edit&redlink=1" class="new" title="3E+ (page does not exist)">3E+</a>
12731 Special characters in embedded file links (bug 27679)
12733 [[File:Contains & ampersand.jpg]]
12734 [[File:Does not exist.jpg|Title with & ampersand]]
12736 <p><a href="/index.php?title=Special:Upload&wpDestFile=Contains_%26_ampersand.jpg" class="new" title="File:Contains & ampersand.jpg">File:Contains & ampersand.jpg</a>
12737 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
12743 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
12745 Text's been normalized?
12747 <p>Text's been normalized?
12752 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
12754 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
12756 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
12761 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
12763 [http://www.example.org/ ideograms]
12765 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
12770 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
12772 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
12774 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
12798 Bug 31098 Template which includes system messages which includes the template
12802 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
12803 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
12808 Bug31490 Turkish: ucfirst 'blah'
12819 Bug31490 Turkish: ucfirst 'ix'
12830 Bug31490 Turkish: lcfirst 'BLAH'
12841 Bug31490 Turkish: ucfırst (with a dotless i)
12847 <p><a href="/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Şablon:Ucfırst:blah (sayfa mevcut değil)">Şablon:Ucfırst:blah</a>
12852 Bug31490 ucfırst (with a dotless i) with English language
12858 <p><a href="/index.php?title=Template:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Template:Ucfırst:blah (page does not exist)">Template:Ucfırst:blah</a>
12863 Bug 26375: TOC with italics
12865 title=[[Main Page]]
12868 == ''Lost'' episodes ==
12870 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12872 <li class="toclevel-1 tocsection-1"><a href="#Lost_episodes"><span class="tocnumber">1</span> <span class="toctext"><i>Lost</i> episodes</span></a></li>
12875 <h2><span class="editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Lost episodes">edit</a>]</span> <span class="mw-headline" id="Lost_episodes"><i>Lost</i> episodes</span></h2>
12880 Bug 26375: TOC with bold
12882 title=[[Main Page]]
12885 == '''should be bold''' then normal text ==
12887 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12889 <li class="toclevel-1 tocsection-1"><a href="#should_be_bold_then_normal_text"><span class="tocnumber">1</span> <span class="toctext"><b>should be bold</b> then normal text</span></a></li>
12892 <h2><span class="editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: should be bold then normal text">edit</a>]</span> <span class="mw-headline" id="should_be_bold_then_normal_text"><b>should be bold</b> then normal text</span></h2>
12897 Bug 33845: Headings become cursive in TOC when they contain an image
12899 title=[[Main Page]]
12902 == Image [[Image:foobar.jpg]] ==
12904 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12906 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
12909 <h2><span class="editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Image">edit</a>]</span> <span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></span></h2>
12914 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
12916 title=[[Main Page]]
12919 == <blockquote>Quote</blockquote> ==
12921 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12923 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
12926 <h2><span class="editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Quote">edit</a>]</span> <span class="mw-headline" id="Quote"><blockquote>Quote</blockquote></span></h2>
12931 Unclosed tags in TOC
12933 title=[[Main Page]]
12937 <small>Hanc marginis exiguitas non caperet.</small>
12940 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12942 <li class="toclevel-1 tocsection-1"><a href="#Proof:_2_.3C_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 < 3</span></a></li>
12945 <h2><span class="editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Proof: 2 < 3">edit</a>]</span> <span class="mw-headline" id="Proof:_2_.3C_3">Proof: 2 < 3</span></h2>
12946 <p><small>Hanc marginis exiguitas non caperet.</small>
12952 Multiple tags in TOC
12955 == <i>Foo</i> <b>Bar</b> ==
12957 == <i>Foo</i> <blockquote>Bar</blockquote> ==
12959 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12961 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
12962 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
12965 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a>]</span> <span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span></h2>
12966 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a>]</span> <span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>Bar</blockquote></span></h2>
12971 Tags with parameters in TOC
12974 == <sup class="in-h2">Hello</sup> ==
12976 == <sup class="a > b">Evilbye</sup> ==
12978 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12980 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
12981 <li class="toclevel-1 tocsection-2"><a href="#b.22.3EEvilbye"><span class="tocnumber">2</span> <span class="toctext"><sup> b">Evilbye</sup></span></a></li>
12984 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Hello">edit</a>]</span> <span class="mw-headline" id="Hello"><sup class="in-h2">Hello</sup></span></h2>
12985 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a>]</span> <span class="mw-headline" id="b.22.3EEvilbye"><sup> b">Evilbye</sup></span></h2>
12990 span tags with directionality in TOC
12993 == <span dir="ltr">C++</span> ==
12995 == <span dir="rtl">זבנג!</span> ==
12997 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
12999 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
13001 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
13003 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
13005 <li class="toclevel-1 tocsection-1"><a href="#C.2B.2B"><span class="tocnumber">1</span> <span class="toctext"><span dir="ltr">C++</span></span></a></li>
13006 <li class="toclevel-1 tocsection-2"><a href="#.D7.96.D7.91.D7.A0.D7.92.21"><span class="tocnumber">2</span> <span class="toctext"><span dir="rtl">זבנג!</span></span></a></li>
13007 <li class="toclevel-1 tocsection-3"><a href="#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">3</span> <span class="toctext"><span>The attributes on these span tags must be deleted from the TOC</span></span></a></li>
13008 <li class="toclevel-1 tocsection-4"><a href="#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">4</span> <span class="toctext"><span>All attributes on these span tags must be deleted from the TOC</span></span></a></li>
13009 <li class="toclevel-1 tocsection-5"><a href="#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">5</span> <span class="toctext"><span dir="ltr">Attributes after dir on these span tags must be deleted from the TOC</span></span></a></li>
13012 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: C++">edit</a>]</span> <span class="mw-headline" id="C.2B.2B"><span dir="ltr">C++</span></span></h2>
13013 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: זבנג!">edit</a>]</span> <span class="mw-headline" id=".D7.96.D7.91.D7.A0.D7.92.21"><span dir="rtl">זבנג!</span></span></h2>
13014 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: The attributes on these span tags must be deleted from the TOC">edit</a>]</span> <span class="mw-headline" id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></span></h2>
13015 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: All attributes on these span tags must be deleted from the TOC">edit</a>]</span> <span class="mw-headline" id="All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span></span></h2>
13016 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Attributes after dir on these span tags must be deleted from the TOC">edit</a>]</span> <span class="mw-headline" id="Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span></span></h2>
13023 == {{int:headline_sample}} ==
13027 Bug 32057: Title needed when expanding <h> nodes.
13029 title=[[Main Page]]
13033 <h2><span class="editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Headline text">edit</a>]</span> <span class="mw-headline" id="Headline_text">Headline text</span></h2>
13038 Strip marker in urlencode
13040 {{urlencode:x<nowiki/>y}}
13041 {{urlencode:x<nowiki/>y|wiki}}
13042 {{urlencode:x<nowiki/>y|path}}
13069 Strip marker in formatNum
13071 {{formatnum:1<nowiki/>2}}
13072 {{formatnum:1<nowiki/>2|R}}
13080 Check noCommafy in formatNum
13084 {{formatnum:123456.78}}
13085 {{formatnum:123456.78|NOSEP}}
13093 Strip marker in grammar
13097 {{grammar:elative|foo<nowiki/>bar}}
13104 Strip marker in padleft
13106 {{padleft:|2|x<nowiki/>y}}
13113 Strip marker in padright
13115 {{padright:|2|x<nowiki/>y}}
13122 Strip marker in anchorencode
13124 {{anchorencode:x<nowiki/>y}}
13131 nowiki inside link inside heading (bug 18295)
13133 ==[[foo|x<nowiki>y</nowiki>z]]==
13135 <h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: xyz">edit</a>]</span> <span class="mw-headline" id="xyz"><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">xyz</a></span></h2>
13140 new support for bdi element (bug 31817)
13142 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
13144 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
13149 Ignore pipe between table row attributes
13153 |- id=foo | style='color: red'
13161 <tr id="foo" style="color: red">
13168 Gallery override link with WikiLink (bug 34852)
13171 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
13174 <ul class="gallery">
13175 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13176 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/InterWikiLink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
13177 <div class="gallerytext">
13187 Gallery override link with absolute external link (bug 34852)
13190 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
13193 <ul class="gallery">
13194 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13195 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
13196 <div class="gallerytext">
13206 Gallery override link with malicious javascript (bug 34852)
13209 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
13212 <ul class="gallery">
13213 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13214 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
13215 <div class="gallerytext">
13225 Gallery with invalid title as link (bug 43964)
13228 File:foobar.jpg|link=<
13231 <ul class="gallery">
13232 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13233 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
13234 <div class="gallerytext">
13242 Language parser function
13251 Padleft and padright as substr
13253 {{padleft:|3|abcde}}
13254 {{padright:|3|abcde}}
13262 Bug 34939 - Case insensitive link parsing ([HttP://])
13264 [HttP://MediaWiki.Org/]
13266 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
13271 Bug 34939 - Case insensitive link parsing ([HttP:// title])
13273 [HttP://MediaWiki.Org/ MediaWiki]
13275 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
13280 Bug 34939 - Case insensitive link parsing (HttP://)
13282 HttP://MediaWiki.Org/
13284 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
13289 ### Parsoids-specific tests
13290 ### Parsoid-PHP parser incompatibilities
13293 1. SOL-sensitive wikitext tokens as template-args
13307 #### The following section of tests are primarily to test
13308 #### wikitext escaping capabilities of Parsoid.
13309 #### A lot of the tests are disabled for the PHP parser either
13310 #### because of minor newline diffs or other reasons.
13311 #### As Parsoid serializer can handle newlines and other HTML
13312 #### more robustly, some of these tests might get reenabled
13313 #### for the PHP parser.
13315 #### --------------- Headings ---------------
13317 #### 1. Nested inside html <h1>=foo=</h1>
13318 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
13319 #### 3. Nested inside html with wikitext split by html tags
13320 #### 4. No escape needed
13321 #### 5. Empty headings <h1></h1>
13322 #### 6. Heading chars in SOL context
13323 #### ----------------------------------------
13325 Headings: 0. Unnested
13327 <nowiki>=foo=</nowiki>
13329 <nowiki>=foo</nowiki>''a''=
13332 </p><p>=foo<i>a</i>=
13337 Headings: 1. Nested inside html
13341 =<nowiki>=foo=</nowiki>=
13342 ==<nowiki>=foo=</nowiki>==
13343 ===<nowiki>=foo=</nowiki>===
13344 ====<nowiki>=foo=</nowiki>====
13345 =====<nowiki>=foo=</nowiki>=====
13346 ======<nowiki>=foo=</nowiki>======
13357 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
13362 <nowiki>*bar</nowiki>
13366 <nowiki>=bar=</nowiki>
13374 Headings: 3. Nested inside html with wikitext split by html tags
13378 =<nowiki>=</nowiki>'''bold'''foo==
13380 <h1>=<b>bold</b>foo=</h1>
13384 Headings: 4. No escaping needed (testing just h1 and h2)
13399 <h1><i>=</i>foo=</h1>
13404 Headings: 5. Empty headings
13408 =<nowiki></nowiki>=
13409 ==<nowiki></nowiki>==
13410 ===<nowiki></nowiki>===
13411 ====<nowiki></nowiki>====
13412 =====<nowiki></nowiki>=====
13413 ======<nowiki></nowiki>======
13424 Headings: 6. Heading chars in SOL context
13428 <!--cmt--><nowiki>=h1=</nowiki>
13434 #### --------------- Lists ---------------
13435 #### 0. Outside nests (*foo, etc.)
13436 #### 1. Nested inside html <ul><li>*foo</li></ul>
13437 #### 2. Inside definition lists
13438 #### 3. Only bullets at start should be escaped
13439 #### 4. No escapes needed
13440 #### 5. No unnecessary escapes
13441 #### 6. Escape bullets in SOL position
13442 #### 7. Escape bullets in a multi-line context
13443 #### ----------------------------------------
13446 Lists: 0. Outside nests
13448 <nowiki>*foo</nowiki>
13450 <nowiki>#foo</nowiki>
13458 Lists: 1. Nested inside html
13460 *<nowiki>*foo</nowiki>
13462 *<nowiki>#foo</nowiki>
13464 *<nowiki>:foo</nowiki>
13466 *<nowiki>;foo</nowiki>
13468 #<nowiki>*foo</nowiki>
13470 #<nowiki>#foo</nowiki>
13472 #<nowiki>:foo</nowiki>
13474 #<nowiki>;foo</nowiki>
13496 Lists: 2. Inside definition lists
13498 ;<nowiki>;foo</nowiki>
13500 ;<nowiki>:foo</nowiki>
13502 ;<nowiki>:foo</nowiki>
13505 :<nowiki>:foo</nowiki>
13520 Lists: 3. Only bullets at start of text should be escaped
13522 *<nowiki>*foo*bar</nowiki>
13524 *<nowiki>*foo</nowiki>''it''*bar
13528 <ul><li>*foo<i>it</i>*bar
13534 Lists: 4. No escapes needed
13546 <ul><li><i>foo</i>*bar
13548 <ul><li><a href="Foo" rel="mw:WikiLink">Foo</a>: bar
13553 Lists: 5. No unnecessary escapes
13555 * bar <span><nowiki>[[foo]]</nowiki></span>
13557 *=bar <span><nowiki>[[foo]]</nowiki></span>
13559 *[[bar <span><nowiki>[[foo]]</nowiki></span>
13561 *<nowiki>]]bar </nowiki><span><nowiki>[[foo]]</nowiki></span>
13563 *=bar <span>foo]]</span>=
13565 <ul><li> bar <span>[[foo]]</span>
13567 <ul><li>=bar <span>[[foo]]</span>
13569 <ul><li>[[bar <span>[[foo]]</span>
13571 <ul><li>]]bar <span>[[foo]]</span>
13573 <ul><li>=bar <span>foo]]</span>=
13579 Lists: 6. Escape bullets in SOL position
13583 <!--cmt--><nowiki>*foo</nowiki>
13590 Lists: 7. Escape bullets in a multi-line context
13600 #### --------------- HRs ---------------
13601 #### 1. Single line
13602 #### -----------------------------------
13605 HRs: 1. Single line
13610 <nowiki>----</nowiki>
13612 <nowiki>=foo=</nowiki>
13614 <nowiki>*foo</nowiki>
13621 #### --------------- Tables ---------------
13622 #### 1a. Simple example
13623 #### 1b. No escaping needed (!foo)
13624 #### 1c. No escaping needed (|foo)
13625 #### 1d. No escaping needed (|}foo)
13627 #### 2a. Nested in td (<td>foo|bar</td>)
13628 #### 2b. Nested in td (<td>foo||bar</td>)
13629 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
13631 #### 3a. Nested in th (<th>foo!bar</th>)
13632 #### 3b. Nested in th (<th>foo!!bar</th>)
13633 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
13637 #### 4c. No escaping needed
13638 #### --------------------------------------
13641 Tables: 1a. Simple example
13652 Tables: 1b. No escaping needed
13661 Tables: 1c. No escaping needed
13670 Tables: 1d. No escaping needed
13679 Tables: 2a. Nested in td
13684 |<nowiki>foo|bar</nowiki>
13694 Tables: 2b. Nested in td
13699 |<nowiki>foo||bar</nowiki>
13700 |''it''<nowiki>foo||bar</nowiki>
13705 </td><td><i>it</i>foo||bar
13711 Tables: 2c. Nested in td -- no escaping needed
13726 Tables: 3a. Nested in th
13741 Tables: 3b. Nested in th
13746 !<nowiki>foo!!bar</nowiki>
13756 Tables: 3c. Nested in th -- no escaping needed
13771 Tables: 4a. Escape -
13779 |<nowiki>-bar</nowiki>
13783 <tr><th>-bar</th></tr>
13784 <tr><td>-bar</td></tr>
13789 Tables: 4b. Escape +
13797 |<nowiki>+bar</nowiki>
13801 <tr><th>+bar</th></tr>
13802 <tr><td>+bar</td></tr>
13807 Tables: 4c. No escaping needed
13821 <tr><td>foo-bar</td><td>foo+bar</td></tr>
13822 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
13827 Tables: 4d. No escaping needed
13843 #### --------------- Links ---------------
13844 #### 1. Quote marks in link text
13845 #### 2. Wikilinks: Escapes needed
13846 #### 3. Wikilinks: No escapes needed
13847 #### 4. Extlinks: Escapes needed
13848 #### 5. Extlinks: No escapes needed
13849 #### --------------------------------------
13851 Links 1. Quote marks in link text
13855 [[Foo|<nowiki>Foo''boo''</nowiki>]]
13857 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
13861 Links 2. WikiLinks: Escapes needed
13865 [[Foo|<nowiki>[Foobar]</nowiki>]]
13866 [[Foo|<nowiki>Foobar]</nowiki>]]
13867 [[Foo|<nowiki>x [Foobar] x</nowiki>]]
13868 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
13869 [[Foo|<nowiki>[[Bar]]</nowiki>]]
13870 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
13871 [[Foo|<nowiki>|Bar</nowiki>]]
13873 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
13874 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
13875 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
13876 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
13877 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
13878 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
13879 <a href="Foo" rel="mw:WikiLink">|Bar</a>
13883 Links 3. WikiLinks: No escapes needed
13890 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
13891 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
13895 Links 4. ExtLinks: Escapes needed
13899 [http://google.com <nowiki>[google]</nowiki>]
13900 [http://google.com <nowiki>google]</nowiki>]
13902 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
13903 <a href="http://google.com" rel="mw:ExtLink">google]</a>
13907 Links 5. ExtLinks: No escapes needed
13911 [http://google.com [google]
13913 <a href="http://google.com" rel="mw:ExtLink">[google</a>
13916 #### --------------- Quotes ---------------
13917 #### 1. Quotes inside <b> and <i>
13918 #### 2. Link fragments separated by <i> and <b> tags
13919 #### 3. Link fragments inside <i> and <b>
13920 #### --------------------------------------
13922 1. Quotes inside <b> and <i>
13924 ''<nowiki>'foo'</nowiki>''
13925 ''<nowiki>''foo''</nowiki>''
13926 ''<nowiki>'''foo'''</nowiki>''
13927 '''<nowiki>'foo'</nowiki>'''
13928 '''<nowiki>''foo''</nowiki>'''
13929 '''<nowiki>'''foo'''</nowiki>'''
13930 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
13938 <b>foo'<i>bar'</i>baz</b>
13943 2. Link fragments separated by <i> and <b> tags
13945 [[''foo''<nowiki>hello]]</nowiki>
13947 [['''foo'''<nowiki>hello]]</nowiki>
13949 <p>[[<i>foo</i>hello]]
13950 </p><p>[[<b>foo</b>hello]]
13955 2. Link fragments inside <i> and <b>
13956 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
13957 this is one of the shortcomings of this format)
13959 ''[[foo''<nowiki>]]</nowiki>
13961 '''[[foo'''<nowiki>]]</nowiki>
13964 </p><p><b>[[foo</b>]]
13968 #### --------------- Paragraphs ---------------
13969 #### 1. No unnecessary escapes
13970 #### --------------------------------------
13973 1. No unnecessary escapes
13975 bar <span><nowiki>[[foo]]</nowiki></span>
13977 =bar <span><nowiki>[[foo]]</nowiki></span>
13979 [[bar <span><nowiki>[[foo]]</nowiki></span>
13981 <nowiki>]]bar </nowiki><span><nowiki>[[foo]]</nowiki></span>
13983 <nowiki>=bar </nowiki><span>foo]]</span>=
13985 <p>bar <span>[[foo]]</span>
13986 </p><p>=bar <span>[[foo]]</span>
13987 </p><p>[[bar <span>[[foo]]</span>
13988 </p><p>]]bar <span>[[foo]]</span>
13989 </p><p>=bar <span>foo]]</span>=
13993 #### --------------- PRE ------------------
13994 #### 1. Leading space in SOL context should be escaped
13995 #### --------------------------------------
13997 1. Leading space in SOL context should be escaped
14001 <nowiki> foo</nowiki>
14002 <!--cmt--><nowiki> foo</nowiki>
14009 #### --------------- HTML tags ---------------
14012 #### 3. multi-line html tag
14013 #### --------------------------------------
14019 <a href="http://google.com">google</a>
14021 <a href="http://google.com">google</a>
14027 <nowiki><div>foo</div>
14028 <div style="color:red">foo</div></nowiki>
14030 <p><div>foo</div>
14031 <div style="color:red">foo</div>
14036 3. multi-line html tag
14048 #### --------------- Others ---------------
14052 <nowiki>foo</nowiki>
14054 <p><nowiki>foo</nowiki>
14059 Tag-like HTML structures are passed through as text
14081 </p><p>1<d e>f
14086 # This fails in the PHP parser (see bug 40670,
14087 # https://bugzilla.wikimedia.org/show_bug.cgi?id=40670), so disabled for it.
14089 Tag names followed by punctuation should not be recognized as tags
14095 <p><s.ome> text
14100 HTML tag with necessary entities in attributes
14102 <span title="&amp;">foo</span>
14104 <p><span title="&amp;">foo</span>
14109 HTML tag with 'unnecessary' entity encoding in attributes
14111 <span title="&">foo</span>
14113 <p><span title="&">foo</span>
14118 HTML tag with broken attribute value quoting
14120 <span title="Hello world>Foo</span>
14122 <p><span>Foo</span>
14127 Parsoid-only: HTML tag with broken attribute value quoting
14131 <span title="Hello world>Foo</span>
14133 <p><span title="Hello world">Foo</span>
14138 Table with broken attribute value quoting
14141 | title="Hello world|Foo
14152 Table with broken attribute value quoting on consecutive lines
14155 | title="Hello world|Foo
14156 | style="color:red|Bar
14169 Parsoid-only: Table with broken attribute value quoting on consecutive lines
14174 | title="Hello world|Foo
14175 | style="color:red|Bar
14180 <td title="Hello world">Foo
14181 </td><td style="color: red">Bar
14187 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
14197 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
14207 Accept empty td cell attribute
14210 | align="center" | foo || |
14215 <td align="center"> foo </td>
14222 Non-empty attributes in th-cells
14225 ! Foo !! style="color: red" | Bar
14231 <th style="color: red"> Bar
14237 Accept empty attributes in th-cells
14252 Empty table rows go away
14273 ### Parsoid-centric tests for testing RTing of inter-element separators
14274 ### Edge cases not tested by existing parser tests and specific to
14275 ### Parsoid-specific serialization strategies.
14279 RT-ed inter-element separators should be valid separators
14292 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
14293 (Parsoid-only since PHP parser relies on Tidy for correct output)
14309 Empty TD followed by TD with tpl-generated attribute
14314 |{{echo|style='color:red'}}|foo
14328 Indented table with an empty td
14347 Empty TR followed by a template-generated TR
14348 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
14354 {{echo|<tr><td>foo</td></tr>}}
14362 <td>foo</td></tr></tbody></table>
14365 ## PHP and parsoid output differ for this, and since this is primarily
14366 ## for testing Parsoid's serializer, marking this Parsoid only
14368 Empty TR followed by mixed-ws-comment line should RT correctly
14382 <td> <!--c--></td></tr>
14384 <td><!--c--> <!--d--></td></tr>
14390 Multi-line image caption generated by templates with/without trailing newlines
14394 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
14395 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
14397 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Foo.jpg" class="new" title="File:Foo.jpg">File:Foo.jpg</a> <div class="thumbcaption">foo\nA\nB\nC</div></div></div>
14398 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Foo.jpg" class="new" title="File:Foo.jpg">File:Foo.jpg</a> <div class="thumbcaption">foo\nA\nB\nC\n\n</div></div></div>
14402 ## PHP emits broken html for this, and since this is primarily
14403 ## a Parsoid serializer test, marking this Parsoid only
14405 Improperly nested inline or quotes tags with whitespace in between
14409 <span> <s>x</span> </s>
14412 <p><span> <s>x</s></span><s> </s>
14413 <b> <i>x</i></b><i> </i></span>
14422 Try for 100% code coverage