Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -332,9 +332,9 @@ |
333 | 333 | !! test |
334 | 334 | Definition list with bracketed URL link |
335 | 335 | !! input |
336 | | -;[http://www.google.com/ Google]:Number one search engine |
| 336 | +;[http://www.example.com/ Example]:Something about it |
337 | 337 | !! result |
338 | | -<dl><dt><a href="http://www.google.com/" class='external text' title="http://www.google.com/" rel="nofollow">Google</a></dt><dd>Number one search engine |
| 338 | +<dl><dt><a href="http://www.example.com/" class='external text' title="http://www.example.com/" rel="nofollow">Example</a></dt><dd>Something about it |
339 | 339 | </dd></dl> |
340 | 340 | |
341 | 341 | !! end |
— | — | @@ -669,6 +669,9 @@ |
670 | 670 | |
671 | 671 | !! test |
672 | 672 | External links: invalid character |
| 673 | +Fixme: the missing char seems to have gone missing |
| 674 | +'' options |
| 675 | +disabled |
673 | 676 | !! input |
674 | 677 | [http://www.example.com test] |
675 | 678 | !! result |
— | — | @@ -686,6 +689,15 @@ |
687 | 690 | !! end |
688 | 691 | |
689 | 692 | !! test |
| 693 | +External links: wiki links within external link (Bug 3695) |
| 694 | +!! input |
| 695 | +[http://example.com [[wikilink]] embedded in ext link] |
| 696 | +!! result |
| 697 | +<p><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"></a><a href="https://www.mediawiki.org/index.php?title=Wikilink&action=edit" class="new" title="Wikilink">wikilink</a><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"> embedded in ext link</a> |
| 698 | +</p> |
| 699 | +!! end |
| 700 | + |
| 701 | +!! test |
690 | 702 | BUG 787: Links with one slash after the url protocol are invalid |
691 | 703 | !! input |
692 | 704 | http:/example.com |
— | — | @@ -698,11 +710,19 @@ |
699 | 711 | !! end |
700 | 712 | |
701 | 713 | !! test |
702 | | -Bug 2702: Mismatched <i> and <a> tags are invalid |
| 714 | +Bug 2702: Mismatched <i>, <b> and <a> tags are invalid |
703 | 715 | !! input |
704 | 716 | ''[http://example.com text''] |
| 717 | +[http://example.com '''text]''' |
| 718 | +''Something [http://example.com in italic''] |
| 719 | +''Something [http://example.com mixed''''', even bold]''' |
| 720 | +'''''Now [http://example.com both'''''] |
705 | 721 | !! result |
706 | | -<p><i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow">text</a></i> |
| 722 | +<p><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>text</i></a> |
| 723 | +<a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><b>text</b></a> |
| 724 | +<i>Something </i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>in italic</i></a> |
| 725 | +<i>Something </i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i>mixed</i><b>, even bold</b></a> |
| 726 | +<i><b>Now </b></i><a href="http://example.com" class='external text' title="http://example.com" rel="nofollow"><i><b>both</b></i></a> |
707 | 727 | </p> |
708 | 728 | !! end |
709 | 729 | |
— | — | @@ -833,7 +853,7 @@ |
834 | 854 | <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i> |
835 | 855 | </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b> |
836 | 856 | </p><p><b>Bold text..</b> |
837 | | -</p><p>..spanning two paragraphs (should not work).<b></b> |
| 857 | +</p><p>..spanning two paragraphs (should not work). |
838 | 858 | </p><p><b>Bold tag left open</b> |
839 | 859 | </p><p><i>Italic tag left open</i> |
840 | 860 | </p><p>Normal text. |
— | — | @@ -869,10 +889,8 @@ |
870 | 890 | !! result |
871 | 891 | <table> |
872 | 892 | <caption> caption |
873 | | -</caption> |
874 | | -<tr> |
875 | | -<td> |
876 | | -</td></tr></table> |
| 893 | +</caption><tr><td></td></tr></table> |
| 894 | + |
877 | 895 | !! end |
878 | 896 | |
879 | 897 | !! test |
— | — | @@ -2421,11 +2439,13 @@ |
2422 | 2440 | !! end |
2423 | 2441 | |
2424 | 2442 | !! test |
2425 | | -Link to image page |
| 2443 | +Link to image page- image page normally doesn't exists, hence edit link |
| 2444 | +TODO: Add test with existing image page |
| 2445 | +#<p><a href="https://www.mediawiki.org/wiki/Image:Test" title="Image:Test">Image:test</a> |
2426 | 2446 | !! input |
2427 | 2447 | [[:Image:test]] |
2428 | 2448 | !! result |
2429 | | -<p><a href="https://www.mediawiki.org/wiki/Image:Test" title="Image:Test">Image:test</a> |
| 2449 | +<p><a href="https://www.mediawiki.org/index.php?title=Image:Test&action=edit" class="new" title="Image:Test">Image:test</a> |
2430 | 2450 | </p> |
2431 | 2451 | !! end |
2432 | 2452 | |
— | — | @@ -2452,17 +2472,49 @@ |
2453 | 2473 | !! input |
2454 | 2474 | [[Image:foobar.jpg|thumb|ISBN 12354]] |
2455 | 2475 | !! result |
2456 | | -<div class="thumb tright"><div style="width:182px;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="ISBN 12354"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="ISBN 12354" longdesc="/wiki/Image:Foobar.jpg" height="180" width="180"></a> <div class="thumbcaption"><div class="magnify" style="float:right;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge"></a></div><a href="index.php?title=Special:Booksources&isbn=12354" class="internal">ISBN 12354</a></div></div></div> |
| 2476 | +<div class="thumb tright"><div style="width:182px;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="ISBN 12354"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="ISBN 12354" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div><a href="https://www.mediawiki.org/index.php?title=Special:Booksources&isbn=12354" class="internal">ISBN 12354</a></div></div></div> |
| 2477 | + |
2457 | 2478 | !! end |
2458 | 2479 | |
2459 | 2480 | !! test |
2460 | | -BUG 1887: A <math> with a thumbnail |
| 2481 | +BUG 1887: A RFC with a thumbnail |
2461 | 2482 | !! input |
| 2483 | +[[Image:foobar.jpg|thumb|This is RFC 12354]] |
| 2484 | +!! result |
| 2485 | +<div class="thumb tright"><div style="width:182px;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="This is RFC 12354"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="This is RFC 12354" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div>This is <a href='http://www.ietf.org/rfc/rfc12354.txt' class='external' title="http://www.ietf.org/rfc/rfc12354.txt">RFC 12354</a></div></div></div> |
| 2486 | + |
| 2487 | +!! end |
| 2488 | + |
| 2489 | +!! test |
| 2490 | +BUG 1887: A mailto link with a thumbnail |
| 2491 | +!! input |
| 2492 | +[[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]] |
| 2493 | +!! result |
| 2494 | +<div class="thumb tright"><div style="width:182px;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Please mailto:nobody@example.com"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="Please mailto:nobody@example.com" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div>Please <a href="mailto:nobody@example.com" class='external free' title="mailto:nobody@example.com" rel="nofollow">mailto:nobody@example.com</a></div></div></div> |
| 2495 | + |
| 2496 | +!! end |
| 2497 | + |
| 2498 | +!! test |
| 2499 | +BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default, |
| 2500 | +so math is not stripped and turns up as escaped <math> tags. |
| 2501 | +!! input |
2462 | 2502 | [[Image:foobar.jpg|thumb|<math>2+2</math>]] |
2463 | 2503 | !! result |
2464 | | -<div class="thumb tright"><div style="width:182px;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="2+2"><img src="http://example.com/images/3/3a/Foobar.jpg" alt="2+2" longdesc="/wiki/Image:Foobar.jpg" height="180" width="180"></a> <div class="thumbcaption"><div class="magnify" style="float:right;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge"></a></div><math>2+2<math></div></div></div> |
| 2504 | +<div class="thumb tright"><div style="width:182px;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="<math>2+2</math>"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="<math>2+2</math>" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div><math>2+2</math></div></div></div> |
| 2505 | + |
2465 | 2506 | !! end |
2466 | 2507 | |
| 2508 | +!! test |
| 2509 | +BUG 1887, part 2: A <math> with a thumbnail- math enabled |
| 2510 | +!! options |
| 2511 | +math |
| 2512 | +!! input |
| 2513 | +[[Image:foobar.jpg|thumb|<math>2+2</math>]] |
| 2514 | +!! result |
| 2515 | +<div class="thumb tright"><div style="width:182px;"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="2 + 2"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="2 + 2" width="180" height="20" longdesc="/wiki/Image:Foobar.jpg" /></a> <div class="thumbcaption" ><div class="magnify" style="float:right"><a href="https://www.mediawiki.org/wiki/Image:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="Enlarge" /></a></div><span class="texhtml">2 + 2</span></div></div></div> |
| 2516 | + |
| 2517 | +!! end |
| 2518 | + |
2467 | 2519 | # Pending resolution to bug 368 |
2468 | 2520 | !! test |
2469 | 2521 | BUG 648: Frameless image caption with a link |
— | — | @@ -2631,7 +2683,7 @@ |
2632 | 2684 | !! options |
2633 | 2685 | cat |
2634 | 2686 | !! input |
2635 | | -[[Category: MediaWiki User's Guide]] |
| 2687 | +[[Category:MediaWiki User's Guide]] |
2636 | 2688 | !! result |
2637 | 2689 | <a href="https://www.mediawiki.org/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a> |
2638 | 2690 | !! end |
— | — | @@ -2667,13 +2719,13 @@ |
2668 | 2720 | ===Smaller headline=== |
2669 | 2721 | Blah blah |
2670 | 2722 | !! result |
2671 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2> |
| 2723 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2> |
2672 | 2724 | <p>Some text |
2673 | 2725 | </p> |
2674 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Parser test script">edit</a>]</div><a name="Headline_2"></a><h2>Headline 2</h2> |
| 2726 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</div><a name="Headline_2"></a><h2>Headline 2</h2> |
2675 | 2727 | <p>More |
2676 | 2728 | </p> |
2677 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=3" title="Parser test script">edit</a>]</div><a name="Smaller_headline"></a><h3>Smaller headline</h3> |
| 2729 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</div><a name="Smaller_headline"></a><h3>Smaller headline</h3> |
2678 | 2730 | <p>Blah blah |
2679 | 2731 | </p> |
2680 | 2732 | !! end |
— | — | @@ -2713,16 +2765,15 @@ |
2714 | 2766 | </ul> |
2715 | 2767 | </li> |
2716 | 2768 | </ul> |
2717 | | -</td></tr></table> |
2718 | | -<script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
2719 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2> |
2720 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Parser test script">edit</a>]</div><a name="Subheadline_1"></a><h3> Subheadline 1 </h3> |
2721 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=3" title="Parser test script">edit</a>]</div><a name="Skipping_a_level"></a><h5> Skipping a level </h5> |
2722 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=4" title="Parser test script">edit</a>]</div><a name="Skipping_a_level_2"></a><h6> Skipping a level </h6> |
2723 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=5" title="Parser test script">edit</a>]</div><a name="Headline_2"></a><h2> Headline 2 </h2> |
| 2769 | +</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 2770 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2> |
| 2771 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</div><a name="Subheadline_1"></a><h3> Subheadline 1 </h3> |
| 2772 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</div><a name="Skipping_a_level"></a><h5> Skipping a level </h5> |
| 2773 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</div><a name="Skipping_a_level_2"></a><h6> Skipping a level </h6> |
| 2774 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</div><a name="Headline_2"></a><h2> Headline 2 </h2> |
2724 | 2775 | <p>Some text |
2725 | 2776 | </p> |
2726 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=6" title="Parser test script">edit</a>]</div><a name="Another_headline"></a><h3>Another headline</h3> |
| 2777 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=6" title="Edit section: Another headline">edit</a>]</div><a name="Another_headline"></a><h3>Another headline</h3> |
2727 | 2778 | |
2728 | 2779 | !! end |
2729 | 2780 | |
— | — | @@ -2769,19 +2820,17 @@ |
2770 | 2821 | </ul> |
2771 | 2822 | </li> |
2772 | 2823 | </ul> |
2773 | | -</td></tr></table> |
2774 | | -<p><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
2775 | | -</p> |
2776 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Parser test">edit</a>]</div><a name="Level_1_Heading"></a><h1> Level 1 Heading</h1> |
2777 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Parser test">edit</a>]</div><a name="Level_2_Heading"></a><h2> Level 2 Heading</h2> |
2778 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=3" title="Parser test">edit</a>]</div><a name="Level_3_Heading"></a><h3> Level 3 Heading</h3> |
2779 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=4" title="Parser test">edit</a>]</div><a name="Level_4_Heading"></a><h4> Level 4 Heading</h4> |
2780 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=5" title="Parser test">edit</a>]</div><a name="Level_5_Heading"></a><h5> Level 5 Heading</h5> |
2781 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=6" title="Parser test">edit</a>]</div><a name="Level_6_Heading"></a><h6> Level 6 Heading</h6> |
2782 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=7" title="Parser test">edit</a>]</div><a name=".3D_Level_7_Heading.3D"></a><h6>= Level 7 Heading=</h6> |
2783 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=8" title="Parser test">edit</a>]</div><a name=".3D.3D_Level_8_Heading.3D.3D"></a><h6>== Level 8 Heading==</h6> |
2784 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=9" title="Parser test">edit</a>]</div><a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><h6>=== Level 9 Heading===</h6> |
2785 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=10" title="Parser test">edit</a>]</div><a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><h6>==== Level 10 Heading====</h6> |
| 2824 | +</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 2825 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</div><a name="Level_1_Heading"></a><h1> Level 1 Heading</h1> |
| 2826 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</div><a name="Level_2_Heading"></a><h2> Level 2 Heading</h2> |
| 2827 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</div><a name="Level_3_Heading"></a><h3> Level 3 Heading</h3> |
| 2828 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</div><a name="Level_4_Heading"></a><h4> Level 4 Heading</h4> |
| 2829 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</div><a name="Level_5_Heading"></a><h5> Level 5 Heading</h5> |
| 2830 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</div><a name="Level_6_Heading"></a><h6> Level 6 Heading</h6> |
| 2831 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</div><a name=".3D_Level_7_Heading.3D"></a><h6>= Level 7 Heading=</h6> |
| 2832 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</div><a name=".3D.3D_Level_8_Heading.3D.3D"></a><h6>== Level 8 Heading==</h6> |
| 2833 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</div><a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><h6>=== Level 9 Heading===</h6> |
| 2834 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</div><a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><h6>==== Level 10 Heading====</h6> |
2786 | 2835 | |
2787 | 2836 | !! end |
2788 | 2837 | |
— | — | @@ -2793,8 +2842,8 @@ |
2794 | 2843 | == Foo bar == |
2795 | 2844 | == Foo bar == |
2796 | 2845 | !! result |
2797 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Foo_bar"></a><h2> Foo bar </h2> |
2798 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Parser test script">edit</a>]</div><a name="Foo_bar_2"></a><h2> Foo bar </h2> |
| 2846 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</div><a name="Foo_bar"></a><h2> Foo bar </h2> |
| 2847 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</div><a name="Foo_bar_2"></a><h2> Foo bar </h2> |
2799 | 2848 | |
2800 | 2849 | !! end |
2801 | 2850 | |
— | — | @@ -2815,10 +2864,10 @@ |
2816 | 2865 | {{sections}} |
2817 | 2866 | ==Section 4== |
2818 | 2867 | !! result |
2819 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Section_0"></a><h2>Section 0</h2> |
| 2868 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section 0">edit</a>]</div><a name="Section_0"></a><h2>Section 0</h2> |
2820 | 2869 | <div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</div><a name="Section_1"></a><h3>Section 1</h3> |
2821 | 2870 | <div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</div><a name="Section_2"></a><h2>Section 2</h2> |
2822 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Parser test script">edit</a>]</div><a name="Section_4"></a><h2>Section 4</h2> |
| 2871 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Section 4">edit</a>]</div><a name="Section_4"></a><h2>Section 4</h2> |
2823 | 2872 | |
2824 | 2873 | !! end |
2825 | 2874 | |
— | — | @@ -2841,7 +2890,7 @@ |
2842 | 2891 | !! input |
2843 | 2892 | ==Section with a [[Main Page|link]] in it== |
2844 | 2893 | !! result |
2845 | | -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Parser test script">edit</a>]</div><a name="Section_with_a_link_in_it"></a><h2>Section with a <a href="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">link</a> in it</h2> |
| 2894 | +<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</div><a name="Section_with_a_link_in_it"></a><h2>Section with a <a href="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">link</a> in it</h2> |
2846 | 2895 | |
2847 | 2896 | !! end |
2848 | 2897 | |
— | — | @@ -3024,11 +3073,12 @@ |
3025 | 3074 | # FIXME: this is still bad HTML tag nesting |
3026 | 3075 | !! test |
3027 | 3076 | Media link with nasty text |
| 3077 | +fixme: doBlockLevels won't wrap this in a paragraph because it contains a div |
3028 | 3078 | !! input |
3029 | 3079 | [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]] |
3030 | 3080 | !! result |
3031 | | -<p><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> |
3032 | | -</p> |
| 3081 | +<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> |
| 3082 | + |
3033 | 3083 | !! end |
3034 | 3084 | |
3035 | 3085 | !! test |
— | — | @@ -3141,7 +3191,16 @@ |
3142 | 3192 | </p> |
3143 | 3193 | !! end |
3144 | 3194 | |
| 3195 | +!! test |
| 3196 | +Bug 2095: link with pipe and three closing brackets, version 2 |
| 3197 | +!! input |
| 3198 | +[[Main Page|[http://example.com/]]] |
| 3199 | +!! result |
| 3200 | +<p><a href="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">[http://example.com/]</a> |
| 3201 | +</p> |
| 3202 | +!! end |
3145 | 3203 | |
| 3204 | + |
3146 | 3205 | ### |
3147 | 3206 | ### Safety |
3148 | 3207 | ### |
— | — | @@ -3644,7 +3703,8 @@ |
3645 | 3704 | !! input |
3646 | 3705 | <br id=9 /> |
3647 | 3706 | !! result |
3648 | | -Something, but defenetly not <br id="9" />... |
| 3707 | +<p><br id="iHaveToStartWithALetter-9" /> |
| 3708 | +</p> |
3649 | 3709 | !! end |
3650 | 3710 | |
3651 | 3711 | TODO: |