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
3500 # The expected HTML structure in this test is debatable. The PHP parser does
3501 # not parse this kind of table at all. The main focus for Parsoid is on
3502 # round-tripping, so this output is ok for now. TODO: revisit!
3504 Wikitext table with html-syntax row (Parsoid)
3517 <td>foo</td></tr></tbody></table>
3524 Plain link, capitalized
3528 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
3533 Plain link, uncapitalized
3537 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
3544 [[Main Page|The Main Page]]
3546 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
3555 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
3560 Broken link with fragment
3562 [[Zigzagzogzagzig#zug]]
3564 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
3569 Special page link with fragment
3571 [[Special:Version#anchor]]
3573 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
3578 Nonexistent special page link with fragment
3580 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
3582 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
3589 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
3591 <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>
3598 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
3600 <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>!!!
3611 Bug 43661: Piped links with identical prefixes
3613 [[prefixed article|prefixed articles with spaces]]
3615 [[prefixed article|prefixed articlesaoeu]]
3617 [[Main Page|Main Page test]]
3619 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
3620 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
3621 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
3627 Link with HTML entity in suffix / tail
3629 [[Main Page]]", [[Main Page]]a
3631 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
3636 Link with 3 brackets
3645 Piped link with 3 brackets
3647 [[[main page|the main page]]]
3649 <p>[[[main page|the main page]]]
3654 Link with multiple pipes
3656 [[Main Page|The|Main|Page]]
3658 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
3665 [[Talk:Parser testing]], [[Meta:Disclaimers]]
3667 <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>
3672 Piped link to namespace
3674 [[Meta:Disclaimers|The disclaimers]]
3676 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
3683 [[Usually caused by a typo (oops}]]
3685 <p>[[Usually caused by a typo (oops}]]
3690 Link containing % (not as a hex sequence)
3694 <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>
3699 Link containing % as a single hex sequence interpreted to char
3703 <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>
3708 Link containing % as a double hex sequence interpreted to hex sequence
3712 <p>[[7%2525 Solution]]
3717 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
3718 Example for such a section: == < ==
3720 [[%23%3c]][[%23%3e]]
3722 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
3727 Link containing "<#" and ">#" as a hex sequences
3729 [[%3c%23]][[%3e%23]]
3731 <p>[[%3c%23]][[%3e%23]]
3736 Link containing double-single-quotes '' (bug 4598)
3738 [[Lista d''e paise d''o munno]]
3740 <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>
3745 Link containing double-single-quotes '' in text (bug 4598 sanity check)
3747 Some [[Link|pretty ''italics'' and stuff]]!
3749 <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>!
3754 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
3756 ''Some [[Link|pretty ''italics'' and stuff]]!
3758 <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>
3763 Link with double quotes in title part (literal) and alternate part (interpreted)
3765 [[File:Denys Savchenko ''Pentecoste''.jpg]]
3769 [[''Pentecoste''|Pentecoste]]
3771 [[''Pentecoste''|''Pentecoste'']]
3773 <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>
3774 </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>
3775 </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>
3776 </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>
3781 Broken image links with HTML captions (bug 39700)
3783 [[File:Nonexistent|<script></script>]]
3784 [[File:Nonexistent|100px|<script></script>]]
3785 [[File:Nonexistent|<]]
3786 [[File:Nonexistent|a<i>b</i>c]]
3788 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
3789 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
3790 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
3791 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
3798 [[http://www.example.com]]
3800 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
3805 Plain link to URL with link text
3807 [[http://www.example.com Link text]]
3809 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
3814 Plain link to protocol-relative URL
3816 [[//www.example.com]]
3818 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
3823 Plain link to protocol-relative URL with link text
3825 [[//www.example.com Link text]]
3827 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
3832 Plain link to page with question mark in title
3838 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
3839 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
3844 # I'm fairly sure the expected result here is wrong.
3845 # We want these to be URL links, not pseudo-pages with URLs for titles....
3846 # However the current output is also pretty screwy.
3849 # I'm changing it to match the current output--it arguably makes more
3850 # sense in the light of the test above. Old expected result was:
3851 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
3853 # But I think this test is bordering on "garbage in, garbage out" anyway.
3858 Piped link to URL: [[http://www.example.com|an example URL]]
3860 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
3865 BUG 2: [[page|http://url/]] should link to page, not http://url/
3867 [[Main Page|http://url/]]
3869 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
3874 BUG 337: Escaped self-links should be bold
3878 [[Bug462]] [[Bug462]]
3880 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
3885 Self-link to section should not be bold
3889 [[Main Page#section]]
3891 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
3902 Self-link to numeric title
3908 <p><strong class="selflink">0</strong>
3913 Link to numeric-equivalent title
3919 <p><a href="/wiki/00" title="00">00</a>
3924 <nowiki> inside a link
3926 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
3928 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
3933 Non-breaking spaces in title
3935 [[ Main Page ]]
3937 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
3942 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
3948 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
3953 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
3959 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
3964 Internal link with en linktrail: no apostrophes (bug 27473)
3970 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
3975 Internal link with ca linktrail with apostrophes (bug 27473)
3981 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
3986 Internal link with kaa linktrail with apostrophes (bug 27473)
3992 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
3997 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
4005 [http://wp.org ''foo'']
4007 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
4008 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
4009 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
4010 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
4015 ### Interwiki links (see maintenance/interwiki.sql)
4019 Inline interwiki link
4021 [[MeatBall:SoftSecurity]]
4023 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
4028 Inline interwiki link with empty title (bug 2372)
4032 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
4037 Interwiki link encoding conversion (bug 1636)
4039 *[[Wikipedia:ro:Olteniţa]]
4040 *[[Wikipedia:ro:Olteniţa]]
4042 <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>
4043 </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>
4049 Interwiki link with fragment (bug 2130)
4051 [[MeatBall:SoftSecurity#foo]]
4053 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
4068 Double interlanguage link
4079 Interlanguage link, with prefix links
4091 Double interlanguage link, with prefix links (bug 8897)
4104 Parsoid-specific test: Wikilinks with should RT properly
4110 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
4128 Broken br tag sanitization
4137 Incorrecly removing closing slashes from correctly formed XHTML
4139 <br style="clear:both;" />
4141 <p><br style="clear:both;" />
4146 Failing to transform badly formed HTML into correct XHTML
4148 <br style="clear: left;">
4149 <br style="clear: right;">
4150 <br style="clear: both;">
4152 <p><br style="clear: left;" />
4153 <br style="clear: right;" />
4154 <br style="clear: both;" />
4159 Handling html with a div self-closing tag
4168 <p><div title />
4172 <p><div title=bar />
4173 <div title=bar/>
4175 <div title="bar/"></div>
4181 Handling html with a br self-closing tag
4190 <p><br title="title" />
4191 <br title="title" />
4200 Horizontal ruler (should it add that extra space?)
4214 Horizontal ruler -- 4+ dashes render hr
4223 Horizontal ruler -- eats additional dashes on the same line
4232 Horizontal ruler -- does not collaps dashes on consecutive lines
4243 Horizontal ruler -- <4 dashes render as plain text
4252 Horizontal ruler -- Supports content following dashes on same line
4261 ### Block-level elements
4284 <ol><li>Numbered list
4301 ***#Number on level 4
4303 **#Number on level 3
4304 **#Number on level 3
4308 #** Level 3, but ordered
4311 <ol><li> with numbers
4313 <ul><li> and bullets
4315 <ol><li> and numbers
4317 </li><li>bullets again
4318 <ul><li>bullet level 2
4319 <ul><li>bullet level 3
4320 <ol><li>Number on level 4
4323 </li><li>bullet level 2
4324 <ol><li>Number on level 3
4325 </li><li>Number on level 3
4328 <ol><li>number level 2
4331 <ul><li><ul><li> Level 3
4335 <ol><li><ul><li><ul><li> Level 3, but ordered
4369 Nested lists 3 (first element empty)
4382 Nested lists 4 (first element empty)
4395 Nested lists 5 (both elements empty)
4408 Nested lists 6 (both elements empty)
4421 Nested lists 7 (skip initial nesting levels)
4425 <ul><li><ul><li><ul><li> foo
4433 Nested lists 8 (multiple nesting transitions)
4441 <ul><li><ul><li> bar
4451 1. Lists with start-of-line-transparent tokens before bullets: Comments
4465 2. Lists with start-of-line-transparent tokens before bullets: Template close
4477 Unbalanced closing block tags break a list
4478 (Disabled since php parser generates broken html -- relies on Tidy to fix up)
4488 </li></ul></div><div>
4494 Unbalanced closing non-block tags don't break a list
4495 (Disabled since php parser generates broken html -- relies on Tidy to fix up)
4505 <ul><li>a<span></span>
4511 Unclosed formatting tags that straddle lists are closed and reopened
4512 (Disabled since php parser generates broken html -- relies on Tidy to fix up)
4520 </li><li> <s> b </s>
4525 List embedded in a non-block tag
4526 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
4534 <p><small></small></p>
4540 <p><small></small></p>
4544 List items are not parsed correctly following a <pre> block (bug 785)
4550 <ul><li> <pre>foo</pre>
4551 </li><li> <pre>bar</pre>
4558 List items from template
4569 * notSOL{{inner list}}
4588 List interrupted by empty line or heading
4598 <ul><li><ul><li> bar
4601 <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>
4602 <ul><li> Another list item
4608 Multiple list tags generated by templates
4627 Magic Word: {{CURRENTDAY}}
4636 Magic Word: {{CURRENTDAY2}}
4645 Magic Word: {{CURRENTDAYNAME}}
4654 Magic Word: {{CURRENTDOW}}
4663 Magic Word: {{CURRENTMONTH}}
4672 Magic Word: {{CURRENTMONTHABBREV}}
4674 {{CURRENTMONTHABBREV}}
4681 Magic Word: {{CURRENTMONTHNAME}}
4683 {{CURRENTMONTHNAME}}
4690 Magic Word: {{CURRENTMONTHNAMEGEN}}
4692 {{CURRENTMONTHNAMEGEN}}
4699 Magic Word: {{CURRENTTIME}}
4708 Magic Word: {{CURRENTWEEK}} (@bug 4594)
4717 Magic Word: {{CURRENTYEAR}}
4726 Magic Word: {{FULLPAGENAME}}
4728 title=[[User:Ævar Arnfjörð Bjarmason]]
4732 <p>User:Ævar Arnfjörð Bjarmason
4737 Magic Word: {{FULLPAGENAMEE}}
4739 title=[[User:Ævar Arnfjörð Bjarmason]]
4743 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
4748 Magic Word: {{NAMESPACE}}
4750 title=[[User:Ævar Arnfjörð Bjarmason]]
4759 Magic Word: {{NAMESPACEE}}
4761 title=[[User:Ævar Arnfjörð Bjarmason]]
4770 Magic Word: {{NAMESPACENUMBER}}
4772 title=[[User:Ævar Arnfjörð Bjarmason]]
4781 Magic Word: {{NUMBEROFFILES}}
4790 Magic Word: {{PAGENAME}}
4792 title=[[User:Ævar Arnfjörð Bjarmason]]
4796 <p>Ævar Arnfjörð Bjarmason
4801 Magic Word: {{PAGENAME}} with metacharacters
4803 title=[['foo & bar = baz']]
4807 <p><i>'foo & bar = baz'</i>
4812 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
4814 title=[[*RFC 1234 http://example.com/]]
4818 <p>*RFC 1234 http://example.com/
4823 Magic Word: {{PAGENAMEE}}
4825 title=[[User:Ævar Arnfjörð Bjarmason]]
4829 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
4834 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
4836 title=[[*RFC 1234 http://example.com/]]
4840 <p>*RFC_1234_http://example.com/
4845 Magic Word: {{REVISIONID}}
4854 Magic Word: {{SCRIPTPATH}}
4863 Magic Word: {{SERVER}}
4867 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
4872 Magic Word: {{SERVERNAME}}
4881 Magic Word: {{SITENAME}}
4890 Case-sensitive magic words, when cased differently, should just be template transclusions
4897 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
4898 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
4899 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
4900 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
4905 Case-insensitive magic words should still work with weird casing.
4915 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
4920 Namespace 1 {{ns:1}}
4929 Namespace 1 {{ns:01}}
4938 Namespace 0 {{ns:0}} (bug 4783)
4946 Namespace 0 {{ns:00}} (bug 4783)
4954 Namespace -1 {{ns:-1}}
4963 Namespace User {{ns:User}}
4972 Namespace User talk {{ns:User_talk}}
4981 Namespace User talk {{ns:uSeR tAlK}}
4990 Namespace File {{ns:File}}
4999 Namespace File {{ns:Image}}
5008 Namespace (lang=de) Benutzer {{ns:User}}
5019 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
5025 <p>Benutzer Diskussion
5033 {{urlencode:hi world?!}}
5034 {{urlencode:hi world?!|WIKI}}
5035 {{urlencode:hi world?!|PATH}}
5036 {{urlencode:hi world?!|QUERY}}
5049 Magic links: internal link to RFC (bug 479)
5053 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
5058 Magic links: RFC (bug 479)
5062 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
5067 Magic links: ISBN (bug 1937)
5071 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
5076 Magic links: PMID incorrectly converts space to underscore
5080 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
5089 Nonexistent template
5091 {{thistemplatedoesnotexist}}
5093 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
5098 Template with invalid target containing tags
5100 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5102 <p>{{a<b>b</b>|foo|a=b|a = b}}
5107 Template with invalid target containing unclosed tag
5109 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5111 <p>{{a<b>|foo|a=b|a = b}}</b>
5118 This is a test template
5126 <p>This is a test template
5131 Template with explicit namespace
5135 <p>This is a test template
5143 This is a test template with parameter {{{param}}}
5149 {{paramtest|param=foo}}
5151 <p>This is a test template with parameter foo
5156 Template:paramtestnum
5162 Template unnamed parameter
5164 {{paramtestnum|Main Page|the main page}}
5166 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
5171 Template:templatesimple
5177 Template:templateredirect
5179 #redirect [[Template:templatesimple]]
5183 Template:templateasargtestnum
5189 Template:templateasargtest
5191 {{template{{{templ}}}}}
5195 Template:templateasargtest2
5201 Template with template name as unnamed argument
5203 {{templateasargtestnum|templatesimple}}
5210 Template with template name as argument
5212 {{templateasargtest|templ=simple}}
5219 Template with template name as argument (2)
5221 {{templateasargtest2|templ=templatesimple}}
5228 Template:templateasargtestdefault
5230 {{{{{templ|templatesimple}}}}}
5240 Template with default value
5242 {{templateasargtestdefault}}
5249 Template with default value (value set)
5251 {{templateasargtestdefault|templ=templa}}
5260 {{templateredirect}}
5267 Template with argument in separate line
5269 {{ templateasargtest |
5277 Template with complex template as argument
5280 param ={{ templateasargtest |
5283 <p>This is a test template with parameter (test)
5288 Template with thumb image (with link in description)
5291 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
5293 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>
5298 Template:complextemplate
5300 {{{1}}} {{paramtest|
5301 param ={{{param}}}}}
5305 Template with complex arguments
5308 param ={{ templateasargtest |
5309 templ = simple }}|[[Template:complextemplate|link]]}}
5311 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
5316 BUG 553: link with two variables in a piped link
5319 |[[{{{1}}}|{{{2}}}]]
5324 <td>[[{{{1}}}|{{{2}}}]]
5330 Magic variable as template parameter
5332 {{paramtest|param={{SITENAME}}}}
5334 <p>This is a test template with parameter MediaWiki
5341 [[{{{param}}}|link]]
5345 Template parameter as link source
5347 {{linktest|param=Main Page}}
5349 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
5354 Template-generated attribute string (k='v')
5356 <span {{attr_str|id|v1}}>bar</span>
5358 <p><span id="v1">bar</span>
5365 including another template, {{paramtest|param={{{arg}}}}}
5369 Template passing argument to another template
5371 {{paramtest2|arg='hmm'}}
5373 <p>including another template, This is a test template with parameter 'hmm'
5384 Template as link source
5388 [[{{linktest2}}|Main Page]]
5390 [[{{linktest2}}]]Page
5392 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5393 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5394 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
5412 Template infinite loop
5416 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
5421 Template from main namespace
5440 BUG 529: Template with table, not included at beginning of line
5459 BUG 523: Template shouldn't eat newline (or add an extra one before table)
5479 BUG 41: Template parameters shown as broken links
5488 Template with targets containing wikilinks
5492 {{[[{{echo|foo}}]]}}
5494 {{{{echo|[[foo}}]]}}
5496 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
5497 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
5505 ''None'' of '''this''' should be
5507 but rather passed unmodified
5511 # hmm, fix this or just deprecate msgnw and document its behavior?
5517 {{msgnw:MSGNW test}}
5519 <p>''None'' of '''this''' should be
5521 but rather passed unmodified
5529 {{int:youhavenewmessages|lots of money|not!}}
5531 <p>You have lots of money (not!).
5538 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
5542 <includeonly> and <noinclude> being included
5553 <onlyinclude>Foo</onlyinclude>bar
5557 <onlyinclude> being included
5569 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
5573 <onlyinclude> and <includeonly> being included
5582 <includeonly> and <noinclude> on a page
5584 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
5591 Un-closed <noinclude>
5598 <onlyinclude> on a page
5600 <onlyinclude>Foo</onlyinclude>bar
5607 Un-closed <onlyinclude>
5614 Self-closed noinclude, includeonly, onlyinclude tags
5625 Unbalanced includeonly and noinclude tags
5629 |b</noinclude></noinclude>
5630 |c</noinclude></includeonly>
5631 |d</includeonly></includeonly>
5640 <td>c</includeonly>
5642 <td>d</includeonly></includeonly>
5648 Template:Includeonly section
5651 ==Includeonly section==
5657 Bug 6563: Edit link generation for section shown by <includeonly>
5659 {{includeonly section}}
5661 <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>
5662 <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>
5666 # Uses same input as the contents of [[Template:Includeonly section]]
5668 Bug 6563: Section extraction for section shown by <includeonly>
5673 ==Includeonly section==
5681 Bug 6563: Edit link generation for section suppressed by <includeonly>
5684 ==Includeonly section==
5688 <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>
5693 Bug 6563: Section extraction for section suppressed by <includeonly>
5698 ==Includeonly section==
5706 Un-closed <includeonly>
5713 ### <includeonly> and <noinclude> in attributes
5716 0. includeonly around the entire attribute
5718 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
5720 <p><span id="v2">bar</span>
5725 1. includeonly in html attr key
5727 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
5729 <p><span id="foo">bar</span>
5734 2. includeonly in html attr value
5736 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
5737 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
5739 <p><span id="v1">bar</span>
5740 <span id="v1">bar</span>
5745 3. includeonly in part of an attr value
5747 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
5749 <p><span style="color:red;">bar</span>
5754 ### Testing parsing of templates where a template arg
5755 ### has the same name as the template itself.
5765 Templates: Template Name/Arg clash: 1. Use of positional param
5774 Templates: Template Name/Arg clash: 2. Use of named param
5783 Templates: Template Name/Arg clash: 3. Use of named param with empty input
5792 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
5796 Templates: 1. Simple use
5805 Templates: 2. Inside a block tag
5807 <div>{{echo|Foo}}</div>
5814 Templates: P-wrapping: 1a. Templates on consecutive lines
5825 Templates: P-wrapping: 1b. Templates on consecutive lines
5839 Templates: P-wrapping: 1c. Templates on consecutive lines
5842 {{echo|bar}} <div>baz</div>
5851 Templates: Inline Text: 1. Multiple tmeplate uses
5853 {{echo|Foo}}bar{{echo|baz}}
5860 Templates: Inline Text: 2. Back-to-back template uses
5862 {{echo|Foo}}{{echo|bar}}
5869 Templates: Block Tags: 1. Multiple template uses
5871 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
5873 <div>Foo</div><div>bar</div><div>baz</div>
5878 Templates: Block Tags: 2. Back-to-back template uses
5880 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
5882 <div>Foo</div><div>bar</div>
5887 Templates: Links: 1. Simple example
5889 {{echo|[[Foo|bar]]}}
5891 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5896 Templates: Links: 2. Generation of link href
5898 [[{{echo|Foo}}|bar]]
5900 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5905 Templates: Links: 3. Generation of part of a link href
5907 [[Fo{{echo|o}}|bar]]
5911 [[Foo{{echo|bar}}baz]]
5913 [[Foo{{echo|bar}}|bar]]
5915 [[:Foo{{echo|bar}}]]
5917 [[:Foo{{echo|bar}}|bar]]
5919 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5920 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
5921 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
5922 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
5923 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
5924 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
5929 Templates: Links: 4. Multiple templates generating link href
5931 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
5933 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
5938 Templates: Links: 5. Generation of link text
5940 [[Foo|{{echo|bar}}]]
5942 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5947 Templates: Links: 5. Nested templates (only outermost template should be marked)
5949 {{echo|[[{{echo|Foo}}|bar]]}}
5951 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
5956 Templates: HTML Tag: 1. Generation of HTML attr. key
5958 <div {{echo|style}}="color:red;">foo</div>
5960 <div style="color:red;">foo</div>
5965 Templates: HTML Tag: 2. Generation of HTML attr. value
5967 <div style={{echo|'color:red;'}}>foo</div>
5969 <div style="color:red;">foo</div>
5974 Templates: HTML Tag: 3. Generation of HTML attr key and value
5976 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
5978 <div style="color:red;">foo</div>
5983 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
5985 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
5987 <div title="This is a long title with just one piece templated">foo</div>
5992 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
5994 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
5996 <div title="This is a long title with just one piece templated">foo</div>
6001 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
6003 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
6005 <div title="This is a long title with just one piece templated">foo</div>
6010 Templates: HTML Tables: 1. Generating start of a HTML table
6012 {{echo|<table><tr><td>foo</td>}}</tr></table>
6014 <table><tr><td>foo</td></tr></table>
6019 Templates: HTML Tables: 2a. Generating middle of a HTML table
6021 <table><tr>{{echo|<td>foo</td>}}</tr></table>
6023 <table><tr><td>foo</td></tr></table>
6028 Templates: HTML Tables: 2b. Generating middle of a HTML table
6030 <table>{{echo|<tr><td>foo</td></tr>}}</table>
6032 <table><tr><td>foo</td></tr></table>
6037 Templates: HTML Tables: 3. Generating end of a HTML table
6039 <table><tr>{{echo|<td>foo</td></tr></table>}}
6041 <table><tr><td>foo</td></tr></table>
6046 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
6048 {{echo|<table>}}<tr><td>foo</td></tr></table>
6050 <table><tr><td>foo</td></tr></table>
6055 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
6057 <table>{{echo|<tr>}}<td>foo</td></tr></table>
6059 <table><tr><td>foo</td></tr></table>
6064 Templates: HTML Tables: 4c. Generating a single tag 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: 4d. Generating a single tag of a HTML table
6075 <table><tr><td>foo{{echo|</td>}}</tr></table>
6077 <table><tr><td>foo</td></tr></table>
6082 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
6084 <table><tr><td>foo</td>{{echo|</tr>}}</table>
6086 <table><tr><td>foo</td></tr></table>
6091 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
6093 <table><tr><td>foo</td></tr>{{echo|</table>}}
6095 <table><tr><td>foo</td></tr></table>
6100 Templates: Wiki Tables: 1a. Fostering of entire template content
6108 <tr><td></td></tr></table>
6113 Templates: Wiki Tables: 1b. Fostering of entire template content
6126 <tr><td></td></tr></table>
6131 Templates: Wiki Tables: 2. Fostering of partial template content
6141 <tr><td></td></tr></table>
6146 Templates: Wiki Tables: 3. td-content via multiple templates
6149 {{echo|{{pipe}}a}}{{echo|b}}
6160 Templates: Wiki Tables: 4. Templated tags, no content
6166 <tr><td></td></tr></table>
6171 Templates: Wiki Tables: 5. Templated tags, regular td-tags
6185 Templates: Wiki Tables: 6. Templated tags, templated td-tags
6199 Templates: Lists: Multi-line list-items via templates
6201 *{{echo|a {{nonexistent|
6203 *{{echo|b {{nonexistent|
6206 <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>
6207 </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>
6213 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
6215 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
6217 <p><i>ab</i>c<i>d</i>e
6222 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
6223 (PHP parser generates misnested html)
6227 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
6229 <p><span><i>a</i></span><i><span>b</span></i><span>c</span><i>d</i><span>e</span></p>
6233 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
6234 (PHP parser generates misnested html)
6238 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
6241 <div><i>b</i>c<i>d</i></div>
6246 Templates: Ugly nesting: 4. Divs opened/closed across templates
6248 a<div>b{{echo|c</div>d}}e
6255 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
6261 |{{echo|foo</table>}}
6265 <table about="#mwt1" typeof="mw:Object/Template ">
6266 <tbody><tr><td>foo</td></tr></tbody></table><span about="#mwt1">
6267 bar</span><span about="#mwt1">
6272 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
6282 <td>1. {{echo|foo </table>}}</td>
6284 <td>2. {{echo|baz </table>}}</td>
6297 <table about="#mwt1" typeof="mw:Object/Template">
6302 <td >1. foo </td></tr></tbody></table></td>
6304 <td >2. baz </td></tr></tbody></table><span about="#mwt1">
6305 </span><span about="#mwt1">
6307 abc</span><span about="#mwt1">
6308 </span><span about="#mwt1">
6309 </span><span about="#mwt1">
6310 </span><span about="#mwt1">
6311 </span><span about="#mwt1">
6313 xyz</span><span about="#mwt1">
6314 </span><span about="#mwt1">
6319 Templates: Ugly templates: 3. newline-only template parameter
6328 # This looks like a bug: a single newline triggers p/br for some reason.
6330 Templates: Ugly templates: 4. newline-only template parameter inconsistency
6341 Parser Functions: 1. Simple example
6350 Parser Functions: 2. Nested use (only outermost should be marked up)
6359 ### Pre-save transform tests
6362 pre-save transform: subst:
6368 This is a test template
6372 pre-save transform: normal template
6382 pre-save transform: nonexistent template
6386 {{thistemplatedoesnotexist}}
6388 {{thistemplatedoesnotexist}}
6393 pre-save transform: subst magic variables
6402 # This is bug 89, which I fixed. -- wtm
6404 pre-save transform: subst: templates with parameters
6408 {{subst:paramtest|param="something else"}}
6410 This is a test template with parameter "something else"
6416 <nowiki>'''not wiki'''</nowiki>
6420 pre-save transform: nowiki in subst (bug 1188)
6424 {{subst:nowikitest}}
6426 <nowiki>'''not wiki'''</nowiki>
6431 Template:commenttest
6433 This template has <!-- a comment --> in it.
6437 pre-save transform: comment in subst (bug 1936)
6441 {{subst:commenttest}}
6443 This template has <!-- a comment --> in it.
6447 pre-save transform: unclosed tag
6451 <nowiki>'''not wiki'''
6453 <nowiki>'''not wiki'''
6457 pre-save transform: mixed tag case
6461 <NOwiki>'''not wiki'''</noWIKI>
6463 <NOwiki>'''not wiki'''</noWIKI>
6467 pre-save transform: unclosed comment in <nowiki>
6471 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
6473 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
6479 <span onmouseover="alert('crap')">Oh no</span>
6483 (confirming safety of fix for subst bug 1936)
6485 {{Template:dangerous}}
6487 <p><span>Oh no</span>
6492 pre-save transform: comment containing gallery (bug 5024)
6496 <!-- <gallery>data</gallery> -->
6498 <!-- <gallery>data</gallery> -->
6502 pre-save transform: comment containing extension
6506 <!-- <tag>data</tag> -->
6508 <!-- <tag>data</tag> -->
6512 pre-save transform: comment containing nowiki
6516 <!-- <nowiki>data</nowiki> -->
6518 <!-- <nowiki>data</nowiki> -->
6522 pre-save transform: <noinclude> in subst (bug 3298)
6532 pre-save transform: <onlyinclude> in subst (bug 3298)
6544 {{<includeonly>subst:</includeonly>Includes}}
6548 Template:SafeSubstTest
6550 {{<includeonly>safesubst:</includeonly>Includes}}
6554 bug 22297: safesubst: works during PST
6558 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
6564 bug 22297: safesubst: works during normal parse
6573 subst: does not work during normal parse
6577 <p>{{subst:Includes}}
6582 pre-save transform: context links ("pipe trick")
6586 [[Article (context)|]]
6589 [[Bar:Article (context)|]]
6590 [[:Bar:Article (context)|]]
6592 [[|Article (context)]]
6596 [[Article (context)|Article]]
6597 [[Bar:Article|Article]]
6598 [[:Bar:Article|Article]]
6599 [[Bar:Article (context)|Article]]
6600 [[:Bar:Article (context)|Article]]
6602 [[Article (context)]]
6603 [[Bar:X (Y) Z|X (Y) Z]]
6604 [[:Bar:X (Y) Z|X (Y) Z]]
6608 pre-save transform: context links ("pipe trick") with interwiki prefix
6612 [[interwiki:Article|]]
6613 [[:interwiki:Article|]]
6614 [[interwiki:Bar:Article|]]
6615 [[:interwiki:Bar:Article|]]
6617 [[interwiki:Article|Article]]
6618 [[:interwiki:Article|Article]]
6619 [[interwiki:Bar:Article|Bar:Article]]
6620 [[:interwiki:Bar:Article|Bar:Article]]
6624 pre-save transform: context links ("pipe trick") with parens in title
6626 pst title=[[Somearticle (context)]]
6630 [[Article (context)|Article]]
6634 pre-save transform: context links ("pipe trick") with comma in title
6636 pst title=[[Someplace, Somewhere]]
6639 [[Otherplace, Elsewhere|]]
6640 [[Otherplace, Elsewhere, Anywhere|]]
6642 [[Otherplace, Somewhere|Otherplace]]
6643 [[Otherplace, Elsewhere|Otherplace]]
6644 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
6648 pre-save transform: context links ("pipe trick") with parens and comma
6650 pst title=[[Someplace (IGNORED), Somewhere]]
6653 [[Otherplace (place), Elsewhere|]]
6655 [[Otherplace, Somewhere|Otherplace]]
6656 [[Otherplace (place), Elsewhere|Otherplace]]
6660 pre-save transform: context links ("pipe trick") with comma and parens
6662 pst title=[[Who, me? (context)]]
6665 [[Me, Myself, and I (1937 song)|]]
6667 [[Yes, you. (context)|Yes, you.]]
6668 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
6672 pre-save transform: context links ("pipe trick") with namespace
6674 pst title=[[Ns:Somearticle]]
6678 [[Ns:Article|Article]]
6682 pre-save transform: context links ("pipe trick") with namespace and parens
6684 pst title=[[Ns:Somearticle (context)]]
6688 [[Ns:Article (context)|Article]]
6692 pre-save transform: context links ("pipe trick") with namespace and comma
6694 pst title=[[Ns:Somearticle, Context, Whatever]]
6698 [[Ns:Article, Context, Whatever|Article]]
6702 pre-save transform: context links ("pipe trick") with namespace, comma and parens
6704 pst title=[[Ns:Somearticle, Context (context)]]
6708 [[Ns:Article (context)|Article]]
6712 pre-save transform: context links ("pipe trick") with namespace, parens and comma
6714 pst title=[[Ns:Somearticle (IGNORED), Context]]
6718 [[Ns:Article, Context|Article]]
6722 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
6726 [[Article(context)|]]
6727 [[Bar:Article(context)|]]
6728 [[:Bar:Article(context)|]]
6729 [[|Article(context)]]
6733 [[Article(context)|Article]]
6734 [[Bar:Article(context)|Article]]
6735 [[:Bar:Article(context)|Article]]
6736 [[Article(context)]]
6738 [[:Bar:X(Y)Z|X(Y)Z]]
6742 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
6746 [[Article (context)|]]
6747 [[Bar:Article (context)|]]
6748 [[:Bar:Article (context)|]]
6749 [[|Article (context)]]
6753 [[Article (context)|Article]]
6754 [[Bar:Article (context)|Article]]
6755 [[:Bar:Article (context)|Article]]
6756 [[Article (context)]]
6757 [[Bar:X (Y) Z|X (Y) Z]]
6758 [[:Bar:X (Y) Z|X (Y) Z]]
6762 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
6766 [[Article(context)|]]
6767 [[Bar:Article(context)|]]
6768 [[:Bar:Article(context)|]]
6769 [[|Article(context)]]
6773 [[Article(context)|Article]]
6774 [[Bar:Article(context)|Article]]
6775 [[:Bar:Article(context)|Article]]
6776 [[Article(context)]]
6778 [[:Bar:X(Y)Z|X(Y)Z]]
6782 pre-save transform: context links ("pipe trick") with commas (bug 21660)
6786 [[Article (context), context|]]
6787 [[Article (context),context|]]
6788 [[Bar:Article (context), context|]]
6789 [[Bar:Article (context),context|]]
6790 [[:Bar:Article (context), context|]]
6791 [[:Bar:Article (context),context|]]
6793 [[Article (context), context|Article]]
6794 [[Article (context),context|Article]]
6795 [[Bar:Article (context), context|Article]]
6796 [[Bar:Article (context),context|Article]]
6797 [[:Bar:Article (context), context|Article]]
6798 [[:Bar:Article (context),context|Article]]
6802 pre-save transform: trim trailing empty lines
6806 Empty lines are trimmed
6812 Empty lines are trimmed
6816 pre-save transform: Signature expansion
6821 * <noinclude>~~~</noinclude>
6822 * <includeonly>~~~</includeonly>
6823 * <onlyinclude>~~~</onlyinclude>
6825 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
6826 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
6827 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
6828 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
6833 pre-save transform: Signature expansion in nowiki tags (bug 93)
6839 <nowiki>~~~~</nowiki>
6841 <includeonly><nowiki>~~~~</nowiki></includeonly>
6843 <noinclude><nowiki>~~~~</nowiki></noinclude>
6845 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
6847 {{subst:Foo}} shall be converted to FOO
6849 As well as inside noinclude/onlyinclude
6850 <noinclude>{{subst:Foo}}</noinclude>
6851 <onlyinclude>{{subst:Foo}}</onlyinclude>
6853 But not inside includeonly
6854 <includeonly>{{subst:Foo}}</includeonly>
6858 <nowiki>~~~~</nowiki>
6860 <includeonly><nowiki>~~~~</nowiki></includeonly>
6862 <noinclude><nowiki>~~~~</nowiki></noinclude>
6864 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
6866 FOO shall be converted to FOO
6868 As well as inside noinclude/onlyinclude
6869 <noinclude>FOO</noinclude>
6870 <onlyinclude>FOO</onlyinclude>
6872 But not inside includeonly
6873 <includeonly>{{subst:Foo}}</includeonly>
6877 ### Message transform tests
6880 message transform: magic variables
6890 message transform: should not transform wiki markup
6900 message transform: <noinclude> in transcluded template (bug 4926)
6910 message transform: <onlyinclude> in transcluded template (bug 4926)
6920 {{#special:}} page name, known
6924 {{#special:Recentchanges}}
6926 Special:RecentChanges
6930 {{#special:}} page name with subpage, known
6934 {{#special:Recentchanges/param}}
6936 Special:RecentChanges/param
6940 {{#special:}} page name, unknown
6944 {{#special:foobarnonexistent}}
6946 No such special page
6950 {{#speciale:}} page name, known
6954 {{#speciale:Recentchanges}}
6956 Special:RecentChanges
6960 {{#speciale:}} page name with subpage, known
6964 {{#speciale:Recentchanges/param}}
6966 Special:RecentChanges/param
6970 {{#speciale:}} page name, unknown
6974 {{#speciale:foobarnonexistent}}
6976 No_such_special_page
6985 [[Image:foobar.jpg]]
6987 <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>
6994 [[Image:foobar.jpg|right]]
6996 <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>
7001 Simple image (using File: namespace, now canonical)
7005 <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>
7012 [[Image:foobar.jpg|right|Caption text]]
7014 <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>
7019 Image with empty attribute
7021 [[Image:foobar.jpg|right||Caption text]]
7023 <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>
7028 Image with link tails
7030 123[[Image:foobar.jpg]]456
7031 123[[Image:foobar.jpg|right]]456
7032 123[[Image:foobar.jpg|thumb]]456
7034 <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
7036 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
7037 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
7042 Image with multiple captions -- only last one is accepted
7044 [[Image:foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
7046 <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>
7051 Image with width attribute at different positions
7053 [[Image:foobar.jpg|200px|right|Caption]]
7054 [[Image:foobar.jpg|right|200px|Caption]]
7055 [[Image:foobar.jpg|right|Caption|200px]]
7057 <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>
7058 <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>
7059 <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>
7064 Image with link parameter, wiki target
7066 [[Image:foobar.jpg|link=Target page]]
7068 <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>
7073 Image with link parameter, URL target
7075 [[Image:foobar.jpg|link=http://example.com/]]
7077 <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>
7082 Image with link parameter, wgExternalLinkTarget
7084 [[Image:foobar.jpg|link=http://example.com/]]
7086 wgExternalLinkTarget='foobar'
7088 <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>
7093 Image with link parameter, wgNoFollowLinks set to false
7095 [[Image:foobar.jpg|link=http://example.com/]]
7097 wgNoFollowLinks=false
7099 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7104 Image with link parameter, wgNoFollowDomainExceptions
7106 [[Image:foobar.jpg|link=http://example.com/]]
7108 wgNoFollowDomainExceptions='example.com'
7110 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7115 Image with link parameter, wgExternalLinkTarget, unnamed parameter
7117 [[Image:foobar.jpg|link=http://example.com/|Title]]
7119 wgExternalLinkTarget='foobar'
7121 <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>
7126 Image with empty link parameter
7128 [[Image:foobar.jpg|link=]]
7130 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
7135 Image with link parameter (wiki target) and unnamed parameter
7137 [[Image:foobar.jpg|link=Target page|Title]]
7139 <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>
7144 Image with link parameter (URL target) and unnamed parameter
7146 [[Image:foobar.jpg|link=http://example.com/|Title]]
7148 <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>
7153 Thumbnail image with link parameter
7155 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
7157 <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>
7162 Image with frame and link
7164 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
7166 <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>
7171 Image with frame and link and explicit alt
7173 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
7175 <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>
7180 Image with wiki markup in implicit alt
7182 [[Image:Foobar.jpg|testing '''bold''' in alt]]
7184 <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>
7189 Image with wiki markup in explicit alt
7191 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
7193 <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>
7198 Link to image page- image page normally doesn't exists, hence edit link
7199 Add test with existing image page
7200 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
7204 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
7209 bug 18784 Link to non-existent image page with caption should use caption as link text
7211 [[:Image:test|caption]]
7213 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
7218 Frameless image caption with a free URL
7220 [[Image:foobar.jpg|http://example.com]]
7222 <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>
7227 Thumbnail image caption with a free URL
7229 [[Image:foobar.jpg|thumb|http://example.com]]
7231 <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>
7236 Thumbnail image caption with a free URL and explicit alt
7238 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
7240 <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>
7245 BUG 1887: A ISBN with a thumbnail
7247 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
7249 <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>
7254 BUG 1887: A RFC with a thumbnail
7256 [[Image:foobar.jpg|thumb|This is RFC 12354]]
7258 <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>
7263 BUG 1887: A mailto link with a thumbnail
7265 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
7267 <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>
7271 # Pending resolution to bug 368
7273 BUG 648: Frameless image caption with a link
7275 [[Image:foobar.jpg|text with a [[link]] in it]]
7277 <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>
7282 BUG 648: Frameless image caption with a link (suffix)
7284 [[Image:foobar.jpg|text with a [[link]]foo in it]]
7286 <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>
7291 BUG 648: Frameless image caption with an interwiki link
7293 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
7295 <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>
7300 BUG 648: Frameless image caption with a piped interwiki link
7302 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
7304 <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>
7309 Escape HTML special chars in image alt text
7311 [[Image:foobar.jpg|& < > "]]
7313 <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>
7318 BUG 499: Alt text should have Ӓ, not &1234;
7320 [[Image:foobar.jpg|♀]]
7322 <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>
7327 Broken image caption with link
7329 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
7331 <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.
7336 Image caption containing another image
7338 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
7340 <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>
7345 Image caption containing a newline
7347 [[Image:Foobar.jpg|This
7350 <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>
7355 Parsoid: Image caption containing leading space
7356 (The leading space should not trigger nowiki escaping in wt2wt mode)
7358 [[Image:Foobar.jpg|thumb| bar]]
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>bar</div></div></div>
7365 Bug 3090: External links other than http: in image captions
7367 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
7369 <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>
7376 [[Image:foobar.jpg|a|class=b]]
7378 <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>
7383 Localized image handling (1).
7387 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
7389 <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>
7394 Localized image handling (2).
7398 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
7400 <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>
7405 "border", "frameless" and "class" attributes on an image.
7407 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
7409 <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>
7416 #REDIRECT [[File:Barfoo.jpg]]
7422 [[Image:Barfoo.jpg]]
7424 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
7429 Missing image with uploads disabled
7433 [[Image:Foobaz.jpg]]
7435 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
7444 Subpage test/subpage
7452 subpage title=[[Subpage test]]
7456 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
7461 Subpage noslash link
7463 subpage title=[[Subpage test]]
7467 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
7476 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
7481 BUG 561: {{/Subpage}}
7483 subpage title=[[Page]]
7487 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
7495 Category:MediaWiki User's Guide
7503 [[:Category:MediaWiki User's Guide]]
7505 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
7514 [[Category:MediaWiki User's Guide]]
7516 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
7520 PAGESINCATEGORY invalid title fatal (r33546 fix)
7522 {{PAGESINCATEGORY:<bogus>}}
7529 Category with different sort key
7533 [[Category:MediaWiki User's Guide|Foo]]
7535 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
7539 Category with identical sort key
7543 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
7545 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
7549 Category with empty sort key
7554 [[Category:MediaWiki User's Guide|]]
7556 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
7560 Category with empty sort key and parentheses
7565 [[Category:Foo (bar)|]]
7567 [[Category:Foo (bar)|Foo]]
7571 Category with link tail
7576 123[[Category:Foo]]456
7578 123[[Category:Foo]]456
7582 Category with template
7587 [[Category:{{echo|Foo}}]]
7589 [[Category:{{echo|Foo}}]]
7593 Category with template in sort key
7598 [[Category:Foo|{{echo|Bar}}]]
7600 [[Category:Foo|{{echo|Bar}}]]
7604 Category with template in sort key and title
7609 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
7611 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
7615 Category / paragraph interactions
7617 Foo [[Category:Baz]] Bar
7619 Foo [[Category:Baz]]
7627 [[Category:Baz]] Bar
7640 {{echo|[[Category:Baz]]}}
7655 ### Inter-language links
7658 Inter-language links
7664 [[zh:食品]]
7666 es:Alimento fr:Nourriture zh:食品
7670 Duplicate interlanguage links (bug 24502)
7686 Basic section headings
7693 ===Smaller headline===
7696 <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>
7699 <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>
7702 <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>
7708 Section headings with TOC
7711 === Subheadline 1 ===
7712 ===== Skipping a level =====
7713 ====== Skipping a level ======
7717 ===Another headline===
7719 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7721 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
7723 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
7725 <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>
7727 <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>
7734 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
7736 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
7741 <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>
7742 <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>
7743 <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>
7744 <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>
7745 <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>
7748 <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>
7752 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
7754 Handling of sections up to level 6 and beyond
7757 == Level 2 Heading==
7758 === Level 3 Heading===
7759 ==== Level 4 Heading====
7760 ===== Level 5 Heading=====
7761 ====== Level 6 Heading======
7762 ======= Level 7 Heading=======
7763 ======== Level 8 Heading========
7764 ========= Level 9 Heading=========
7765 ========== Level 10 Heading==========
7767 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7769 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
7771 <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>
7773 <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>
7775 <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>
7777 <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>
7779 <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>
7780 <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>
7781 <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>
7782 <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>
7783 <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>
7796 <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>
7797 <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>
7798 <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>
7799 <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>
7800 <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>
7801 <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>
7802 <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>
7803 <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>
7804 <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>
7805 <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>
7810 TOC regression (bug 9764)
7814 ==== title 1.1.1 ====
7819 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7821 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
7823 <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>
7825 <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>
7828 <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>
7831 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
7833 <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>
7838 <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>
7839 <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>
7840 <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>
7841 <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>
7842 <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>
7843 <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>
7848 TOC with wgMaxTocLevel=3 (bug 6204)
7854 ==== title 1.1.1 ====
7859 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7861 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
7863 <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>
7864 <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>
7867 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
7869 <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>
7874 <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>
7875 <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>
7876 <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>
7877 <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>
7878 <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>
7879 <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>
7884 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
7890 ====Section 1.1.1====
7891 ====Section 1.1.1.1====
7894 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7896 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
7898 <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>
7901 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
7904 <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>
7905 <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>
7906 <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>
7907 <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>
7908 <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>
7914 Resolving duplicate section names
7919 <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>
7920 <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>
7925 Resolving duplicate section names with differing case (bug 10721)
7930 <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>
7931 <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>
7943 Template with sections, __NOTOC__
7950 <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>
7951 <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>
7952 <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>
7953 <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>
7958 __NOEDITSECTION__ keyword
7964 <h2> <span class="mw-headline" id="Section_1">Section 1</span></h2>
7965 <h2> <span class="mw-headline" id="Section_2">Section 2</span></h2>
7970 Link inside a section heading
7972 ==Section with a [[Main Page|link]] in it==
7974 <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>
7979 TOC regression (bug 12077)
7986 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
7988 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
7990 <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>
7993 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
7996 <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>
7997 <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>
7998 <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>
8003 BUG 1219 URL next to image (good)
8005 http://example.com [[Image:foobar.jpg]]
8007 <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>
8012 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
8015 The line above must have a trailing space!
8018 But just in case it doesn't...
8020 <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>
8021 <p>The line above must have a trailing space!
8023 <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>
8024 <p>But just in case it doesn't...
8029 Header with special characters (bug 25462)
8031 The tooltips shall not show entities to the user (ie. be double escaped)
8048 <p>The tooltips shall not show entities to the user (ie. be double escaped)
8050 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8052 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
8053 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
8054 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
8055 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
8056 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
8059 <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>
8062 <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>
8065 <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>
8068 <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>
8071 <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>
8077 Headers with excess '=' characters
8078 (Are similar tests necessary beyond the 1st level?)
8082 =''italic'' heading==
8083 ==''italic'' heading=
8085 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8087 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
8088 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
8089 <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>
8090 <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>
8093 <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>
8094 <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>
8095 <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>
8096 <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>
8101 HTML headers vs TOC (bug 23393)
8102 (__NOEDITSECTION__ for clearer output, doesn't matter here)
8114 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8116 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
8118 <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>
8119 <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>
8122 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
8124 <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>
8125 <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>
8130 <h1> <span class="mw-headline" id="Header_1">Header 1</span></h1>
8131 <h2> <span class="mw-headline" id="Header_1.1">Header 1.1</span></h2>
8132 <h2> <span class="mw-headline" id="Header_1.2">Header 1.2</span></h2>
8133 <h1> <span class="mw-headline" id="Header_2">Header 2</span></h1>
8134 <h2> <span class="mw-headline" id="Header_2.1">Header 2.1</span></h2>
8135 <h2> <span class="mw-headline" id="Header_2.2">Header 2.2</span></h2>
8140 BUG 1219 URL next to image (broken)
8142 http://example.com[[Image:foobar.jpg]]
8144 <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>
8149 Bug 1186 news: in the middle of text
8151 http://en.wikinews.org/wiki/Wikinews:Workplace
8153 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
8159 Namespaced link must have a title
8168 Namespaced link must have a title (bad fragment version)
8170 [[Project:#fragment]]
8172 <p>[[Project:#fragment]]
8178 ### HTML tags and HTML attributes
8182 div with no attributes
8184 <div>HTML rocks</div>
8186 <div>HTML rocks</div>
8191 div with double-quoted attribute
8193 <div id="rock">HTML rocks</div>
8195 <div id="rock">HTML rocks</div>
8200 div with single-quoted attribute
8202 <div id='rock'>HTML rocks</div>
8204 <div id="rock">HTML rocks</div>
8209 div with unquoted attribute
8211 <div id=rock>HTML rocks</div>
8213 <div id="rock">HTML rocks</div>
8218 div with illegal double attributes
8220 <div id="a" id="b">HTML rocks</div>
8222 <div id="b">HTML rocks</div>
8226 # FIXME: produce empty string instead of "class" in the PHP parser, following
8229 div with empty attribute value, space before equals
8233 <div class =>HTML rocks</div>
8235 <div class="">HTML rocks</div>
8239 # The PHP parser escapes the opening brace to { for some reason, so
8240 # disabled this test for it.
8242 div with braces in attribute value
8246 <div title="{}">Foo</div>
8248 <div title="{}">Foo</div>
8251 # This it very inconsistent in the PHP parser: it returns
8252 # class="class" if there is a space between the name and the equal sign (see
8253 # 'div with empty attribute value, space before equals'), but strips the
8254 # attribute completely if the space is missing. We hope that not much content
8255 # depends on this, so are implementing the behavior below in Parsoid for
8256 # consistencies' sake. Disabled for the PHP parser.
8257 # FIXME: fix this behavior in the PHP parser?
8259 div with empty attribute value, no space before equals
8263 <div class=>HTML rocks</div>
8265 <div class="">HTML rocks</div>
8270 HTML multiple attributes correction
8272 <p class="error" class="awesome">Awesome!</p>
8274 <p class="awesome">Awesome!</p>
8279 Table multiple attributes correction
8282 !+ class="error" class="awesome"| status
8287 <th class="awesome"> status
8295 <DIV ID="x">HTML ROCKS</DIV>
8297 <div id="x">HTML ROCKS</div>
8302 Non-ASCII pseudo-tags are rendered as text
8311 Pseudo-tag with URL 'name' renders as url link
8313 <http://example.com/>
8315 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
8320 text with amp in the middle of nowhere
8324 <p>Remember AT&T?
8329 text with character entity: eacute
8331 I always thought é was a cute letter.
8333 <p>I always thought é was a cute letter.
8338 text with entity-escaped character entity-like string: eacute
8340 I always thought &eacute; was a cute letter.
8342 <p>I always thought &eacute; was a cute letter.
8347 text with undefined character entity: xacute
8349 I always thought &xacute; was a cute letter.
8351 <p>I always thought &xacute; was a cute letter.
8363 [[Media:Foobar.jpg]]
8365 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
8370 Media link with text
8372 [[Media:Foobar.jpg|A neat file to look at]]
8374 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
8378 # FIXME: this is still bad HTML tag nesting
8380 Media link with nasty text
8381 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
8383 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
8385 <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>
8390 Media link to nonexistent file (bug 1702)
8392 [[Media:No such.jpg]]
8394 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
8399 Image link to nonexistent file (bug 1850 - good)
8401 [[Image:No such.jpg]]
8403 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
8408 :Image link to nonexistent file (bug 1850 - bad)
8410 [[:Image:No such.jpg]]
8412 <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>
8419 Character reference normalization in link text (bug 1938)
8421 [[Main Page|this&that]]
8423 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
8430 Test for unicode normalization
8432 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
8436 (bug 19451) Links should refer to the normalized form.
8444 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8445 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8446 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8447 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8448 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8453 Empty attribute crash test (bug 2067)
8455 <font color="">foo</font>
8457 <p><font color="">foo</font>
8462 Empty attribute crash test single-quotes (bug 2067)
8464 <font color=''>foo</font>
8466 <p><font color="">foo</font>
8471 Attribute test: equals, then nothing
8473 <font color=>foo</font>
8480 Attribute test: unquoted value
8482 <font color=x>foo</font>
8484 <p><font color="x">foo</font>
8489 Attribute test: unquoted but illegal value (hash)
8491 <font color=#x>foo</font>
8493 <p><font color="#x">foo</font>
8498 Attribute test: no value
8500 <font color>foo</font>
8502 <p><font color="color">foo</font>
8507 Bug 2095: link with three closing brackets
8511 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
8516 Bug 2095: link with pipe and three closing brackets
8520 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
8525 Bug 2095: link with pipe and three closing brackets, version 2
8527 [[Main Page|[http://example.com/]]]
8529 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
8539 Template:Dangerous attribute
8541 " onmouseover="alert(document.cookie)
8545 Template:Dangerous style attribute
8547 border-size: expression(alert(document.cookie))
8553 <div style="float: right; {{{1}}}">Magic div</div>
8557 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
8559 <div title="{{test}}"></div>
8561 <div title="This is a test template"></div>
8566 Bug 2304: HTML attribute safety (dangerous template; 2309)
8568 <div title="{{dangerous attribute}}"></div>
8570 <div title=""></div>
8575 Bug 2304: HTML attribute safety (dangerous style template; 2309)
8577 <div style="{{dangerous style attribute}}"></div>
8579 <div style="/* insecure input */"></div>
8584 Bug 2304: HTML attribute safety (safe parameter; 2309)
8586 {{div style|width: 200px}}
8588 <div style="float: right; width: 200px">Magic div</div>
8593 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
8595 {{div style|width: expression(alert(document.cookie))}}
8597 <div style="/* insecure input */">Magic div</div>
8602 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
8604 {{div style|"><script>alert(document.cookie)</script>}}
8606 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
8611 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
8613 {{div style|" ><script>alert(document.cookie)</script>}}
8615 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
8620 Bug 2304: HTML attribute safety (link)
8622 <div title="[[Main Page]]"></div>
8624 <div title="[[Main Page]]"></div>
8629 Bug 2304: HTML attribute safety (italics)
8631 <div title="''foobar''"></div>
8633 <div title="''foobar''"></div>
8638 Bug 2304: HTML attribute safety (bold)
8640 <div title="'''foobar'''"></div>
8642 <div title="'''foobar'''"></div>
8648 Bug 2304: HTML attribute safety (ISBN)
8650 <div title="ISBN 1234567890"></div>
8652 <div title="ISBN 1234567890"></div>
8657 Bug 2304: HTML attribute safety (RFC)
8659 <div title="RFC 1234"></div>
8661 <div title="RFC 1234"></div>
8666 Bug 2304: HTML attribute safety (PMID)
8668 <div title="PMID 1234567890"></div>
8670 <div title="PMID 1234567890"></div>
8675 Bug 2304: HTML attribute safety (web link)
8677 <div title="http://example.com/"></div>
8679 <div title="http://example.com/"></div>
8684 Bug 2304: HTML attribute safety (named web link)
8686 <div title="[http://example.com/ link]"></div>
8688 <div title="[http://example.com/ link]"></div>
8693 Bug 3244: HTML attribute safety (extension; safe)
8695 <div style="<nowiki>background:blue</nowiki>"></div>
8697 <div style="background:blue"></div>
8702 Bug 3244: HTML attribute safety (extension; unsafe)
8704 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
8706 <div style="/* insecure input */"></div>
8710 # More MSIE fun discovered by Tom Gilder
8713 MSIE CSS safety test: spurious slash
8715 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
8717 <div style="/* insecure input */">evil</div>
8722 MSIE CSS safety test: hex code
8724 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
8726 <div style="/* insecure input */">evil</div>
8731 MSIE CSS safety test: comment in url
8733 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
8735 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
8740 MSIE CSS safety test: comment in expression
8742 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
8744 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
8750 Table attribute legitimate extension
8753 !+ style="<nowiki>color:blue</nowiki>"| status
8758 <th style="color:blue"> status
8764 Table attribute safety
8767 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
8772 <th style="/* insecure input */"> status
8778 CSS line continuation 1
8780 <div style="background-image: u\ rl(test.jpg);"></div>
8782 <div style="/* insecure input */"></div>
8787 CSS line continuation 2
8789 <div style="background-image: u\ rl(test.jpg); "></div>
8791 <div style="/* insecure input */"></div>
8802 Expansion of multi-line templates in attribute values (bug 6255)
8804 <div style="background: {{identity|#00FF00}}">-</div>
8806 <div style="background: #00FF00">-</div>
8812 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
8814 <div style="background:
8817 <div style="background: #00FF00">-</div>
8822 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
8824 <div style="background: #00FF00">-</div>
8826 <div style="background: #00FF00">-</div>
8831 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
8834 Parser hook: empty input
8847 Parser hook: empty input using terminated empty elements
8860 Parser hook: empty input using terminated empty elements (space before)
8873 Parser hook: basic input
8887 Parser hook: case insensitive
8901 Parser hook: case insensitive, redux
8914 Parser hook: nested tags
8918 <tag><tag></tag></tag>
8929 Parser hook: basic arguments
8931 <tag width=200 height = "100" depth = '50' square></tag>
8939 'square' => 'square',
8946 Parser hook: argument containing a forward slash (bug 5344)
8948 <tag filename='/tmp/bla'></tag>
8953 'filename' => '/tmp/bla',
8960 Parser hook: empty input using terminated empty elements (bug 2374)
8973 # </tag> should be output literally since there is no matching tag that begins it
8975 Parser hook: basic arguments using terminated empty elements (bug 2374)
8977 <tag width=200 height = "100" depth = '50' square/>
8987 'square' => 'square',
8996 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
9000 Parser hook: static parser hook not inside a comment
9002 <statictag>hello, world</statictag>
9003 <statictag action=flush/>
9011 Parser hook: static parser hook inside a comment
9013 <!-- <statictag>hello, world</statictag> -->
9014 <statictag action=flush/>
9020 # Nested template calls; this case was broken by Parser.php rev 1.506,
9024 Template:One-parameter
9026 (My parameter is: {{{1}}})
9030 Template:Map-one-parameter
9036 Nested template calls
9038 {{Map-one-parameter|One-parameter|param}}
9040 <p>(My parameter is: param)
9049 Sanitizer: Closing of open tags
9051 <s></s><table></table>
9053 <s></s><table></table>
9058 Sanitizer: Closing of open but not closed tags
9067 Sanitizer: Closing of closed but not open tags
9076 Sanitizer: Closing of closed but not open table tags
9078 Table not started</td></tr></table>
9080 <p>Table not started</td></tr></table>
9085 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
9087 <span id="æ: v">byte</span>[[#æ: v|backlink]]
9089 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
9094 Sanitizer: Validating the contents of the id attribute (bug 4515)
9100 Something, but definitely not <br id="9" />...
9104 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
9108 <br id="foo" /><br id="foo" />
9110 Something need to be done. foo-2 ?
9114 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
9117 <meta itemprop="hello" content="world">
9118 <meta http-equiv="refresh" content="5">
9119 <meta itemprop="hello" http-equiv="refresh" content="5">
9120 <link itemprop="hello" href="{{SERVER}}">
9121 <link rel="stylesheet" href="{{SERVER}}">
9122 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
9125 <div itemscope="itemscope">
9126 <p> <meta itemprop="hello" content="world" />
9127 <meta http-equiv="refresh" content="5">
9128 <meta itemprop="hello" content="5" />
9130 <link itemprop="hello" href="http://example.org" />
9131 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
9132 <link itemprop="hello" href="http://example.org" />
9138 Language converter: output gets cut off unexpectedly (bug 5757)
9142 this bit is safe: }-
9144 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
9146 then we get cut off here: }-
9148 all additional text is vanished
9150 <p>this bit is safe: }-
9151 </p><p>but if we add a conversion instance: xxx
9152 </p><p>then we get cut off here: }-
9153 </p><p>all additional text is vanished
9158 Self closed html pairs (bug 5487)
9161 <center><font id="bug" />Centered text</center>
9162 <div><font id="bug2" />In div text</div>
9164 <center><font id="bug" />Centered text</center>
9165 <div><font id="bug2" />In div text</div>
9174 Punctuation: nbsp before exclamation
9178 <p>C'est grave !
9183 Punctuation: CSS !important (bug 11874)
9185 <div style="width:50% !important">important</div>
9187 <div style="width:50% !important">important</div>
9192 Punctuation: CSS ! important (bug 11874; with space after)
9194 <div style="width:50% ! important">important</div>
9196 <div style="width:50% ! important">important</div>
9202 HTML bullet list, closed tags (bug 5497)
9217 HTML bullet list, unclosed tags (bug 5497)
9234 HTML ordered list, closed tags (bug 5497)
9249 HTML ordered list, unclosed tags (bug 5497)
9266 HTML nested bullet list, closed tags (bug 5497)
9291 HTML nested bullet list, open tags (bug 5497)
9316 HTML nested ordered list, closed tags (bug 5497)
9341 HTML nested ordered list, open tags (bug 5497)
9366 HTML ordered list item with parameters oddity
9368 <ol><li id="fragment">One</li></ol>
9370 <ol><li id="fragment">One</li></ol>
9375 bug 5918: autonumbering
9377 [http://first/] [http://second] [ftp://ftp]
9381 [mailto:enclosed@mail.tld With target]
9383 [mailto:enclosed@mail.tld]
9385 mailto:inline@mail.tld
9387 <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>
9388 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
9389 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
9390 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
9391 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
9397 # Security and HTML correctness
9398 # From Nick Jenkins' fuzz testing
9402 Fuzz testing: Parser13
9417 Fuzz testing: Parser14
9422 <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>
9423 http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
9425 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
9432 Fuzz testing: Parser14-table
9437 <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>
9438 <table style="__TOC__">
9444 # Known to produce bogus xml (extra </td>)
9446 Fuzz testing: Parser16
9466 Fuzz testing: Parser21
9469 ! irc://{{ftp://a" onmouseover="alert('hello world');"
9474 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
9484 Fuzz testing: Parser22
9486 http://===r:::https://b
9490 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
9498 # Known to produce bad XML for now
9500 Fuzz testing: Parser24
9507 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
9508 <br style="onmouseover='alert(document.cookie);' " />
9510 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
9515 <u class="|">}}}} >
9516 <br style="onmouseover='alert(document.cookie);'" />
9518 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
9527 # Note: the current result listed for this is not what the original one was,
9528 # but the original bug was JavaScript injection, which is fixed in any case.
9529 # It's not clear that the original result listed was any more correct than the
9530 # current one. Original result:
9533 # <li class="||">
9534 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
9536 Fuzz testing: Parser25 (bug 6055)
9542 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
9544 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
9549 Fuzz testing: URL adjacent extension (with space, clean)
9552 http://example.com <nowiki>junk</nowiki>
9554 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
9559 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
9562 http://example.com<nowiki>junk</nowiki>
9564 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
9569 Fuzz testing: URL adjacent extension (no space, dirty; pre)
9572 http://example.com<pre>junk</pre>
9574 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
9579 Fuzz testing: image with bogus manual thumbnail
9581 [[Image:foobar.jpg|thumbnail= ]]
9583 <div class="thumb tright"><div class="thumbinner" style="width:1943px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
9588 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
9590 <pre dir=" "></pre>
9592 <pre dir=" "></pre>
9597 Parsing optional HTML elements (Bug 6171)
9602 <td> Some tabular data</td>
9603 <td> More tabular data ...
9604 <td> And yet som tabular data</td>
9610 <td> Some tabular data</td>
9611 <td> More tabular data ...
9612 </td><td> And yet som tabular data</td>
9619 Correct handling of <td>, <tr> (Bug 6171)
9624 <td> Some tabular data</td>
9625 <td> More tabular data ...</td>
9626 <td> And yet som tabular data</td>
9632 <td> Some tabular data</td>
9633 <td> More tabular data ...</td>
9634 <td> And yet som tabular data</td>
9642 Parsing crashing regression (fr:JavaScript)
9646 <p></body></x>
9651 Inline wiki vs wiki block nesting
9657 <p><b>Bold paragraph</b>
9658 </p><p>New wiki paragraph
9663 Inline HTML vs wiki block nesting
9671 <p><b>Bold paragraph</b>
9672 </p><p>New wiki paragraph
9676 # Original result was this:
9677 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
9679 # While that might be marginally more intuitive, maybe, the six-apostrophe
9680 # construct is clearly pathological and the result stated here (which is what
9681 # the parser actually does) is about as reasonable as anything.
9683 Mixing markup for italics and bold
9686 '''bold''''''bold''bolditalics'''''
9688 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
9696 Article for special page transclusion test
9700 Special page transclusion
9703 {{Special:Prefixindex/Xyzzyx}}
9705 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
9710 Special page transclusion twice (bug 5021)
9713 {{Special:Prefixindex/Xyzzyx}}
9714 {{Special:Prefixindex/Xyzzyx}}
9716 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
9717 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
9722 Transclusion of default MediaWiki message
9724 {{MediaWiki:Mainpage}}
9731 Transclusion of nonexistent MediaWiki message
9733 {{MediaWiki:Mainpagexxx}}
9735 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
9740 Transclusion of MediaWiki message with underscore
9742 {{MediaWiki:history_short}}
9749 Transclusion of MediaWiki message with space
9751 {{MediaWiki:history short}}
9758 Invalid header with following text
9768 Section extraction test (section 0)
9788 Section extraction test (section 1)
9810 Section extraction test (section 2)
9831 Section extraction test (section 3)
9851 Section extraction test (section 4)
9875 Section extraction test (section 5)
9895 Section extraction test (section 6)
9916 Section extraction test (section 7)
9936 Section extraction test (section 8)
9956 Section extraction test (section 9)
9977 Section extraction test (section 10)
9997 Section extraction test (nonexistent section 11)
10016 Section extraction test with bogus heading (section 1)
10021 ==bogus== not a legal section
10025 ==bogus== not a legal section
10029 Section extraction test with bogus heading (section 2)
10034 ==bogus== not a legal section
10041 Section extraction test with comment after heading (section 1)
10053 Section extraction test with comment after heading (section 2)
10065 Section extraction test with bogus <nowiki> heading (section 1)
10070 ==bogus== <nowiki>not a legal section</nowiki>
10074 ==bogus== <nowiki>not a legal section</nowiki>
10078 Section extraction test with bogus <nowiki> heading (section 2)
10083 ==bogus== <nowiki>not a legal section</nowiki>
10090 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
10091 # instead of respecting commented sections
10093 Section extraction prefixed by comment (section 1)
10104 Section extraction prefixed by comment (section 2)
10115 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
10116 # instead of respecting HTML-style headings
10118 Section extraction, mixed wiki and html (section 1)
10134 Section extraction, mixed wiki and html (section 2)
10150 # Formerly testing for bug 3342
10152 Section extraction, heading surrounded by <noinclude>
10156 <noinclude>==unmarked==</noinclude>
10162 # Test behavior of bug 19910
10164 Sectiion with all-equals
10169 The line above must have a trailing space
10172 But just in case it doesn't...
10176 But just in case it doesn't...
10180 Section replacement test (section 0)
10211 Section replacement test (section 1)
10240 Section replacement test (section 2)
10270 Section replacement test (section 3)
10301 Section replacement test (section 4)
10328 Section replacement test (section 5)
10359 Section replacement test (section 6)
10389 Section replacement test (section 7)
10420 Section replacement test (section 8)
10451 Section replacement test (section 9)
10480 Section replacement test (section 10)
10510 Section replacement test with initial whitespace (bug 13728)
10514 Preformatted initial line
10518 Preformatted initial line
10525 Section extraction, heading followed by pre with 20 spaces (bug 6398)
10537 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
10550 Section extraction, <pre> around bogus header (bug 10309)
10567 Section replacement, <pre> around bogus header (bug 10309)
10569 noxml replace=2,"xxx"
10590 Handling of 
 in URLs
10594 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
10601 5 quotes, code coverage +1 line
10608 Special:Search page linking.
10612 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
10624 * {{BASEPAGENAMEE}}
10626 * {{TALKPAGENAMEE}}
10627 * {{SUBJECTPAGENAME}}
10628 * {{SUBJECTPAGENAMEE}}
10634 * {{SUBJECTSPACEE}}
10635 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
10637 <ul><li> Parser test
10638 </li><li> Parser test
10639 </li><li> Parser test
10640 </li><li> Parser_test
10641 </li><li> Parser test
10642 </li><li> Parser_test
10643 </li><li> Talk:Parser test
10644 </li><li> Talk:Parser_test
10645 </li><li> Parser test
10646 </li><li> Parser_test
10653 </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>
10657 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
10667 image4 |300px| centre
10668 image5.svg| http://///////
10673 <ul class="gallery">
10674 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10675 <div style="height: 150px;">Image1.png</div>
10676 <div class="gallerytext">
10679 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10680 <div style="height: 150px;">Image2.gif</div>
10681 <div class="gallerytext">
10686 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10687 <div style="height: 150px;">Image3</div>
10688 <div class="gallerytext">
10691 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10692 <div style="height: 150px;">Image4</div>
10693 <div class="gallerytext">
10698 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10699 <div style="height: 150px;">Image5.svg</div>
10700 <div class="gallerytext">
10701 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
10705 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10706 <div style="height: 150px;">* image6</div>
10707 <div class="gallerytext">
10715 Gallery (with options)
10717 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
10718 File:Nonexistant.jpg|caption
10719 File:Nonexistant.jpg
10720 image:foobar.jpg|some '''caption''' [[Main Page]]
10722 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
10725 <ul class="gallery" style="max-width: 226px;_width: 226px;">
10726 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
10727 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10728 <div style="height: 70px;">Nonexistant.jpg</div>
10729 <div class="gallerytext">
10734 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10735 <div style="height: 70px;">Nonexistant.jpg</div>
10736 <div class="gallerytext">
10739 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10740 <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>
10741 <div class="gallerytext">
10742 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10746 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10747 <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>
10748 <div class="gallerytext">
10751 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
10752 <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>
10753 <div class="gallerytext">
10763 Gallery with wikitext inside caption
10766 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
10767 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
10770 <ul class="gallery">
10771 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10772 <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>
10773 <div class="gallerytext">
10774 <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>
10778 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10779 <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>
10780 <div class="gallerytext">
10781 <p>This is a test template
10790 gallery (with showfilename option)
10792 <gallery showfilename>
10793 File:Nonexistant.jpg|caption
10794 File:Nonexistant.jpg
10795 image:foobar.jpg|some '''caption''' [[Main Page]]
10799 <ul class="gallery">
10800 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10801 <div style="height: 150px;">Nonexistant.jpg</div>
10802 <div class="gallerytext">
10803 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
10808 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10809 <div style="height: 150px;">Nonexistant.jpg</div>
10810 <div class="gallerytext">
10811 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
10815 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10816 <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>
10817 <div class="gallerytext">
10818 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
10819 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
10823 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10824 <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>
10825 <div class="gallerytext">
10826 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
10835 Gallery (with namespace-less filenames)
10838 File:Nonexistant.jpg
10844 <ul class="gallery">
10845 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10846 <div style="height: 150px;">Nonexistant.jpg</div>
10847 <div class="gallerytext">
10850 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10851 <div style="height: 150px;">Nonexistant.jpg</div>
10852 <div class="gallerytext">
10855 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10856 <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>
10857 <div class="gallerytext">
10860 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
10861 <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>
10862 <div class="gallerytext">
10870 HTML Hex character encoding (spells the word "JavaScript")
10872 JavaScript
10874 <p>JavaScript
10879 HTML Hex character encoding bogus encoding (bug 26437 regression check)
10883 <p>&#xsee;&#XSEE;
10888 HTML Hex character encoding mixed case
10897 __FORCETOC__ override
10909 ISBN 978-0-1234-56 789
10911 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
10916 ISBN followed by 5 spaces
10927 ISBN ISBN 1234567890
10929 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
10934 Bug 22905: <abbr> followed by ISBN followed by </a>
10936 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
10938 <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>
10947 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
10952 Double RFC with a wiki link
10956 <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>
10965 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
10970 Centre-aligned image
10972 [[Image:foobar.jpg|centre]]
10974 <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>
10981 [[Image:foobar.jpg|none]]
10983 <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>
10988 Width + Height sized image (using px) (height is ignored)
10990 [[Image:foobar.jpg|640x480px]]
10992 <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>
10997 Width-sized image (using px, no following whitespace)
10999 [[Image:foobar.jpg|640px]]
11001 <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>
11006 Width-sized image (using px, with following whitespace - test regression from r39467)
11008 [[Image:foobar.jpg|640px ]]
11010 <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>
11015 Width-sized image (using px, with preceding whitespace - test regression from r39467)
11017 [[Image:foobar.jpg| 640px]]
11019 <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>
11024 Another italics / bold test
11032 # Note the results may be incorrect, as parserTest output included this:
11033 # XML error: Mismatched tag at byte 6120:
11034 # ...<dd> </dt></dl> </dd...
11042 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
11053 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
11055 Images with the "|" character in the comment
11057 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
11059 <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>
11064 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
11066 <html><script>alert(1);</script></html>
11068 <p><html><script>alert(1);</script></html>
11073 HTML with raw HTML ($wgRawHtml==true)
11077 <html><script>alert(1);</script></html>
11079 <p><script>alert(1);</script>
11084 Parents of subpages, one level up
11086 subpage title=[[Subpage test/L1/L2/L3]]
11090 <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>
11096 Parents of subpages, one level up, not named
11098 subpage title=[[Subpage test/L1/L2/L3]]
11102 <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>
11109 Parents of subpages, two levels up
11111 subpage title=[[Subpage test/L1/L2/L3]]
11117 <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
11118 </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>
11123 Parents of subpages, two levels up, without trailing slash or name.
11125 subpage title=[[Subpage test/L1/L2/L3]]
11134 Parents of subpages, two levels up, with lots of extra trailing slashes.
11136 subpage title=[[Subpage test/L1/L2/L3]]
11140 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
11145 Definition list code coverage
11151 <dl><dt> title  </dt><dd> def
11152 </dd><dt> title </dt><dd> def
11153 </dd><dt>title</dt><dd> def
11159 Don't fall for the self-closing div
11161 <div>hello world</div/>
11163 <div>hello world</div>
11172 <p>[[:Template:Msg]]
11181 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
11185 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
11187 Always escape literal '>' in output, not just after '<'
11201 <p>This is a test template
11202 This is a test template
11214 Inclusion of !userCanEdit() content
11218 <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>
11224 Out-of-order TOC heading levels
11233 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
11235 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
11237 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
11238 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
11241 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
11243 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
11244 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
11249 <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>
11250 <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>
11251 <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>
11252 <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>
11253 <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>
11254 <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>
11260 ISBN with a dummy number
11270 ISBN with space-delimited number
11274 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
11280 ISBN with multiple spaces, no number
11299 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
11300 </p><p>ISBN 12345678901
11306 ISBN with trailing year (bug 8110)
11308 ISBN 1-234-56789-0 - 2006
11310 ISBN 1 234 56789 0 - 2006
11312 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
11313 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
11321 {{anchorencode:foo bar©#%n}}
11323 <p>foo_bar.C2.A9.23.25n
11328 anchorencode trims spaces
11330 {{anchorencode: __pretty__please__}}
11337 anchorencode deals with links
11339 {{anchorencode: [[hello|world]] [[hi]]}}
11346 anchorencode deals with templates
11348 {{anchorencode: {{Foo}} }}
11355 anchorencode encodes like the TOC generator: (bug 18431)
11357 === _ +:.3A%3A&&]] ===
11358 {{anchorencode: _ +:.3A%3A&&]] }}
11361 <h3> <span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span></h3>
11362 <p>.2B:.3A.253A.26.26.5D.5D
11366 # Expected output in the following test is not necessarily expected (there
11367 # should probably be <p> tags inside the <blockquote> in the output) -- it's
11368 # only testing for well-formedness.
11370 Bug 6200: blockquotes and paragraph formatting
11390 Bug 8293: Use of center tag ruins paragraph formatting
11412 ### Language variants related tests
11415 Self-link in language variants
11417 title=[[Dunav]] language=sr
11419 Both [[Dunav]] and [[Дунав]] are names for this river.
11421 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
11432 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
11434 title=[[Duna]] language=sr
11436 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
11438 <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.
11443 Link to pages in language variants
11447 Main Page can be written as [[Маин Паге]]
11449 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
11455 Multiple links to pages in language variants
11459 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
11461 <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>.
11467 Simple template in language variants
11473 <p>This is a test template
11479 Template with explicit namespace in language variants
11485 <p>This is a test template
11491 Basic test for template parameter in language variants
11495 {{парамтест|param=foo}}
11497 <p>This is a test template with parameter foo
11503 Simple category in language variants
11507 [[Category:МедиаWики Усер'с Гуиде]]
11509 <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>
11526 Don't convert blue categorylinks to another variant (bug 33210)
11530 [[A]][[Category:分类]]
11532 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
11537 Stripping -{}- tags (language variants)
11541 Latin proverb: -{Ne nuntium necare}-
11543 <p>Latin proverb: Ne nuntium necare
11549 Prevent conversion with -{}- tags (language variants)
11551 language=sr variant=sr-ec
11553 Latinski: -{Ne nuntium necare}-
11555 <p>Латински: Ne nuntium necare
11561 Prevent conversion of text with -{}- tags (language variants)
11563 language=sr variant=sr-ec
11565 Latinski: -{Ne nuntium necare}-
11567 <p>Латински: Ne nuntium necare
11573 Prevent conversion of links with -{}- tags (language variants)
11575 language=sr variant=sr-ec
11579 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11585 -{}- tags within headlines (within html for parserConvert())
11587 language=sr variant=sr-ec
11591 <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>
11597 Explicit definition of language variant alternatives
11599 language=zh variant=zh-tw
11601 -{zh:China;zh-tw:Taiwan}-, not China
11603 <p>Taiwan, not China
11609 Conversion around HTML tags
11611 language=sr variant=sr-ec
11613 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
11614 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
11617 <span title="ЛаCтин">ски</span>
11623 Explicit session-wise language variant mapping (A flag and - flag)
11625 language=zh variant=zh-tw
11627 Taiwan is not China.
11628 But -{A|zh:China;zh-tw:Taiwan}- is China,
11629 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
11630 and -{China}- is China.
11632 <p>Taiwan is not China.
11633 But Taiwan is Taiwan,
11634 (This should be stripped!)
11635 and China is China.
11640 Explicit session-wise language variant mapping (H flag for hide)
11642 language=zh variant=zh-tw
11644 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
11647 <p>(This should be stripped!)
11653 Adding explicit conversion rule for title (T flag)
11655 language=zh variant=zh-tw showtitle
11657 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
11660 <p>Should be stripped!
11665 Testing that changing the language variant here in the tests actually works
11667 language=zh variant=zh showtitle
11669 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
11672 <p>Should be stripped!
11677 Recursive conversion of alt and title attrs shouldn't clear converter state
11679 language=zh variant=zh-cn showtitle
11681 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
11682 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
11686 Should be stripped<span title="Exclamation">!</span>
11691 Bug 24072: more test on conversion rule for title
11693 language=zh variant=zh-tw showtitle
11695 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
11696 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
11699 <p>This should be stripped!
11700 This won't take interferes with the title rule.
11705 Raw output of variant escape tags (R flag)
11707 language=zh variant=zh-tw
11709 Raw: -{R|zh:China;zh-tw:Taiwan}-
11711 <p>Raw: zh:China;zh-tw:Taiwan
11716 Nested using of manual convert syntax
11718 language=zh variant=zh-hk
11720 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
11722 <p>Nested: Hello Hong Kong!
11727 Proper conversion of text in external links
11729 language=sr variant=sr-ec
11731 http://www.google.com
11732 gopher://www.google.com
11733 [http://www.google.com http://www.google.com]
11734 [gopher://www.google.com gopher://www.google.com]
11735 [https://www.google.com irc://www.google.com]
11736 [ftp://www.google.com www.google.com/ftp://dir]
11737 [//www.google.com www.google.com]
11739 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
11740 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
11741 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
11742 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
11743 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
11744 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
11745 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
11750 Do not convert roman numbers to language variants
11752 language=sr variant=sr-ec
11756 <p>Фридрих IV је цар.
11761 Unclosed language converter markup "-{"
11772 Don't convert raw rule "-{R|=>}-" to "=>"
11789 Bug 529: Uncovered bullet
11799 # Plain MediaWiki does not remove empty lists, but tidy actually does.
11800 # Templates in Wikipedia rely on this behavior, as tidy has always been
11801 # enabled there. These tests are normally run *without* tidy, so specify the
11802 # full output here.
11803 # To test realistic parsing behavior, apply a tidy-like transformation to both
11804 # the expected output and your parser's output.
11806 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
11808 ******* Foo {{bullet}}
11810 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
11823 Bug 529: Uncovered table already at line-start
11846 Bug 529: Uncovered bullet in parser function result
11848 * Foo {{lc:{{bullet}} }}
11857 Bug 5678: Double-parsed template argument
11859 {{lc:{{{1}}}|hello}}
11866 Bug 5678: Double-parsed template invocation
11868 {{lc:{{paramtest {{!}} param = hello }} }}
11870 <p>{{paramtest | param = hello }}
11875 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
11878 title=[[Main Page]]
11880 {{PRVNÍVELKÉ:ěščř}}
11881 {{prvnívelké:ěščř}}
11901 Morwen/13: Unclosed link followed by heading
11908 <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>
11913 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
11920 <h1> <span class="mw-headline" id="heading">heading</span></h1>
11925 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
11932 <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>
11947 Paragraphs inside divs (no extra line breaks)
11959 Paragraphs inside divs (extra line break on open)
11974 Paragraphs inside divs (extra line break on close)
11989 Paragraphs inside divs (extra line break on open and close)
12006 Nesting tags, paragraphs on lines which begin with <div>
12010 <div></div><strong>A
12019 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
12021 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
12025 <blockquote>Line one
12027 Line two</blockquote>
12029 <blockquote>Line one
12030 Line two</blockquote>
12035 Bug 6200: paragraphs inside blockquotes (extra line break on open)
12042 Line two</blockquote>
12047 Line two</blockquote>
12052 Bug 6200: paragraphs inside blockquotes (extra line break on close)
12056 <blockquote>Line one
12061 <blockquote>Line one
12069 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
12088 Paragraphs inside blockquotes/divs (no extra line breaks)
12090 <blockquote><div>Line one
12092 Line two</div></blockquote>
12094 <blockquote><div>Line one
12095 Line two</div></blockquote>
12100 Paragraphs inside blockquotes/divs (extra line break on open)
12105 Line two</div></blockquote>
12110 Line two</div></blockquote>
12115 Paragraphs inside blockquotes/divs (extra line break on close)
12117 <blockquote><div>Line one
12120 </div></blockquote>
12122 <blockquote><div>Line one
12125 </div></blockquote>
12130 Paragraphs inside blockquotes/divs (extra line break on open and close)
12136 </div></blockquote>
12142 </div></blockquote>
12147 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
12149 wgLinkHolderBatchSize=0
12155 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
12156 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
12157 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
12162 Free external link invading image caption
12164 [[Image:Foobar.jpg|thumb|http://x|hello]]
12166 <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>
12171 Bug 15196: localised external link numbers
12175 [http://en.wikipedia.org/]
12177 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
12182 Multibyte character in padleft
12184 {{padleft:-Hello|7|Æ}}
12191 Multibyte character in padright
12193 {{padright:Hello-|7|Æ}}
12200 formatdate parser function
12202 {{#formatdate:2009-03-24}}
12204 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
12209 formatdate parser function, with default format
12211 {{#formatdate:2009-03-24|mdy}}
12213 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
12218 Spacing of numbers in formatted dates
12220 {{#formatdate:January 15}}
12222 <p><span class="mw-formatted-date" title="01-15">January 15</span>
12227 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
12229 language=nl title=[[MediaWiki:Common.css]]
12231 {{#formatdate:2009-03-24|dmy}}
12233 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
12246 Edit comment with link
12250 I like the [[Main Page]] a lot
12252 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
12256 Edit comment with link and link text
12260 I like the [[Main Page|best pages]] a lot
12262 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
12266 Edit comment with link and link text with suffix
12270 I like the [[Main Page|best page]]s a lot
12272 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
12276 Edit comment with section link (non-local, eg in history list)
12278 comment title=[[Main Page]]
12280 /* External links */ removed bogus entries
12282 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
12286 Edit comment with section link and text before it (non-local, eg in history list)
12288 comment title=[[Main Page]]
12290 pre-comment text /* External links */ removed bogus entries
12292 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>
12296 Edit comment with section link (local, eg in diff view)
12298 comment local title=[[Main Page]]
12300 /* External links */ removed bogus entries
12302 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
12306 Edit comment with subpage link (bug 14080)
12310 title=[[Subpage test]]
12312 Poked at a [[/subpage]] here...
12314 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
12318 Edit comment with subpage link and link text (bug 14080)
12322 title=[[Subpage test]]
12324 Poked at a [[/subpage|neat little page]] here...
12326 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
12330 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
12333 title=[[Subpage test]]
12335 Poked at a [[/subpage]] here...
12337 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
12341 Edit comment with bare anchor link (local, as on diff)
12345 title=[[Main Page]]
12349 <a href="#section">#section</a>
12353 Edit comment with bare anchor link (non-local, as on history)
12356 title=[[Main Page]]
12360 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
12364 Anchor starting with underscore
12368 <p><a href="#_ref">One</a>
12373 Id starting with underscore
12375 <div id="_ref"></div>
12377 <div id="_ref"></div>
12382 Space normalisation on autocomment (bug 22784)
12385 title=[[Main Page]]
12387 /* __hello__world__ */
12389 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
12393 percent-encoding and + signs in comments (Bug 26410)
12397 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
12399 <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>
12403 Bad images - basic functionality
12412 Bad images - bug 16039: text after bad image disappears
12426 Verify that displaytitle works (bug #22501) no displaytitle
12430 wgAllowDisplayTitle=true
12431 wgRestrictDisplayTitle=false
12433 this is not the the title
12436 <p>this is not the the title
12441 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
12446 wgAllowDisplayTitle=true
12447 wgRestrictDisplayTitle=false
12449 this is not the the title
12450 {{DISPLAYTITLE:whatever}}
12453 <p>this is not the the title
12458 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
12463 wgAllowDisplayTitle=true
12464 wgRestrictDisplayTitle=true
12466 this is not the the title
12467 {{DISPLAYTITLE:whatever}}
12470 <p>this is not the the title
12475 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
12480 wgAllowDisplayTitle=true
12481 wgRestrictDisplayTitle=true
12483 this is not the the title
12484 {{DISPLAYTITLE:screen}}
12487 <p>this is not the the title
12492 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
12497 wgAllowDisplayTitle=false
12499 this is not the the title
12500 {{DISPLAYTITLE:screen}}
12503 <p>this is not the the title
12504 <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>
12509 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
12514 wgAllowDisplayTitle=false
12516 this is not the the title
12519 <p>this is not the the title
12524 preload: check <noinclude> and <includeonly>
12528 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
12534 preload: check <onlyinclude>
12538 Goodbye <onlyinclude>Hello world</onlyinclude>
12544 preload: can pass tags through if we want to
12548 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
12550 <includeonly>Hello world</includeonly>
12554 preload: check that it doesn't try to do tricks
12558 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
12560 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
12564 Play a bit with r67090 and bug 3158
12568 <div style="width:50% !important"> </div>
12569 <div style="width:50% !important"> </div>
12570 <div style="width:50% !important"> </div>
12571 <div style="border : solid;"> </div>
12573 <div style="width:50% !important"> </div>
12574 <div style="width:50% !important"> </div>
12575 <div style="width:50% !important"> </div>
12576 <div style="border : solid;"> </div>
12581 HTML5 data attributes
12583 <span data-foo="bar">Baz</span>
12584 <p data-abc-def_hij="">Quuz</p>
12586 <p><span data-foo="bar">Baz</span>
12588 <p data-abc-def_hij="">Quuz</p>
12593 percent-encoding and + signs in internal links (Bug 26410)
12595 [[User:+%]] [[Page+title%]]
12596 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
12597 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
12598 [[%33%45]] [[%33%45+]]
12600 <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>
12601 <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>
12602 <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>
12603 <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>
12608 Special characters in embedded file links (bug 27679)
12610 [[File:Contains & ampersand.jpg]]
12611 [[File:Does not exist.jpg|Title with & ampersand]]
12613 <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>
12614 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
12620 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
12622 Text's been normalized?
12624 <p>Text's been normalized?
12629 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
12631 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
12633 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
12638 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
12640 [http://www.example.org/ ideograms]
12642 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
12647 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
12649 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
12651 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
12675 Bug 31098 Template which includes system messages which includes the template
12679 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
12680 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
12685 Bug31490 Turkish: ucfirst 'blah'
12696 Bug31490 Turkish: ucfirst 'ix'
12707 Bug31490 Turkish: lcfirst 'BLAH'
12718 Bug31490 Turkish: ucfırst (with a dotless i)
12724 <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>
12729 Bug31490 ucfırst (with a dotless i) with English language
12735 <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>
12740 Bug 26375: TOC with italics
12742 title=[[Main Page]]
12745 == ''Lost'' episodes ==
12747 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12749 <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>
12752 <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>
12757 Bug 26375: TOC with bold
12759 title=[[Main Page]]
12762 == '''should be bold''' then normal text ==
12764 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12766 <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>
12769 <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>
12774 Bug 33845: Headings become cursive in TOC when they contain an image
12776 title=[[Main Page]]
12779 == Image [[Image:foobar.jpg]] ==
12781 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12783 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
12786 <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>
12791 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
12793 title=[[Main Page]]
12796 == <blockquote>Quote</blockquote> ==
12798 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12800 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
12803 <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>
12808 Unclosed tags in TOC
12810 title=[[Main Page]]
12814 <small>Hanc marginis exiguitas non caperet.</small>
12817 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12819 <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>
12822 <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>
12823 <p><small>Hanc marginis exiguitas non caperet.</small>
12829 Multiple tags in TOC
12832 == <i>Foo</i> <b>Bar</b> ==
12834 == <i>Foo</i> <blockquote>Bar</blockquote> ==
12836 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12838 <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>
12839 <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>
12842 <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>
12843 <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>
12848 Tags with parameters in TOC
12851 == <sup class="in-h2">Hello</sup> ==
12853 == <sup class="a > b">Evilbye</sup> ==
12855 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12857 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
12858 <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>
12861 <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>
12862 <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>
12867 span tags with directionality in TOC
12870 == <span dir="ltr">C++</span> ==
12872 == <span dir="rtl">זבנג!</span> ==
12874 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
12876 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
12878 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
12880 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
12882 <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>
12883 <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>
12884 <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>
12885 <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>
12886 <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>
12889 <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>
12890 <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>
12891 <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>
12892 <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>
12893 <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>
12900 == {{int:headline_sample}} ==
12904 Bug 32057: Title needed when expanding <h> nodes.
12906 title=[[Main Page]]
12910 <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>
12915 Strip marker in urlencode
12917 {{urlencode:x<nowiki/>y}}
12918 {{urlencode:x<nowiki/>y|wiki}}
12919 {{urlencode:x<nowiki/>y|path}}
12946 Strip marker in formatNum
12948 {{formatnum:1<nowiki/>2}}
12949 {{formatnum:1<nowiki/>2|R}}
12957 Check noCommafy in formatNum
12961 {{formatnum:123456.78}}
12962 {{formatnum:123456.78|NOSEP}}
12970 Strip marker in grammar
12974 {{grammar:elative|foo<nowiki/>bar}}
12981 Strip marker in padleft
12983 {{padleft:|2|x<nowiki/>y}}
12990 Strip marker in padright
12992 {{padright:|2|x<nowiki/>y}}
12999 Strip marker in anchorencode
13001 {{anchorencode:x<nowiki/>y}}
13008 nowiki inside link inside heading (bug 18295)
13010 ==[[foo|x<nowiki>y</nowiki>z]]==
13012 <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>
13017 new support for bdi element (bug 31817)
13019 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
13021 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
13026 Ignore pipe between table row attributes
13030 |- id=foo | style='color: red'
13038 <tr id="foo" style="color: red">
13045 Gallery override link with WikiLink (bug 34852)
13048 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
13051 <ul class="gallery">
13052 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13053 <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>
13054 <div class="gallerytext">
13064 Gallery override link with absolute external link (bug 34852)
13067 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
13070 <ul class="gallery">
13071 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13072 <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>
13073 <div class="gallerytext">
13083 Gallery override link with malicious javascript (bug 34852)
13086 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
13089 <ul class="gallery">
13090 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13091 <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>
13092 <div class="gallerytext">
13102 Gallery with invalid title as link (bug 43964)
13105 File:foobar.jpg|link=<
13108 <ul class="gallery">
13109 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13110 <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>
13111 <div class="gallerytext">
13119 Language parser function
13128 Padleft and padright as substr
13130 {{padleft:|3|abcde}}
13131 {{padright:|3|abcde}}
13139 Bug 34939 - Case insensitive link parsing ([HttP://])
13141 [HttP://MediaWiki.Org/]
13143 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
13148 Bug 34939 - Case insensitive link parsing ([HttP:// title])
13150 [HttP://MediaWiki.Org/ MediaWiki]
13152 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
13157 Bug 34939 - Case insensitive link parsing (HttP://)
13159 HttP://MediaWiki.Org/
13161 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
13166 ### Parsoids-specific tests
13167 ### Parsoid-PHP parser incompatibilities
13170 1. SOL-sensitive wikitext tokens as template-args
13184 #### The following section of tests are primarily to test
13185 #### wikitext escaping capabilities of Parsoid.
13186 #### A lot of the tests are disabled for the PHP parser either
13187 #### because of minor newline diffs or other reasons.
13188 #### As Parsoid serializer can handle newlines and other HTML
13189 #### more robustly, some of these tests might get reenabled
13190 #### for the PHP parser.
13192 #### --------------- Headings ---------------
13194 #### 1. Nested inside html <h1>=foo=</h1>
13195 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
13196 #### 3. Nested inside html with wikitext split by html tags
13197 #### 4. No escape needed
13198 #### 5. Empty headings <h1></h1>
13199 #### 6. Heading chars in SOL context
13200 #### ----------------------------------------
13202 Headings: 0. Unnested
13204 <nowiki>=foo=</nowiki>
13206 <nowiki>=foo</nowiki>''a''=
13209 </p><p>=foo<i>a</i>=
13214 Headings: 1. Nested inside html
13218 =<nowiki>=foo=</nowiki>=
13219 ==<nowiki>=foo=</nowiki>==
13220 ===<nowiki>=foo=</nowiki>===
13221 ====<nowiki>=foo=</nowiki>====
13222 =====<nowiki>=foo=</nowiki>=====
13223 ======<nowiki>=foo=</nowiki>======
13234 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
13239 <nowiki>*bar</nowiki>
13243 <nowiki>=bar=</nowiki>
13251 Headings: 3. Nested inside html with wikitext split by html tags
13255 =<nowiki>=</nowiki>'''bold'''foo==
13257 <h1>=<b>bold</b>foo=</h1>
13261 Headings: 4. No escaping needed (testing just h1 and h2)
13276 <h1><i>=</i>foo=</h1>
13281 Headings: 5. Empty headings
13285 =<nowiki></nowiki>=
13286 ==<nowiki></nowiki>==
13287 ===<nowiki></nowiki>===
13288 ====<nowiki></nowiki>====
13289 =====<nowiki></nowiki>=====
13290 ======<nowiki></nowiki>======
13301 Headings: 6. Heading chars in SOL context
13305 <!--cmt--><nowiki>=h1=</nowiki>
13311 #### --------------- Lists ---------------
13312 #### 0. Outside nests (*foo, etc.)
13313 #### 1. Nested inside html <ul><li>*foo</li></ul>
13314 #### 2. Inside definition lists
13315 #### 3. Only bullets at start should be escaped
13316 #### 4. No escapes needed
13317 #### 5. No unnecessary escapes
13318 #### 6. Escape bullets in SOL position
13319 #### 7. Escape bullets in a multi-line context
13320 #### ----------------------------------------
13323 Lists: 0. Outside nests
13325 <nowiki>*foo</nowiki>
13327 <nowiki>#foo</nowiki>
13335 Lists: 1. Nested inside html
13337 *<nowiki>*foo</nowiki>
13339 *<nowiki>#foo</nowiki>
13341 *<nowiki>:foo</nowiki>
13343 *<nowiki>;foo</nowiki>
13345 #<nowiki>*foo</nowiki>
13347 #<nowiki>#foo</nowiki>
13349 #<nowiki>:foo</nowiki>
13351 #<nowiki>;foo</nowiki>
13373 Lists: 2. Inside definition lists
13375 ;<nowiki>;foo</nowiki>
13377 ;<nowiki>:foo</nowiki>
13379 ;<nowiki>:foo</nowiki>
13382 :<nowiki>:foo</nowiki>
13397 Lists: 3. Only bullets at start of text should be escaped
13399 *<nowiki>*foo*bar</nowiki>
13401 *<nowiki>*foo</nowiki>''it''*bar
13405 <ul><li>*foo<i>it</i>*bar
13411 Lists: 4. No escapes needed
13423 <ul><li><i>foo</i>*bar
13425 <ul><li><a href="Foo" rel="mw:WikiLink">Foo</a>: bar
13430 Lists: 5. No unnecessary escapes
13432 * bar <span><nowiki>[[foo]]</nowiki></span>
13434 *=bar <span><nowiki>[[foo]]</nowiki></span>
13436 *[[bar <span><nowiki>[[foo]]</nowiki></span>
13438 *<nowiki>]]bar </nowiki><span><nowiki>[[foo]]</nowiki></span>
13440 *=bar <span>foo]]</span>=
13442 <ul><li> bar <span>[[foo]]</span>
13444 <ul><li>=bar <span>[[foo]]</span>
13446 <ul><li>[[bar <span>[[foo]]</span>
13448 <ul><li>]]bar <span>[[foo]]</span>
13450 <ul><li>=bar <span>foo]]</span>=
13456 Lists: 6. Escape bullets in SOL position
13460 <!--cmt--><nowiki>*foo</nowiki>
13467 Lists: 7. Escape bullets in a multi-line context
13477 #### --------------- HRs ---------------
13478 #### 1. Single line
13479 #### -----------------------------------
13482 HRs: 1. Single line
13487 <nowiki>----</nowiki>
13489 <nowiki>=foo=</nowiki>
13491 <nowiki>*foo</nowiki>
13498 #### --------------- Tables ---------------
13499 #### 1a. Simple example
13500 #### 1b. No escaping needed (!foo)
13501 #### 1c. No escaping needed (|foo)
13502 #### 1d. No escaping needed (|}foo)
13504 #### 2a. Nested in td (<td>foo|bar</td>)
13505 #### 2b. Nested in td (<td>foo||bar</td>)
13506 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
13508 #### 3a. Nested in th (<th>foo!bar</th>)
13509 #### 3b. Nested in th (<th>foo!!bar</th>)
13510 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
13514 #### 4c. No escaping needed
13515 #### --------------------------------------
13518 Tables: 1a. Simple example
13529 Tables: 1b. No escaping needed
13538 Tables: 1c. No escaping needed
13547 Tables: 1d. No escaping needed
13556 Tables: 2a. Nested in td
13561 |<nowiki>foo|bar</nowiki>
13571 Tables: 2b. Nested in td
13576 |<nowiki>foo||bar</nowiki>
13577 |''it''<nowiki>foo||bar</nowiki>
13582 </td><td><i>it</i>foo||bar
13588 Tables: 2c. Nested in td -- no escaping needed
13603 Tables: 3a. Nested in th
13618 Tables: 3b. Nested in th
13623 !<nowiki>foo!!bar</nowiki>
13633 Tables: 3c. Nested in th -- no escaping needed
13648 Tables: 4a. Escape -
13656 |<nowiki>-bar</nowiki>
13660 <tr><th>-bar</th></tr>
13661 <tr><td>-bar</td></tr>
13666 Tables: 4b. Escape +
13674 |<nowiki>+bar</nowiki>
13678 <tr><th>+bar</th></tr>
13679 <tr><td>+bar</td></tr>
13684 Tables: 4c. No escaping needed
13698 <tr><td>foo-bar</td><td>foo+bar</td></tr>
13699 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
13704 Tables: 4d. No escaping needed
13720 #### --------------- Links ---------------
13721 #### 1. Quote marks in link text
13722 #### 2. Wikilinks: Escapes needed
13723 #### 3. Wikilinks: No escapes needed
13724 #### 4. Extlinks: Escapes needed
13725 #### 5. Extlinks: No escapes needed
13726 #### --------------------------------------
13728 Links 1. Quote marks in link text
13732 [[Foo|<nowiki>Foo''boo''</nowiki>]]
13734 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
13738 Links 2. WikiLinks: Escapes needed
13742 [[Foo|<nowiki>[Foobar]</nowiki>]]
13743 [[Foo|<nowiki>Foobar]</nowiki>]]
13744 [[Foo|<nowiki>x [Foobar] x</nowiki>]]
13745 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
13746 [[Foo|<nowiki>[[Bar]]</nowiki>]]
13747 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
13748 [[Foo|<nowiki>|Bar</nowiki>]]
13750 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
13751 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
13752 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
13753 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
13754 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
13755 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
13756 <a href="Foo" rel="mw:WikiLink">|Bar</a>
13760 Links 3. WikiLinks: No escapes needed
13767 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
13768 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
13772 Links 4. ExtLinks: Escapes needed
13776 [http://google.com <nowiki>[google]</nowiki>]
13777 [http://google.com <nowiki>google]</nowiki>]
13779 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
13780 <a href="http://google.com" rel="mw:ExtLink">google]</a>
13784 Links 5. ExtLinks: No escapes needed
13788 [http://google.com [google]
13790 <a href="http://google.com" rel="mw:ExtLink">[google</a>
13793 #### --------------- Quotes ---------------
13794 #### 1. Quotes inside <b> and <i>
13795 #### 2. Link fragments separated by <i> and <b> tags
13796 #### 3. Link fragments inside <i> and <b>
13797 #### --------------------------------------
13799 1. Quotes inside <b> and <i>
13801 ''<nowiki>'foo'</nowiki>''
13802 ''<nowiki>''foo''</nowiki>''
13803 ''<nowiki>'''foo'''</nowiki>''
13804 '''<nowiki>'foo'</nowiki>'''
13805 '''<nowiki>''foo''</nowiki>'''
13806 '''<nowiki>'''foo'''</nowiki>'''
13807 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
13815 <b>foo'<i>bar'</i>baz</b>
13820 2. Link fragments separated by <i> and <b> tags
13822 [[''foo''<nowiki>hello]]</nowiki>
13824 [['''foo'''<nowiki>hello]]</nowiki>
13826 <p>[[<i>foo</i>hello]]
13827 </p><p>[[<b>foo</b>hello]]
13832 2. Link fragments inside <i> and <b>
13833 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
13834 this is one of the shortcomings of this format)
13836 ''[[foo''<nowiki>]]</nowiki>
13838 '''[[foo'''<nowiki>]]</nowiki>
13841 </p><p><b>[[foo</b>]]
13845 #### --------------- Paragraphs ---------------
13846 #### 1. No unnecessary escapes
13847 #### --------------------------------------
13850 1. No unnecessary escapes
13852 bar <span><nowiki>[[foo]]</nowiki></span>
13854 =bar <span><nowiki>[[foo]]</nowiki></span>
13856 [[bar <span><nowiki>[[foo]]</nowiki></span>
13858 <nowiki>]]bar </nowiki><span><nowiki>[[foo]]</nowiki></span>
13860 <nowiki>=bar </nowiki><span>foo]]</span>=
13862 <p>bar <span>[[foo]]</span>
13863 </p><p>=bar <span>[[foo]]</span>
13864 </p><p>[[bar <span>[[foo]]</span>
13865 </p><p>]]bar <span>[[foo]]</span>
13866 </p><p>=bar <span>foo]]</span>=
13870 #### --------------- PRE ------------------
13871 #### 1. Leading space in SOL context should be escaped
13872 #### --------------------------------------
13874 1. Leading space in SOL context should be escaped
13878 <nowiki> foo</nowiki>
13879 <!--cmt--><nowiki> foo</nowiki>
13886 #### --------------- HTML tags ---------------
13889 #### 3. multi-line html tag
13890 #### --------------------------------------
13896 <a href="http://google.com">google</a>
13898 <a href="http://google.com">google</a>
13904 <nowiki><div>foo</div>
13905 <div style="color:red">foo</div></nowiki>
13907 <p><div>foo</div>
13908 <div style="color:red">foo</div>
13913 3. multi-line html tag
13925 #### --------------- Others ---------------
13929 <nowiki>foo</nowiki>
13931 <p><nowiki>foo</nowiki>
13936 Tag-like HTML structures are passed through as text
13958 </p><p>1<d e>f
13963 # This fails in the PHP parser (see bug 40670,
13964 # https://bugzilla.wikimedia.org/show_bug.cgi?id=40670), so disabled for it.
13966 Tag names followed by punctuation should not be recognized as tags
13972 <p><s.ome> text
13977 HTML tag with necessary entities in attributes
13979 <span title="&amp;">foo</span>
13981 <p><span title="&amp;">foo</span>
13986 HTML tag with 'unnecessary' entity encoding in attributes
13988 <span title="&">foo</span>
13990 <p><span title="&">foo</span>
13995 HTML tag with broken attribute value quoting
13997 <span title="Hello world>Foo</span>
13999 <p><span>Foo</span>
14004 Parsoid-only: HTML tag with broken attribute value quoting
14008 <span title="Hello world>Foo</span>
14010 <p><span title="Hello world">Foo</span>
14015 Table with broken attribute value quoting
14018 | title="Hello world|Foo
14029 Table with broken attribute value quoting on consecutive lines
14032 | title="Hello world|Foo
14033 | style="color:red|Bar
14046 Parsoid-only: Table with broken attribute value quoting on consecutive lines
14051 | title="Hello world|Foo
14052 | style="color:red|Bar
14057 <td title="Hello world">Foo
14058 </td><td style="color: red">Bar
14064 Accept empty td cell attribute
14067 | align="center" | foo || |
14072 <td align="center"> foo </td>
14079 Non-empty attributes in th-cells
14082 ! Foo !! style="color: red" | Bar
14088 <th style="color: red"> Bar
14094 Accept empty attributes in th-cells
14109 Empty table rows go away
14134 Try for 100% code coverage