r13307 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13306‎ | r13307 | r13308 >
Date:17:10, 24 March 2006
Author:gabrielwicke
Status:old
Tags:
Comment:
Collected updates:

* Always use example.com as domain in tests
* disabled invalid-char test, the invalid char seems to have gone missing
* Add test for External links: wiki links within external link (Bug 3695)
* extended test for Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
* there should be no more empty <i> and <b> tags in the output
* Link to image page- image page normally doesn't exists, hence edit link
* update all section edit texts to use new link title format
* update fixed tests for invalid html in title/alt attributes (Bug 1887), add
extra tests for this
* Fix typo in Cat link
* add test for fixed Bug 2095: link with pipe and three closing brackets
* update test for html id validation
Modified paths:
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -332,9 +332,9 @@
333333 !! test
334334 Definition list with bracketed URL link
335335 !! input
336 -;[http://www.google.com/ Google]:Number one search engine
 336+;[http://www.example.com/ Example]:Something about it
337337 !! 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
339339 </dd></dl>
340340
341341 !! end
@@ -669,6 +669,9 @@
670670
671671 !! test
672672 External links: invalid character
 673+Fixme: the missing char seems to have gone missing
 674+'' options
 675+disabled
673676 !! input
674677 [http://www.example.com test]
675678 !! result
@@ -686,6 +689,15 @@
687690 !! end
688691
689692 !! 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&amp;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
690702 BUG 787: Links with one slash after the url protocol are invalid
691703 !! input
692704 http:/example.com
@@ -698,11 +710,19 @@
699711 !! end
700712
701713 !! test
702 -Bug 2702: Mismatched <i> and <a> tags are invalid
 714+Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
703715 !! input
704716 ''[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''''']
705721 !! 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>
707727 </p>
708728 !! end
709729
@@ -833,7 +853,7 @@
834854 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
835855 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
836856 </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).
838858 </p><p><b>Bold tag left open</b>
839859 </p><p><i>Italic tag left open</i>
840860 </p><p>Normal text.
@@ -869,10 +889,8 @@
870890 !! result
871891 <table>
872892 <caption> caption
873 -</caption>
874 -<tr>
875 -<td>
876 -</td></tr></table>
 893+</caption><tr><td></td></tr></table>
 894+
877895 !! end
878896
879897 !! test
@@ -2421,11 +2439,13 @@
24222440 !! end
24232441
24242442 !! 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>
24262446 !! input
24272447 [[:Image:test]]
24282448 !! 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&amp;action=edit" class="new" title="Image:Test">Image:test</a>
24302450 </p>
24312451 !! end
24322452
@@ -2452,17 +2472,49 @@
24532473 !! input
24542474 [[Image:foobar.jpg|thumb|ISBN 12354]]
24552475 !! 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&amp;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&amp;isbn=12354" class="internal">ISBN 12354</a></div></div></div>
 2477+
24572478 !! end
24582479
24592480 !! test
2460 -BUG 1887: A <math> with a thumbnail
 2481+BUG 1887: A RFC with a thumbnail
24612482 !! 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 &lt;math&gt; tags.
 2501+!! input
24622502 [[Image:foobar.jpg|thumb|<math>2+2</math>]]
24632503 !! 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>&lt;math&gt;2+2&lt;math&gt;</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="&lt;math&gt;2+2&lt;/math&gt;"><img src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" alt="&lt;math&gt;2+2&lt;/math&gt;" 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>&lt;math&gt;2+2&lt;/math&gt;</div></div></div>
 2505+
24652506 !! end
24662507
 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+
24672519 # Pending resolution to bug 368
24682520 !! test
24692521 BUG 648: Frameless image caption with a link
@@ -2631,7 +2683,7 @@
26322684 !! options
26332685 cat
26342686 !! input
2635 -[[Category: MediaWiki User's Guide]]
 2687+[[Category:MediaWiki User's Guide]]
26362688 !! result
26372689 <a href="https://www.mediawiki.org/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
26382690 !! end
@@ -2667,13 +2719,13 @@
26682720 ===Smaller headline===
26692721 Blah blah
26702722 !! result
2671 -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&amp;action=edit&amp;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&amp;action=edit&amp;section=1" title="Edit section: Headline 1">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2>
26722724 <p>Some text
26732725 </p>
2674 -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&amp;action=edit&amp;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&amp;action=edit&amp;section=2" title="Edit section: Headline 2">edit</a>]</div><a name="Headline_2"></a><h2>Headline 2</h2>
26752727 <p>More
26762728 </p>
2677 -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&amp;action=edit&amp;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&amp;action=edit&amp;section=3" title="Edit section: Smaller headline">edit</a>]</div><a name="Smaller_headline"></a><h3>Smaller headline</h3>
26782730 <p>Blah blah
26792731 </p>
26802732 !! end
@@ -2713,16 +2765,15 @@
27142766 </ul>
27152767 </li>
27162768 </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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;section=5" title="Edit section: Headline 2">edit</a>]</div><a name="Headline_2"></a><h2> Headline 2 </h2>
27242775 <p>Some text
27252776 </p>
2726 -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&amp;action=edit&amp;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&amp;action=edit&amp;section=6" title="Edit section: Another headline">edit</a>]</div><a name="Another_headline"></a><h3>Another headline</h3>
27272778
27282779 !! end
27292780
@@ -2769,19 +2820,17 @@
27702821 </ul>
27712822 </li>
27722823 </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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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>
27862835
27872836 !! end
27882837
@@ -2793,8 +2842,8 @@
27942843 == Foo bar ==
27952844 == Foo bar ==
27962845 !! result
2797 -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;section=2" title="Edit section: Foo bar">edit</a>]</div><a name="Foo_bar_2"></a><h2> Foo bar </h2>
27992848
28002849 !! end
28012850
@@ -2815,10 +2864,10 @@
28162865 {{sections}}
28172866 ==Section 4==
28182867 !! result
2819 -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&amp;action=edit&amp;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&amp;action=edit&amp;section=1" title="Edit section: Section 0">edit</a>]</div><a name="Section_0"></a><h2>Section 0</h2>
28202869 <div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Template:Sections&amp;action=edit&amp;section=1" title="Template:Sections">edit</a>]</div><a name="Section_1"></a><h3>Section 1</h3>
28212870 <div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Template:Sections&amp;action=edit&amp;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&amp;action=edit&amp;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&amp;action=edit&amp;section=2" title="Edit section: Section 4">edit</a>]</div><a name="Section_4"></a><h2>Section 4</h2>
28232872
28242873 !! end
28252874
@@ -2841,7 +2890,7 @@
28422891 !! input
28432892 ==Section with a [[Main Page|link]] in it==
28442893 !! result
2845 -<div class="editsection" style="float:right;margin-left:5px;">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&amp;action=edit&amp;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&amp;action=edit&amp;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>
28462895
28472896 !! end
28482897
@@ -3024,11 +3073,12 @@
30253074 # FIXME: this is still bad HTML tag nesting
30263075 !! test
30273076 Media link with nasty text
 3077+fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
30283078 !! input
30293079 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
30303080 !! 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&lt;div style="display:none"&gt;" onmouseover="alert(document.cookie)" onfoo="&lt;/div&gt;</a>
 3082+
30333083 !! end
30343084
30353085 !! test
@@ -3141,7 +3191,16 @@
31423192 </p>
31433193 !! end
31443194
 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
31453203
 3204+
31463205 ###
31473206 ### Safety
31483207 ###
@@ -3644,7 +3703,8 @@
36453704 !! input
36463705 <br id=9 />
36473706 !! result
3648 -Something, but defenetly not <br id="9" />...
 3707+<p><br id="iHaveToStartWithALetter-9" />
 3708+</p>
36493709 !! end
36503710
36513711 TODO:

Follow-up revisions

RevisionCommit summaryAuthorDate
r17481Fix parserTests regression introduced in r17479....nickj06:03, 8 November 2006
r35828Revert r35819 -- broke thumbnailing....brion23:46, 3 June 2008

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r9091Add parser test for bug 2095; working on it...vibber08:43, 18 May 2005
r9095Fix for the main (no pipe) case of bug 2095, triple closing backets on link...vibber09:21, 18 May 2005
r9548* (bug 1887) Applying attachment 461avar13:48, 21 June 2005
r9911* (bug 2702) parsertestavar23:30, 4 July 2005
r13301Fix bug 2095: three closing bracketsgabrielwicke16:40, 24 March 2006

Status & tagging log