Index: trunk/phase3/tests/phpunit/includes/TitleTest.php |
— | — | @@ -14,4 +14,109 @@ |
15 | 15 | } |
16 | 16 | } |
17 | 17 | } |
| 18 | + |
| 19 | + /** |
| 20 | + * Helper to test getLocalURL |
| 21 | + * |
| 22 | + * @cover Title:getLocalURL |
| 23 | + */ |
| 24 | + function assertGetLocalURL( $expected, $dbkey, $query, $articlepath, $actionpaths = array(), $variant = false ) |
| 25 | + { |
| 26 | + global $wgArticlePath; |
| 27 | + $wgArticlePath = $articlepath; |
| 28 | + global $wgActionPaths; |
| 29 | + $wgActionPaths = $actionpaths; |
| 30 | + |
| 31 | + $t = Title::newFromDBKey( $dbkey ); |
| 32 | + |
| 33 | + $this->assertEquals( $expected, $t->getLocalURL( $query, $variant ) ); |
| 34 | + } |
| 35 | + |
| 36 | + /** |
| 37 | + * @dataProvider provider1 |
| 38 | + * @cover Title:getLocalURL |
| 39 | + */ |
| 40 | + function testGetLocalUrl( $expected, $dbkey, $query ) |
| 41 | + { |
| 42 | + $this->assertGetLocalURL( $expected, $dbkey, $query, '/wiki/$1' ); |
| 43 | + } |
| 44 | + |
| 45 | + function provider1() |
| 46 | + { |
| 47 | + return array( |
| 48 | + array( '/wiki/Recentchanges', 'Recentchanges', '' ), |
| 49 | + array( '/wiki/Recentchanges?foo=2', 'Recentchanges', 'foo=2' ), |
| 50 | + array( '/wiki/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&bar=1' ), |
| 51 | + ); |
| 52 | + } |
| 53 | + |
| 54 | + |
| 55 | + /** |
| 56 | + * @dataProvider provider2 |
| 57 | + * @cover Title:getLocalURL |
| 58 | + */ |
| 59 | + function testGetLocalUrlWithArticlePath( $expected, $dbkey, $query, $actions ) |
| 60 | + { |
| 61 | + $this->assertGetLocalURL( $expected, $dbkey, $query, '/wiki/view/$1', $actions ); |
| 62 | + } |
| 63 | + |
| 64 | + function provider2() |
| 65 | + { |
| 66 | + return array( |
| 67 | + array( '/wiki/view/Recentchanges', 'Recentchanges', '', array( ) ), |
| 68 | + array( '/wiki/view/Recentchanges', 'Recentchanges', '', array( 'view' => 'OH MEN' ) ), |
| 69 | + array( '/wiki/view/Recentchanges', 'Recentchanges', '', array( 'view' => '/wiki/view/$1' ) ), |
| 70 | + array( '/wiki/view/Recentchanges?foo=2', 'Recentchanges', 'foo=2', array( 'view' => '/wiki/view/$1' ) ), |
| 71 | + array( '/wiki/view/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&bar=1', array() ), |
| 72 | + ); |
| 73 | + } |
| 74 | + |
| 75 | + |
| 76 | + /** |
| 77 | + * @dataProvider provider3 |
| 78 | + * @cover Title:getLocalURL |
| 79 | + */ |
| 80 | + function testGetLocalUrlWithActionPaths( $expected, $dbkey, $query ) |
| 81 | + { |
| 82 | + $actions = array( 'edit' => '/wiki/edit/$1' ); |
| 83 | + $this->assertGetLocalURL( $expected, $dbkey, $query, '/wiki/view/$1', $actions ); |
| 84 | + } |
| 85 | + |
| 86 | + function provider3() { |
| 87 | + return array( |
| 88 | + array( '/wiki/view/Recentchanges', 'Recentchanges', ''), |
| 89 | + array( '/wiki/edit/Recentchanges', 'Recentchanges', 'action=edit' ), |
| 90 | + array( '/wiki/edit/Recentchanges?foo=2', 'Recentchanges', 'action=edit&foo=2' ), |
| 91 | + array( '/wiki/edit/Recentchanges?foo=2', 'Recentchanges', 'foo=2&action=edit' ), |
| 92 | + array( '/wiki/view/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&bar=1' ), |
| 93 | + array( '/wiki/edit/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&bar=1&action=edit' ), |
| 94 | + array( '/wiki/edit/Recentchanges?foo=A&bar=1', 'Recentchanges', 'foo=A&action=edit&bar=1' ), |
| 95 | + array( '/wiki/edit/Recentchanges?foo=A&bar=1', 'Recentchanges', 'action=edit&foo=A&bar=1' ), |
| 96 | + |
| 97 | + # FIXME The next two are equals but need investigation: |
| 98 | + array( '/wiki/edit/Recentchanges', 'Recentchanges', 'action=view&action=edit' ), |
| 99 | + array( '/wiki/view/Recentchanges?action=edit&action=view', 'Recentchanges', 'action=edit&action=view' ), |
| 100 | + ); |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * @dataProvider provider4 |
| 105 | + * @cover Title:getLocalURL |
| 106 | + */ |
| 107 | + function testGetLocalUrlWithVariantArticlePaths( $expected, $dbkey, $query ) |
| 108 | + { |
| 109 | + # FIXME find a language with variants! |
| 110 | + $this->markTestIncomplete(); |
| 111 | + |
| 112 | + $actions = array( 'edit' => '/wiki/edit/$1' ); |
| 113 | + $this->assertGetLocalURL( $expected, $dbkey, $query, '/wiki/view/$1', array(), '/$2/$1' ); |
| 114 | + } |
| 115 | + |
| 116 | + function provider4() { |
| 117 | + return array( |
| 118 | + array( '/wiki/view/Recentchanges', 'Recentchanges', '', ), |
| 119 | + ); |
| 120 | + } |
| 121 | + |
| 122 | + |
18 | 123 | } |
Index: trunk/phase3/tests/parser/parserTests.txt |
— | — | @@ -538,7 +538,7 @@ |
539 | 539 | !! input |
540 | 540 | ; [[Help:FAQ]]: The least-read page on Wikipedia |
541 | 541 | !! result |
542 | | -<dl><dt> <a href="https://www.mediawiki.org/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 |
| 542 | +<dl><dt> <a href="https://www.mediawiki.org/wiki/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 |
543 | 543 | </dd></dl> |
544 | 544 | |
545 | 545 | !! end |
— | — | @@ -971,7 +971,7 @@ |
972 | 972 | !! input |
973 | 973 | [http://example.com [[wikilink]] embedded in ext link] |
974 | 974 | !! result |
975 | | -<p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="https://www.mediawiki.org/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> |
| 975 | +<p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="https://www.mediawiki.org/wiki/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> |
976 | 976 | </p> |
977 | 977 | !! end |
978 | 978 | |
— | — | @@ -1138,7 +1138,7 @@ |
1139 | 1139 | !! input |
1140 | 1140 | [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]].] |
1141 | 1141 | !! result |
1142 | | -<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="https://www.mediawiki.org/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> |
| 1142 | +<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="https://www.mediawiki.org/wiki/Museo_Picasso_(Par%C3%ADs)?action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a> |
1143 | 1143 | </p> |
1144 | 1144 | !! end |
1145 | 1145 | |
— | — | @@ -1147,7 +1147,7 @@ |
1148 | 1148 | !! input |
1149 | 1149 | {{localurl:Some page|amp=&}} |
1150 | 1150 | !! result |
1151 | | -<p>/index.php?title=Some_page&amp=& |
| 1151 | +<p>/wiki/Some_page?amp=& |
1152 | 1152 | </p> |
1153 | 1153 | !! end |
1154 | 1154 | |
— | — | @@ -1156,7 +1156,7 @@ |
1157 | 1157 | !! input |
1158 | 1158 | {{localurl:Some page|q=?&=&}} |
1159 | 1159 | !! result |
1160 | | -<p>/index.php?title=Some_page&q=?&amp=& |
| 1160 | +<p>/wiki/Some_page?q=?&amp=& |
1161 | 1161 | </p> |
1162 | 1162 | !! end |
1163 | 1163 | |
— | — | @@ -1757,7 +1757,7 @@ |
1758 | 1758 | <table> |
1759 | 1759 | <tr valign="top"> |
1760 | 1760 | <td> |
1761 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Heading">edit</a>]</span> <span class="mw-headline" id="Heading"> Heading </span></h3> |
| 1761 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=1" title="Edit section: Heading">edit</a>]</span> <span class="mw-headline" id="Heading"> Heading </span></h3> |
1762 | 1762 | </td> |
1763 | 1763 | </tr> |
1764 | 1764 | </table> |
— | — | @@ -1938,7 +1938,7 @@ |
1939 | 1939 | !! input |
1940 | 1940 | [[Zigzagzogzagzig]] |
1941 | 1941 | !! result |
1942 | | -<p><a href="https://www.mediawiki.org/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a> |
| 1942 | +<p><a href="https://www.mediawiki.org/wiki/Zigzagzogzagzig?action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a> |
1943 | 1943 | </p> |
1944 | 1944 | !! end |
1945 | 1945 | |
— | — | @@ -1947,7 +1947,7 @@ |
1948 | 1948 | !! input |
1949 | 1949 | [[Zigzagzogzagzig#zug]] |
1950 | 1950 | !! result |
1951 | | -<p><a href="https://www.mediawiki.org/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a> |
| 1951 | +<p><a href="https://www.mediawiki.org/wiki/Zigzagzogzagzig?action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a> |
1952 | 1952 | </p> |
1953 | 1953 | !! end |
1954 | 1954 | |
— | — | @@ -2019,7 +2019,7 @@ |
2020 | 2020 | !! input |
2021 | 2021 | [[Talk:Parser testing]], [[Meta:Disclaimers]] |
2022 | 2022 | !! result |
2023 | | -<p><a href="https://www.mediawiki.org/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="https://www.mediawiki.org/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a> |
| 2023 | +<p><a href="https://www.mediawiki.org/wiki/Talk:Parser_testing?action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="https://www.mediawiki.org/wiki/Meta:Disclaimers?action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a> |
2024 | 2024 | </p> |
2025 | 2025 | !! end |
2026 | 2026 | |
— | — | @@ -2028,7 +2028,7 @@ |
2029 | 2029 | !! input |
2030 | 2030 | [[Meta:Disclaimers|The disclaimers]] |
2031 | 2031 | !! result |
2032 | | -<p><a href="https://www.mediawiki.org/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a> |
| 2032 | +<p><a href="https://www.mediawiki.org/wiki/Meta:Disclaimers?action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a> |
2033 | 2033 | </p> |
2034 | 2034 | !! end |
2035 | 2035 | |
— | — | @@ -2046,7 +2046,7 @@ |
2047 | 2047 | !! input |
2048 | 2048 | [[7% Solution]] |
2049 | 2049 | !! result |
2050 | | -<p><a href="https://www.mediawiki.org/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a> |
| 2050 | +<p><a href="https://www.mediawiki.org/wiki/7%25_Solution?action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a> |
2051 | 2051 | </p> |
2052 | 2052 | !! end |
2053 | 2053 | |
— | — | @@ -2055,7 +2055,7 @@ |
2056 | 2056 | !! input |
2057 | 2057 | [[7%25 Solution]] |
2058 | 2058 | !! result |
2059 | | -<p><a href="https://www.mediawiki.org/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a> |
| 2059 | +<p><a href="https://www.mediawiki.org/wiki/7%25_Solution?action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a> |
2060 | 2060 | </p> |
2061 | 2061 | !!end |
2062 | 2062 | |
— | — | @@ -2092,7 +2092,7 @@ |
2093 | 2093 | !! input |
2094 | 2094 | [[Lista d''e paise d''o munno]] |
2095 | 2095 | !! result |
2096 | | -<p><a href="https://www.mediawiki.org/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> |
| 2096 | +<p><a href="https://www.mediawiki.org/wiki/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> |
2097 | 2097 | </p> |
2098 | 2098 | !! end |
2099 | 2099 | |
— | — | @@ -2101,7 +2101,7 @@ |
2102 | 2102 | !! input |
2103 | 2103 | Some [[Link|pretty ''italics'' and stuff]]! |
2104 | 2104 | !! result |
2105 | | -<p>Some <a href="https://www.mediawiki.org/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>! |
| 2105 | +<p>Some <a href="https://www.mediawiki.org/wiki/Link?action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>! |
2106 | 2106 | </p> |
2107 | 2107 | !! end |
2108 | 2108 | |
— | — | @@ -2110,7 +2110,7 @@ |
2111 | 2111 | !! input |
2112 | 2112 | ''Some [[Link|pretty ''italics'' and stuff]]! |
2113 | 2113 | !! result |
2114 | | -<p><i>Some <a href="https://www.mediawiki.org/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i> |
| 2114 | +<p><i>Some <a href="https://www.mediawiki.org/wiki/Link?action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i> |
2115 | 2115 | </p> |
2116 | 2116 | !! end |
2117 | 2117 | |
— | — | @@ -2125,10 +2125,10 @@ |
2126 | 2126 | |
2127 | 2127 | [[''Pentecoste''|''Pentecoste'']] |
2128 | 2128 | !! result |
2129 | | -<p><a href="https://www.mediawiki.org/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> |
2130 | | -</p><p><a href="https://www.mediawiki.org/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a> |
2131 | | -</p><p><a href="https://www.mediawiki.org/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a> |
2132 | | -</p><p><a href="https://www.mediawiki.org/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a> |
| 2129 | +<p><a href="https://www.mediawiki.org/wiki/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> |
| 2130 | +</p><p><a href="https://www.mediawiki.org/wiki/%27%27Pentecoste%27%27?action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a> |
| 2131 | +</p><p><a href="https://www.mediawiki.org/wiki/%27%27Pentecoste%27%27?action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a> |
| 2132 | +</p><p><a href="https://www.mediawiki.org/wiki/%27%27Pentecoste%27%27?action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a> |
2133 | 2133 | </p> |
2134 | 2134 | !! end |
2135 | 2135 | |
— | — | @@ -2148,7 +2148,7 @@ |
2149 | 2149 | # ---- |
2150 | 2150 | # I'm changing it to match the current output--it arguably makes more |
2151 | 2151 | # sense in the light of the test above. Old expected result was: |
2152 | | -#<p>Piped link to URL: <a href="https://www.mediawiki.org/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a> |
| 2152 | +#<p>Piped link to URL: <a href="https://www.mediawiki.org/wiki/Http://www.example.com?action=edit" class="new">an example URL</a> |
2153 | 2153 | #</p> |
2154 | 2154 | # But I think this test is bordering on "garbage in, garbage out" anyway. |
2155 | 2155 | # -- wtm |
— | — | @@ -2267,7 +2267,7 @@ |
2268 | 2268 | !! input |
2269 | 2269 | [[Something]]'nice |
2270 | 2270 | !! result |
2271 | | -<p><a href="https://www.mediawiki.org/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice |
| 2271 | +<p><a href="https://www.mediawiki.org/wiki/Something?action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice |
2272 | 2272 | </p> |
2273 | 2273 | !! end |
2274 | 2274 | |
— | — | @@ -2278,7 +2278,7 @@ |
2279 | 2279 | !! input |
2280 | 2280 | [[Something]]'nice |
2281 | 2281 | !! result |
2282 | | -<p><a href="https://www.mediawiki.org/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a> |
| 2282 | +<p><a href="https://www.mediawiki.org/wiki/Something?action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a> |
2283 | 2283 | </p> |
2284 | 2284 | !! end |
2285 | 2285 | |
— | — | @@ -2289,7 +2289,7 @@ |
2290 | 2290 | !! input |
2291 | 2291 | [[Something]]'nice |
2292 | 2292 | !! result |
2293 | | -<p><a href="https://www.mediawiki.org/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a> |
| 2293 | +<p><a href="https://www.mediawiki.org/wiki/Something?action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a> |
2294 | 2294 | </p> |
2295 | 2295 | !! end |
2296 | 2296 | |
— | — | @@ -2909,7 +2909,7 @@ |
2910 | 2910 | !! input |
2911 | 2911 | [[RFC 123]] |
2912 | 2912 | !! result |
2913 | | -<p><a href="https://www.mediawiki.org/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a> |
| 2913 | +<p><a href="https://www.mediawiki.org/wiki/RFC_123?action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a> |
2914 | 2914 | </p> |
2915 | 2915 | !! end |
2916 | 2916 | |
— | — | @@ -2949,7 +2949,7 @@ |
2950 | 2950 | !! input |
2951 | 2951 | {{thistemplatedoesnotexist}} |
2952 | 2952 | !! result |
2953 | | -<p><a href="https://www.mediawiki.org/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a> |
| 2953 | +<p><a href="https://www.mediawiki.org/wiki/Template:Thistemplatedoesnotexist?action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a> |
2954 | 2954 | </p> |
2955 | 2955 | !! end |
2956 | 2956 | |
— | — | @@ -3131,7 +3131,7 @@ |
3132 | 3132 | {{paramtest| |
3133 | 3133 | param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}} |
3134 | 3134 | !! result |
3135 | | -This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="https://www.mediawiki.org/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="https://www.mediawiki.org/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div> |
| 3135 | +This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/Special:Upload?wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="https://www.mediawiki.org/wiki/No_link?action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="https://www.mediawiki.org/wiki/No_link?action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div> |
3136 | 3136 | |
3137 | 3137 | !! end |
3138 | 3138 | |
— | — | @@ -3435,8 +3435,8 @@ |
3436 | 3436 | !! input |
3437 | 3437 | {{includeonly section}} |
3438 | 3438 | !! result |
3439 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
3440 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 3439 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 3440 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
3441 | 3441 | |
3442 | 3442 | !! end |
3443 | 3443 | |
— | — | @@ -3462,7 +3462,7 @@ |
3463 | 3463 | </includeonly> |
3464 | 3464 | ==Section 1== |
3465 | 3465 | !! result |
3466 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 3466 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
3467 | 3467 | |
3468 | 3468 | !! end |
3469 | 3469 | |
— | — | @@ -4103,7 +4103,7 @@ |
4104 | 4104 | !! input |
4105 | 4105 | [[:Image:test]] |
4106 | 4106 | !! result |
4107 | | -<p><a href="https://www.mediawiki.org/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a> |
| 4107 | +<p><a href="https://www.mediawiki.org/wiki/File:Test?action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a> |
4108 | 4108 | </p> |
4109 | 4109 | !! end |
4110 | 4110 | |
— | — | @@ -4112,7 +4112,7 @@ |
4113 | 4113 | !! input |
4114 | 4114 | [[:Image:test|caption]] |
4115 | 4115 | !! result |
4116 | | -<p><a href="https://www.mediawiki.org/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a> |
| 4116 | +<p><a href="https://www.mediawiki.org/wiki/File:Test?action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a> |
4117 | 4117 | </p> |
4118 | 4118 | !! end |
4119 | 4119 | |
— | — | @@ -4239,7 +4239,7 @@ |
4240 | 4240 | !! input |
4241 | 4241 | [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]] |
4242 | 4242 | !! result |
4243 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/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="https://www.mediawiki.org/index.php?title=Special:Upload&wpDestFile=Icon.png" class="new" title="File:Icon.png">image</a> inside it!</div></div></div> |
| 4243 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/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="https://www.mediawiki.org/wiki/Special:Upload?wpDestFile=Icon.png" class="new" title="File:Icon.png">image</a> inside it!</div></div></div> |
4244 | 4244 | |
4245 | 4245 | !! end |
4246 | 4246 | |
— | — | @@ -4326,7 +4326,7 @@ |
4327 | 4327 | !! input |
4328 | 4328 | [[/subpage]] |
4329 | 4329 | !! result |
4330 | | -<p><a href="https://www.mediawiki.org/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> |
| 4330 | +<p><a href="https://www.mediawiki.org/wiki//subpage?action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> |
4331 | 4331 | </p> |
4332 | 4332 | !! end |
4333 | 4333 | |
— | — | @@ -4337,7 +4337,7 @@ |
4338 | 4338 | !! input |
4339 | 4339 | {{/Subpage}} |
4340 | 4340 | !! result |
4341 | | -<p><a href="https://www.mediawiki.org/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a> |
| 4341 | +<p><a href="https://www.mediawiki.org/wiki/Page/Subpage?action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a> |
4342 | 4342 | </p> |
4343 | 4343 | !! end |
4344 | 4344 | |
— | — | @@ -4407,13 +4407,13 @@ |
4408 | 4408 | ===Smaller headline=== |
4409 | 4409 | Blah blah |
4410 | 4410 | !! result |
4411 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4411 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4412 | 4412 | <p>Some text |
4413 | 4413 | </p> |
4414 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4414 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4415 | 4415 | <p>More |
4416 | 4416 | </p> |
4417 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4417 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4418 | 4418 | <p>Blah blah |
4419 | 4419 | </p> |
4420 | 4420 | !! end |
— | — | @@ -4452,14 +4452,14 @@ |
4453 | 4453 | </li> |
4454 | 4454 | </ul> |
4455 | 4455 | </td></tr></table> |
4456 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4457 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4458 | | -<h5><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4459 | | -<h6><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4460 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4456 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4457 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4458 | +<h5><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4459 | +<h6><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4460 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4461 | 4461 | <p>Some text |
4462 | 4462 | </p> |
4463 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4463 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4464 | 4464 | |
4465 | 4465 | !! end |
4466 | 4466 | |
— | — | @@ -4507,16 +4507,16 @@ |
4508 | 4508 | </li> |
4509 | 4509 | </ul> |
4510 | 4510 | </td></tr></table> |
4511 | | -<h1><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4512 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4513 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4514 | | -<h4><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4515 | | -<h5><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4516 | | -<h6><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4517 | | -<h6><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4518 | | -<h6><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4519 | | -<h6><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4520 | | -<h6><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4511 | +<h1><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4512 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4513 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4514 | +<h4><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4515 | +<h5><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4516 | +<h6><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4517 | +<h6><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4518 | +<h6><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4519 | +<h6><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4520 | +<h6><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4521 | 4521 | |
4522 | 4522 | !! end |
4523 | 4523 | |
— | — | @@ -4549,12 +4549,12 @@ |
4550 | 4550 | </li> |
4551 | 4551 | </ul> |
4552 | 4552 | </td></tr></table> |
4553 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4554 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4555 | | -<h4><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4556 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4557 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4558 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4553 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4554 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4555 | +<h4><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4556 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4557 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4558 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4559 | 4559 | |
4560 | 4560 | !! end |
4561 | 4561 | |
— | — | @@ -4585,12 +4585,12 @@ |
4586 | 4586 | </li> |
4587 | 4587 | </ul> |
4588 | 4588 | </td></tr></table> |
4589 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4590 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4591 | | -<h4><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4592 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4593 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4594 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4589 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4590 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4591 | +<h4><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4592 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4593 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4594 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4595 | 4595 | |
4596 | 4596 | !! end |
4597 | 4597 | |
— | — | @@ -4615,11 +4615,11 @@ |
4616 | 4616 | <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li> |
4617 | 4617 | </ul> |
4618 | 4618 | </td></tr></table> |
4619 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4620 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4621 | | -<h4><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4622 | | -<h4><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4623 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4619 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4620 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4621 | +<h4><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4622 | +<h4><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4623 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4624 | 4624 | |
4625 | 4625 | !! end |
4626 | 4626 | |
— | — | @@ -4630,8 +4630,8 @@ |
4631 | 4631 | == Foo bar == |
4632 | 4632 | == Foo bar == |
4633 | 4633 | !! result |
4634 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4635 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4634 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4635 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4636 | 4636 | |
4637 | 4637 | !! end |
4638 | 4638 | |
— | — | @@ -4641,8 +4641,8 @@ |
4642 | 4642 | == Foo bar == |
4643 | 4643 | == Foo Bar == |
4644 | 4644 | !! result |
4645 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4646 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4645 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4646 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4647 | 4647 | |
4648 | 4648 | !! end |
4649 | 4649 | |
— | — | @@ -4661,10 +4661,10 @@ |
4662 | 4662 | {{sections}} |
4663 | 4663 | ==Section 4== |
4664 | 4664 | !! result |
4665 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4666 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4667 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4668 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4665 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4666 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Template:Sections?action=edit&section=T-1" title="Template:Sections">edit</a>]</span> <span class="mw-headline" id="Section_1">Section 1</span></h3> |
| 4667 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Template:Sections?action=edit&section=T-2" title="Template:Sections">edit</a>]</span> <span class="mw-headline" id="Section_2">Section 2</span></h2> |
| 4668 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4669 | 4669 | |
4670 | 4670 | !! end |
4671 | 4671 | |
— | — | @@ -4685,7 +4685,7 @@ |
4686 | 4686 | !! input |
4687 | 4687 | ==Section with a [[Main Page|link]] in it== |
4688 | 4688 | !! result |
4689 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">link</a> in it</span></h2> |
| 4689 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">link</a> in it</span></h2> |
4690 | 4690 | |
4691 | 4691 | !! end |
4692 | 4692 | |
— | — | @@ -4707,9 +4707,9 @@ |
4708 | 4708 | <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li> |
4709 | 4709 | </ul> |
4710 | 4710 | </td></tr></table> |
4711 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4712 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
4713 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4711 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4712 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
| 4713 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4714 | 4714 | |
4715 | 4715 | !! end |
4716 | 4716 | |
— | — | @@ -4731,10 +4731,10 @@ |
4732 | 4732 | --> <!-- --> |
4733 | 4733 | But just in case it doesn't... |
4734 | 4734 | !! result |
4735 | | -<h1><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D">=</span></h1> |
| 4735 | +<h1><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=1" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D">=</span></h1> |
4736 | 4736 | <p>The line above must have a trailing space! |
4737 | 4737 | </p> |
4738 | | -<h1><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D_2">=</span></h1> |
| 4738 | +<h1><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=2" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D_2">=</span></h1> |
4739 | 4739 | <p>But just in case it doesn't... |
4740 | 4740 | </p> |
4741 | 4741 | !! end |
— | — | @@ -4770,19 +4770,19 @@ |
4771 | 4771 | <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li> |
4772 | 4772 | </ul> |
4773 | 4773 | </td></tr></table> |
4774 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4774 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4775 | 4775 | <p>section 1 |
4776 | 4776 | </p> |
4777 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4777 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4778 | 4778 | <p>section 2 |
4779 | 4779 | </p> |
4780 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4780 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4781 | 4781 | <p>section 3 |
4782 | 4782 | </p> |
4783 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4783 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4784 | 4784 | <p>section 4 |
4785 | 4785 | </p> |
4786 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 4786 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/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> |
4787 | 4787 | <p>section 5 |
4788 | 4788 | </p> |
4789 | 4789 | !! end |
— | — | @@ -4971,7 +4971,7 @@ |
4972 | 4972 | !! input |
4973 | 4973 | [[Media:No such.jpg]] |
4974 | 4974 | !! result |
4975 | | -<p><a href="https://www.mediawiki.org/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a> |
| 4975 | +<p><a href="https://www.mediawiki.org/wiki/Special:Upload?wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a> |
4976 | 4976 | </p> |
4977 | 4977 | !! end |
4978 | 4978 | |
— | — | @@ -4980,7 +4980,7 @@ |
4981 | 4981 | !! input |
4982 | 4982 | [[Image:No such.jpg]] |
4983 | 4983 | !! result |
4984 | | -<p><a href="https://www.mediawiki.org/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a> |
| 4984 | +<p><a href="https://www.mediawiki.org/wiki/Special:Upload?wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a> |
4985 | 4985 | </p> |
4986 | 4986 | !! end |
4987 | 4987 | |
— | — | @@ -4989,7 +4989,7 @@ |
4990 | 4990 | !! input |
4991 | 4991 | [[:Image:No such.jpg]] |
4992 | 4992 | !! result |
4993 | | -<p><a href="https://www.mediawiki.org/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> |
| 4993 | +<p><a href="https://www.mediawiki.org/wiki/File:No_such.jpg?action=edit&redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a> |
4994 | 4994 | </p> |
4995 | 4995 | !! end |
4996 | 4996 | |
— | — | @@ -5988,7 +5988,7 @@ |
5989 | 5989 | == onmouseover= == |
5990 | 5990 | http://__TOC__ |
5991 | 5991 | !! result |
5992 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 5992 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</span> <span class="mw-headline" id="onmouseover.3D"> onmouseover= </span></h2> |
5993 | 5993 | http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
5994 | 5994 | <ul> |
5995 | 5995 | <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li> |
— | — | @@ -6004,7 +6004,7 @@ |
6005 | 6005 | {| STYLE=__TOC__ |
6006 | 6006 | |foo |
6007 | 6007 | !! result |
6008 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 6008 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline" id="a">a</span></h2> |
6009 | 6009 | <table style="__TOC__"> |
6010 | 6010 | <tr> |
6011 | 6011 | <td>foo |
— | — | @@ -6325,7 +6325,7 @@ |
6326 | 6326 | !! input |
6327 | 6327 | {{MediaWiki:Mainpagexxx}} |
6328 | 6328 | !!result |
6329 | | -<p><a href="https://www.mediawiki.org/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a> |
| 6329 | +<p><a href="https://www.mediawiki.org/wiki/MediaWiki:Mainpagexxx?action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a> |
6330 | 6330 | </p> |
6331 | 6331 | !! end |
6332 | 6332 | |
— | — | @@ -7243,7 +7243,7 @@ |
7244 | 7244 | </li><li> Talk |
7245 | 7245 | </li><li> |
7246 | 7246 | </li><li> |
7247 | | -</li><li> <a href="https://www.mediawiki.org/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a> |
| 7247 | +</li><li> <a href="https://www.mediawiki.org/wiki/Template:Dynamic?action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a> |
7248 | 7248 | </li></ul> |
7249 | 7249 | |
7250 | 7250 | !! end |
— | — | @@ -7546,7 +7546,7 @@ |
7547 | 7547 | !! input |
7548 | 7548 | RFC [[RFC 1234]] |
7549 | 7549 | !! result |
7550 | | -<p>RFC <a href="https://www.mediawiki.org/index.php?title=RFC_1234&action=edit&redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a> |
| 7550 | +<p>RFC <a href="https://www.mediawiki.org/wiki/RFC_1234?action=edit&redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a> |
7551 | 7551 | </p> |
7552 | 7552 | !! end |
7553 | 7553 | |
— | — | @@ -7680,7 +7680,7 @@ |
7681 | 7681 | !! input |
7682 | 7682 | [[../|L2]] |
7683 | 7683 | !! result |
7684 | | -<p><a href="https://www.mediawiki.org/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a> |
| 7684 | +<p><a href="https://www.mediawiki.org/wiki/Subpage_test/L1/L2?action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a> |
7685 | 7685 | </p> |
7686 | 7686 | !! end |
7687 | 7687 | |
— | — | @@ -7692,7 +7692,7 @@ |
7693 | 7693 | !! input |
7694 | 7694 | [[../]] |
7695 | 7695 | !! result |
7696 | | -<p><a href="https://www.mediawiki.org/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> |
| 7696 | +<p><a href="https://www.mediawiki.org/wiki/Subpage_test/L1/L2?action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a> |
7697 | 7697 | </p> |
7698 | 7698 | !! end |
7699 | 7699 | |
— | — | @@ -7707,8 +7707,8 @@ |
7708 | 7708 | |
7709 | 7709 | [[../../|L1]]l |
7710 | 7710 | !! result |
7711 | | -<p><a href="https://www.mediawiki.org/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a>2 |
7712 | | -</p><p><a href="https://www.mediawiki.org/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1l</a> |
| 7711 | +<p><a href="https://www.mediawiki.org/wiki/Subpage_test/L1?action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a>2 |
| 7712 | +</p><p><a href="https://www.mediawiki.org/wiki/Subpage_test/L1?action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1l</a> |
7713 | 7713 | </p> |
7714 | 7714 | !! end |
7715 | 7715 | |
— | — | @@ -7730,7 +7730,7 @@ |
7731 | 7731 | !! input |
7732 | 7732 | [[../../////]] |
7733 | 7733 | !! result |
7734 | | -<p><a href="https://www.mediawiki.org/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a> |
| 7734 | +<p><a href="https://www.mediawiki.org/wiki/Subpage_test/L1////?action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a> |
7735 | 7735 | </p> |
7736 | 7736 | !! end |
7737 | 7737 | |
— | — | @@ -7771,7 +7771,7 @@ |
7772 | 7772 | !! input |
7773 | 7773 | {{RAW:QUERTY}} |
7774 | 7774 | !! result |
7775 | | -<p><a href="https://www.mediawiki.org/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a> |
| 7775 | +<p><a href="https://www.mediawiki.org/wiki/Template:QUERTY?action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a> |
7776 | 7776 | </p> |
7777 | 7777 | !! end |
7778 | 7778 | |
— | — | @@ -7808,7 +7808,7 @@ |
7809 | 7809 | !! input |
7810 | 7810 | {{MediaWiki:Fake}} |
7811 | 7811 | !! result |
7812 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 7812 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/MediaWiki:Fake?action=edit&section=T-1" title="MediaWiki:Fake">edit</a>]</span> <span class="mw-headline" id="header">header</span></h2> |
7813 | 7813 | |
7814 | 7814 | !! end |
7815 | 7815 | |
— | — | @@ -7839,12 +7839,12 @@ |
7840 | 7840 | </li> |
7841 | 7841 | </ul> |
7842 | 7842 | </td></tr></table> |
7843 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
7844 | | -<h6><span class="editsection">[<a href="https://www.mediawiki.org/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> |
7845 | | -<h3><span class="editsection">[<a href="https://www.mediawiki.org/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> |
7846 | | -<h1><span class="editsection">[<a href="https://www.mediawiki.org/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> |
7847 | | -<h5><span class="editsection">[<a href="https://www.mediawiki.org/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> |
7848 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 7843 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=1" title="Edit section: 2">edit</a>]</span> <span class="mw-headline" id="2">2</span></h2> |
| 7844 | +<h6><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=2" title="Edit section: 6">edit</a>]</span> <span class="mw-headline" id="6">6</span></h6> |
| 7845 | +<h3><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=3" title="Edit section: 3">edit</a>]</span> <span class="mw-headline" id="3">3</span></h3> |
| 7846 | +<h1><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=4" title="Edit section: 1">edit</a>]</span> <span class="mw-headline" id="1">1</span></h1> |
| 7847 | +<h5><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=5" title="Edit section: 5">edit</a>]</span> <span class="mw-headline" id="5">5</span></h5> |
| 7848 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=6" title="Edit section: 2">edit</a>]</span> <span class="mw-headline" id="2_2">2</span></h2> |
7849 | 7849 | |
7850 | 7850 | !! end |
7851 | 7851 | |
— | — | @@ -8142,7 +8142,7 @@ |
8143 | 8143 | !! input |
8144 | 8144 | == -{Naslov}- == |
8145 | 8145 | !! result |
8146 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Уредите одељак „Naslov“">уреди</a>]</span> <span class="mw-headline" id="-.7BNaslov.7D-"> Naslov </span></h2> |
| 8146 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=1" title="Уредите одељак „Naslov“">уреди</a>]</span> <span class="mw-headline" id="-.7BNaslov.7D-"> Naslov </span></h2> |
8147 | 8147 | |
8148 | 8148 | !! end |
8149 | 8149 | |
— | — | @@ -8390,7 +8390,7 @@ |
8391 | 8391 | !! result |
8392 | 8392 | <p>[[link |
8393 | 8393 | </p> |
8394 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 8394 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=1" title="Edit section: heading">edit</a>]</span> <span class="mw-headline" id="heading">heading</span></h2> |
8395 | 8395 | |
8396 | 8396 | !! end |
8397 | 8397 | |
— | — | @@ -8414,7 +8414,7 @@ |
8415 | 8415 | !! result |
8416 | 8416 | <p>{{foo| |
8417 | 8417 | </p> |
8418 | | -<h2><span class="editsection">[<a href="https://www.mediawiki.org/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> |
| 8418 | +<h2><span class="editsection">[<a href="https://www.mediawiki.org/wiki/Parser_test?action=edit&section=1" title="Edit section: heading">edit</a>]</span> <span class="mw-headline" id="heading">heading</span></h2> |
8419 | 8419 | |
8420 | 8420 | !! end |
8421 | 8421 | |
— | — | @@ -8688,7 +8688,7 @@ |
8689 | 8689 | !! input |
8690 | 8690 | [[2009-03-24]] |
8691 | 8691 | !! result |
8692 | | -<p><span class="mw-formatted-date" title="2009-03-24"><a href="https://www.mediawiki.org/index.php?title=2009&action=edit&redlink=1" class="new" title="2009 (page does not exist)">2009</a>-<a href="https://www.mediawiki.org/index.php?title=March_24&action=edit&redlink=1" class="new" title="March 24 (page does not exist)">03-24</a></span> |
| 8692 | +<p><span class="mw-formatted-date" title="2009-03-24"><a href="https://www.mediawiki.org/wiki/2009?action=edit&redlink=1" class="new" title="2009 (page does not exist)">2009</a>-<a href="https://www.mediawiki.org/wiki/March_24?action=edit&redlink=1" class="new" title="March 24 (page does not exist)">03-24</a></span> |
8693 | 8693 | </p> |
8694 | 8694 | !!end |
8695 | 8695 | |
— | — | @@ -8717,7 +8717,7 @@ |
8718 | 8718 | !! input |
8719 | 8719 | [[2009-03-24]] |
8720 | 8720 | !! result |
8721 | | -<p><a href="https://www.mediawiki.org/index.php?title=2009-03-24&action=edit&redlink=1" class="new" title="2009-03-24 (page does not exist)">2009-03-24</a> |
| 8721 | +<p><a href="https://www.mediawiki.org/wiki/2009-03-24?action=edit&redlink=1" class="new" title="2009-03-24 (page does not exist)">2009-03-24</a> |
8722 | 8722 | </p> |
8723 | 8723 | !! end |
8724 | 8724 | |
— | — | @@ -8737,7 +8737,7 @@ |
8738 | 8738 | !! input |
8739 | 8739 | [[January 15]] |
8740 | 8740 | !! result |
8741 | | -<p><span class="mw-formatted-date" title="01-15"><a href="https://www.mediawiki.org/index.php?title=January_15&action=edit&redlink=1" class="new" title="January 15 (page does not exist)">January 15</a></span> |
| 8741 | +<p><span class="mw-formatted-date" title="01-15"><a href="https://www.mediawiki.org/wiki/January_15?action=edit&redlink=1" class="new" title="January 15 (page does not exist)">January 15</a></span> |
8742 | 8742 | </p> |
8743 | 8743 | !! end |
8744 | 8744 | |
— | — | @@ -8831,7 +8831,7 @@ |
8832 | 8832 | !! input |
8833 | 8833 | Poked at a [[/subpage]] here... |
8834 | 8834 | !! result |
8835 | | -Poked at a <a href="https://www.mediawiki.org/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here... |
| 8835 | +Poked at a <a href="https://www.mediawiki.org/wiki//subpage?action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here... |
8836 | 8836 | !!end |
8837 | 8837 | |
8838 | 8838 | !! test |
— | — | @@ -8893,7 +8893,7 @@ |
8894 | 8894 | !!input |
8895 | 8895 | [[ABC%33D% ++]] [[ABC%33D% ++|+%20]] |
8896 | 8896 | !! result |
8897 | | -<a href="https://www.mediawiki.org/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">ABC3D% ++</a> <a href="https://www.mediawiki.org/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">+%20</a> |
| 8897 | +<a href="https://www.mediawiki.org/wiki/ABC3D%25_%2B%2B?action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">ABC3D% ++</a> <a href="https://www.mediawiki.org/wiki/ABC3D%25_%2B%2B?action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">+%20</a> |
8898 | 8898 | !! end |
8899 | 8899 | |
8900 | 8900 | !! test |
— | — | @@ -8994,7 +8994,7 @@ |
8995 | 8995 | !! result |
8996 | 8996 | Screen |
8997 | 8997 | <p>this is not the the title |
8998 | | -<a href="https://www.mediawiki.org/index.php?title=Template:DISPLAYTITLE:screen&action=edit&redlink=1" class="new" title="Template:DISPLAYTITLE:screen (page does not exist)">Template:DISPLAYTITLE:screen</a> |
| 8998 | +<a href="https://www.mediawiki.org/wiki/Template:DISPLAYTITLE:screen?action=edit&redlink=1" class="new" title="Template:DISPLAYTITLE:screen (page does not exist)">Template:DISPLAYTITLE:screen</a> |
8999 | 8999 | </p> |
9000 | 9000 | !! end |
9001 | 9001 | |
— | — | @@ -9090,10 +9090,10 @@ |
9091 | 9091 | [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]] |
9092 | 9092 | [[%33%45]] [[%33%45+]] |
9093 | 9093 | !! result |
9094 | | -<p><a href="https://www.mediawiki.org/index.php?title=User:%2B%25&action=edit&redlink=1" class="new" title="User:+% (page does not exist)">User:+%</a> <a href="https://www.mediawiki.org/index.php?title=Page%2Btitle%25&action=edit&redlink=1" class="new" title="Page+title% (page does not exist)">Page+title%</a> |
9095 | | -<a href="https://www.mediawiki.org/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+</a> <a href="https://www.mediawiki.org/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%20</a> <a href="https://www.mediawiki.org/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+ </a> <a href="https://www.mediawiki.org/index.php?title=%25%2Br&action=edit&redlink=1" class="new" title="%+r (page does not exist)">%+r</a> |
9096 | | -<a href="https://www.mediawiki.org/index.php?title=%25&action=edit&redlink=1" class="new" title="% (page does not exist)">%</a> <a href="https://www.mediawiki.org/index.php?title=%2B&action=edit&redlink=1" class="new" title="+ (page does not exist)">+</a> <a href="https://www.mediawiki.org/index.php?title=Special:Upload&wpDestFile=%25%2Babc9" class="new" title="File:%+abc9">bar</a> |
9097 | | -<a href="https://www.mediawiki.org/index.php?title=3E&action=edit&redlink=1" class="new" title="3E (page does not exist)">3E</a> <a href="https://www.mediawiki.org/index.php?title=3E%2B&action=edit&redlink=1" class="new" title="3E+ (page does not exist)">3E+</a> |
| 9094 | +<p><a href="https://www.mediawiki.org/wiki/User:%2B%25?action=edit&redlink=1" class="new" title="User:+% (page does not exist)">User:+%</a> <a href="https://www.mediawiki.org/wiki/Page%2Btitle%25?action=edit&redlink=1" class="new" title="Page+title% (page does not exist)">Page+title%</a> |
| 9095 | +<a href="https://www.mediawiki.org/wiki/%25%2B?action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+</a> <a href="https://www.mediawiki.org/wiki/%25%2B?action=edit&redlink=1" class="new" title="%+ (page does not exist)">%20</a> <a href="https://www.mediawiki.org/wiki/%25%2B?action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+ </a> <a href="https://www.mediawiki.org/wiki/%25%2Br?action=edit&redlink=1" class="new" title="%+r (page does not exist)">%+r</a> |
| 9096 | +<a href="https://www.mediawiki.org/wiki/%25?action=edit&redlink=1" class="new" title="% (page does not exist)">%</a> <a href="https://www.mediawiki.org/wiki/%2B?action=edit&redlink=1" class="new" title="+ (page does not exist)">+</a> <a href="https://www.mediawiki.org/wiki/Special:Upload?wpDestFile=%25%2Babc9" class="new" title="File:%+abc9">bar</a> |
| 9097 | +<a href="https://www.mediawiki.org/wiki/3E?action=edit&redlink=1" class="new" title="3E (page does not exist)">3E</a> <a href="https://www.mediawiki.org/wiki/3E%2B?action=edit&redlink=1" class="new" title="3E+ (page does not exist)">3E+</a> |
9098 | 9098 | </p> |
9099 | 9099 | !! end |
9100 | 9100 | |
— | — | @@ -9103,8 +9103,8 @@ |
9104 | 9104 | [[File:Contains & ampersand.jpg]] |
9105 | 9105 | [[File:Does not exist.jpg|Title with & ampersand]] |
9106 | 9106 | !! result |
9107 | | -<p><a href="https://www.mediawiki.org/index.php?title=Special:Upload&wpDestFile=Contains_%26_ampersand.jpg" class="new" title="File:Contains & ampersand.jpg">File:Contains & ampersand.jpg</a> |
9108 | | -<a href="https://www.mediawiki.org/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a> |
| 9107 | +<p><a href="https://www.mediawiki.org/wiki/Special:Upload?wpDestFile=Contains_%26_ampersand.jpg" class="new" title="File:Contains & ampersand.jpg">File:Contains & ampersand.jpg</a> |
| 9108 | +<a href="https://www.mediawiki.org/wiki/Special:Upload?wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a> |
9109 | 9109 | </p> |
9110 | 9110 | !! end |
9111 | 9111 | |
Index: trunk/phase3/includes/Setup.php |
— | — | @@ -42,6 +42,12 @@ |
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
| 46 | +if ( !empty($wgActionPaths) && !isset($wgActionPaths['view']) ) { |
| 47 | + # 'view' is assumed the default action path everywhere in the code |
| 48 | + # but is rarely filled in $wgActionPaths |
| 49 | + $wgActionPaths['view'] = $wgArticlePath ; |
| 50 | +} |
| 51 | + |
46 | 52 | if ( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins"; |
47 | 53 | if ( $wgLocalStylePath === false ) $wgLocalStylePath = "$wgScriptPath/skins"; |
48 | 54 | if ( $wgStyleDirectory === false ) $wgStyleDirectory = "$IP/skins"; |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -876,29 +876,21 @@ |
877 | 877 | $url = str_replace( '$1', $dbkey, $wgArticlePath ); |
878 | 878 | } |
879 | 879 | } else { |
| 880 | + $url = false; |
| 881 | + |
880 | 882 | global $wgActionPaths; |
881 | | - $url = false; |
882 | | - $matches = array(); |
883 | | - if ( !empty( $wgActionPaths ) && |
884 | | - preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches ) ) |
885 | | - { |
886 | | - $action = urldecode( $matches[2] ); |
887 | | - if ( isset( $wgActionPaths[$action] ) ) { |
888 | | - $query = $matches[1]; |
889 | | - if ( isset( $matches[4] ) ) { |
890 | | - $query .= $matches[4]; |
891 | | - } |
892 | | - $url = str_replace( '$1', $dbkey, $wgActionPaths[$action] ); |
893 | | - if ( $query != '' ) { |
894 | | - $url = wfAppendQuery( $url, $query ); |
895 | | - } |
896 | | - } |
| 883 | + if( !empty( $wgActionPaths ) ) { |
| 884 | + $url = Title::resolveActionPath( $dbkey, $query ); |
897 | 885 | } |
| 886 | + |
898 | 887 | if ( $url === false ) { |
899 | 888 | if ( $query == '-' ) { |
900 | 889 | $query = ''; |
901 | 890 | } |
902 | | - $url = "{$wgScript}?title={$dbkey}&{$query}"; |
| 891 | + #$url = "{$wgScript}?title={$dbkey}&{$query}"; |
| 892 | + # forge a nice URL (ex: /wiki/Special:Foo?q=1&r=2 ) |
| 893 | + $baseurl = str_replace( '$1', $dbkey, $wgArticlePath ); |
| 894 | + $url = wfAppendQuery( $baseurl, $query ); |
903 | 895 | } |
904 | 896 | } |
905 | 897 | |
— | — | @@ -913,6 +905,38 @@ |
914 | 906 | } |
915 | 907 | |
916 | 908 | /** |
| 909 | + * Helper for getLocalUrl() to handles $wgActionPaths |
| 910 | + * |
| 911 | + * @param $dbkey string Title in database key format |
| 912 | + * @param $query string request parameters in CGI format (p=1&q=2&..) |
| 913 | + * @return Url resolved or boolean false |
| 914 | + */ |
| 915 | + private static function resolveActionPath( $dbkey, $query ) { |
| 916 | + $url = ''; |
| 917 | + |
| 918 | + # query parameters are easier to handle using an array: |
| 919 | + $queryArray = wfCGIToArray( $query ); |
| 920 | + |
| 921 | + global $wgActionPaths; |
| 922 | + if( !array_key_exists( 'action', $queryArray ) ) { |
| 923 | + // Makes the default action 'view' and points to $wgArticlePath |
| 924 | + // FIXME: this should be handled in Setup or Wiki! |
| 925 | + global $wgArticlePath; |
| 926 | + $url = str_replace( '$1', $dbkey, $wgArticlePath ); |
| 927 | + } elseif( isset( $wgActionPaths[$queryArray['action']] ) ) { |
| 928 | + $url = str_replace( '$1', $dbkey, $wgActionPaths[$queryArray['action']] ); |
| 929 | + } else { |
| 930 | + # No path found |
| 931 | + return false; |
| 932 | + } |
| 933 | + |
| 934 | + # No need to append the action since we have embed it in the path |
| 935 | + unset( $queryArray['action'] ); |
| 936 | + $url = wfAppendQuery( $url, wfArrayToCGI( $queryArray ) ); |
| 937 | + return $url; |
| 938 | + } |
| 939 | + |
| 940 | + /** |
917 | 941 | * Get a URL that's the simplest URL that will be valid to link, locally, |
918 | 942 | * to the current Title. It includes the fragment, but does not include |
919 | 943 | * the server unless action=render is used (or the link is external). If |
Index: trunk/phase3/resources/mediawiki.action/mediawiki.action.watch.ajax.js |
— | — | @@ -65,8 +65,8 @@ |
66 | 66 | var link = this; |
67 | 67 | $link |
68 | 68 | .data( 'icon', $link.closest( 'li' ).hasClass( 'icon' ) ) |
69 | | - .data( 'action', mw.util.getParamValue( 'action', link.href ) == 'unwatch' ? 'unwatch' : 'watch' ); |
70 | | - var title = mw.util.getParamValue( 'title', link.href ); |
| 69 | + .data( 'action', mw.util.getActionFrom( link.href ) == 'unwatch' ? 'unwatch' : 'watch' ); |
| 70 | + var title = mw.util.getTitleFrom( link.href ); |
71 | 71 | $link.data( 'target', title.replace( /_/g, ' ' ) ); |
72 | 72 | }); |
73 | 73 | |
Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js |
— | — | @@ -207,6 +207,12 @@ |
208 | 208 | /** |
209 | 209 | * Grab the URL parameter value for the given parameter. |
210 | 210 | * Returns null if not found. |
| 211 | + * Beware! When action paths are enabled (wgActionPaths) using this function |
| 212 | + * to retrieve the 'action' or 'title' parameter will probably fail since |
| 213 | + * those parameters are hidden in the path. |
| 214 | + * To safely query for: |
| 215 | + * 'action' use getActionFrom( url ) |
| 216 | + * 'title' use getTitleFrom( url ) |
211 | 217 | * |
212 | 218 | * @param param The parameter name |
213 | 219 | * @param url URL to search through (optional) |
— | — | @@ -222,6 +228,63 @@ |
223 | 229 | return null; |
224 | 230 | }, |
225 | 231 | |
| 232 | + /** |
| 233 | + * Try to find the wiki action for a given URL with actions paths support |
| 234 | + * |
| 235 | + * @param url URL to search for a wiki action |
| 236 | + */ |
| 237 | + 'getActionFrom' : function( url ) { |
| 238 | + // attempt to get the action from the parameter [&?]action= |
| 239 | + var action = mw.util.getParamValue( 'action', url ); |
| 240 | + if( action !== null ) { |
| 241 | + return action; |
| 242 | + } |
| 243 | + |
| 244 | + // now from the action paths |
| 245 | + var actionPaths = mw.config.get( 'wgActionPaths' ); |
| 246 | + if( actionPaths.length == 0 ) { |
| 247 | + actionPaths['view'] = mw.config.get( 'wgArticlePath' ); |
| 248 | + } |
| 249 | + var action = ''; |
| 250 | + for ( action in actionPaths ) { |
| 251 | + var actionRe = new RegExp( actionPaths[action].replace( '$1', '.*?' ) ); |
| 252 | + if( url.match( actionRe ) ) { |
| 253 | + return action; |
| 254 | + } |
| 255 | + } |
| 256 | + |
| 257 | + return null; |
| 258 | + }, |
| 259 | + |
| 260 | + /** |
| 261 | + * Try to find the wiki title for a given URL with actions paths support |
| 262 | + * |
| 263 | + * @param url URL to search for a title |
| 264 | + */ |
| 265 | + 'getTitleFrom' : function( url ) { |
| 266 | + // attempt to get the title from the parameter [&?]title= |
| 267 | + var title = mw.util.getParamValue( 'title', url ); |
| 268 | + if( title !== null ) { |
| 269 | + return title; |
| 270 | + } |
| 271 | + |
| 272 | + // now from the action paths |
| 273 | + var actionPaths = mw.config.get( 'wgActionPaths' ); |
| 274 | + if( actionPaths.length == 0 ) { |
| 275 | + actionPaths['view'] = mw.config.get( 'wgArticlePath' ); |
| 276 | + } |
| 277 | + var action = ''; |
| 278 | + for ( action in actionPaths ) { |
| 279 | + var actionRe = new RegExp( '.*' + actionPaths[action].replace( '$1', '([^&?#]+)' ) ); |
| 280 | + var title = url.match( actionRe ); |
| 281 | + if( title !== null ) { |
| 282 | + return title[1]; |
| 283 | + } |
| 284 | + } |
| 285 | + |
| 286 | + return null; |
| 287 | + }, |
| 288 | + |
226 | 289 | // Access key prefix. |
227 | 290 | // Will be re-defined based on browser/operating system detection in |
228 | 291 | // mw.util.init(). |
— | — | @@ -548,4 +611,4 @@ |
549 | 612 | |
550 | 613 | mw.util.init(); |
551 | 614 | |
552 | | -} )( jQuery, mediaWiki ); |
\ No newline at end of file |
| 615 | +} )( jQuery, mediaWiki ); |