Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -1454,7 +1454,7 @@ |
1455 | 1455 | !! input |
1456 | 1456 | [[%23%3c]][[%23%3e]] |
1457 | 1457 | !! result |
1458 | | -<p><a href="#.3C" title="">#<</a><a href="#.3E" title="">#></a> |
| 1458 | +<p><a href="#.3C">#<</a><a href="#.3E">#></a> |
1459 | 1459 | </p> |
1460 | 1460 | !! end |
1461 | 1461 | |
— | — | @@ -4662,7 +4662,7 @@ |
4663 | 4663 | !! input |
4664 | 4664 | <span id="æ: v">byte</span>[[#æ: v|backlink]] |
4665 | 4665 | !! result |
4666 | | -<p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v" title="">backlink</a> |
| 4666 | +<p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a> |
4667 | 4667 | </p> |
4668 | 4668 | !! end |
4669 | 4669 | |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -291,7 +291,10 @@ |
292 | 292 | } |
293 | 293 | |
294 | 294 | # Get a default title attribute. |
295 | | - if( in_array( 'known', $options ) ) { |
| 295 | + if( $target->getPrefixedText() == '' ) { |
| 296 | + # A link like [[#Foo]]. This used to mean an empty title |
| 297 | + # attribute, but that's silly. Just don't output a title. |
| 298 | + } elseif( in_array( 'known', $options ) ) { |
296 | 299 | $defaults['title'] = $target->getPrefixedText(); |
297 | 300 | } else { |
298 | 301 | $defaults['title'] = wfMsg( 'red-link-title', $target->getPrefixedText() ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -313,6 +313,7 @@ |
314 | 314 | with <strong> tags, helps with text-based browsers |
315 | 315 | * (bug 18259) Special:DeletedContributions now also uses |
316 | 316 | MediaWiki:Sp-contributions-logs for the link to Special:Log |
| 317 | +* Don't add empty title="" attributes to links to anchors on the current page |
317 | 318 | |
318 | 319 | == API changes in 1.15 == |
319 | 320 | * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions |
Index: trunk/extensions/Cite/citeParserTests.txt |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | !! input |
11 | 11 | Wikipedia rocks!<ref>Proceeds of Rockology, vol. XXI</ref> |
12 | 12 | !! result |
13 | | -<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup> |
| 13 | +<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup> |
14 | 14 | </p> |
15 | 15 | <br /><strong class="error">Cite error: <code><ref></code> tags exist, but no <code><references/></code> tag was found</strong> |
16 | 16 | !! end |
— | — | @@ -21,9 +21,9 @@ |
22 | 22 | |
23 | 23 | <references/> |
24 | 24 | !! result |
25 | | -<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup> |
| 25 | +<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup> |
26 | 26 | </p> |
27 | | -<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Proceeds of Rockology, vol. XXI</li></ol> |
| 27 | +<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> Proceeds of Rockology, vol. XXI</li></ol> |
28 | 28 | |
29 | 29 | !! end |
30 | 30 | |
— | — | @@ -42,9 +42,9 @@ |
43 | 43 | |
44 | 44 | <references/> |
45 | 45 | !! result |
46 | | -<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup> |
| 46 | +<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup> |
47 | 47 | </p> |
48 | | -<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> A <i>simple</i> template.</li></ol> |
| 48 | +<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> A <i>simple</i> template.</li></ol> |
49 | 49 | |
50 | 50 | !! end |
51 | 51 | |
— | — | @@ -55,9 +55,9 @@ |
56 | 56 | |
57 | 57 | <references/> |
58 | 58 | !! result |
59 | | -<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup> |
| 59 | +<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup> |
60 | 60 | </p> |
61 | | -<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> {{simple template}}</li></ol> |
| 61 | +<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> {{simple template}}</li></ol> |
62 | 62 | |
63 | 63 | !! end |
64 | 64 | |
— | — | @@ -93,9 +93,9 @@ |
94 | 94 | |
95 | 95 | <references/> |
96 | 96 | !! result |
97 | | -<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup> |
| 97 | +<p>Templating<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup> |
98 | 98 | </p> |
99 | | -<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Text</li></ol> |
| 99 | +<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> Text</li></ol> |
100 | 100 | |
101 | 101 | !! end |
102 | 102 | |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | |
110 | 110 | <references/> |
111 | 111 | !! result |
112 | | -<p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup> |
| 112 | +<p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup> |
113 | 113 | </p> |
114 | 114 | <table class="gallery" cellspacing="0" cellpadding="0"> |
115 | 115 | <tr> |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | </div></td> |
121 | 121 | </tr> |
122 | 122 | </table> |
123 | | -<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> one</li></ol> |
| 123 | +<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> one</li></ol> |
124 | 124 | |
125 | 125 | !! end |
126 | 126 | |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | !! input |
130 | 130 | {{REVISIONID}}<ref>elite</ref> |
131 | 131 | !! result |
132 | | -<p>1337<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup> |
| 132 | +<p>1337<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup> |
133 | 133 | </p> |
134 | 134 | <br /><strong class="error">Cite error: <code><ref></code> tags exist, but no <code><references/></code> tag was found</strong> |
135 | 135 | !! end |
— | — | @@ -151,10 +151,10 @@ |
152 | 152 | |
153 | 153 | <references/> |
154 | 154 | !! result |
155 | | -<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup> |
156 | | -</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup> |
| 155 | +<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0">[1]</a></sup> |
| 156 | +</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0">[1]</a></sup> |
157 | 157 | </p> |
158 | | -<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0" title="">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1" title="">1.1</a></sup> content</li></ol> |
| 158 | +<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1">1.1</a></sup> content</li></ol> |
159 | 159 | |
160 | 160 | !! end |
161 | 161 | |
— | — | @@ -167,10 +167,10 @@ |
168 | 168 | |
169 | 169 | <references/> |
170 | 170 | !! result |
171 | | -<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup> |
172 | | -</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup> |
| 171 | +<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0">[1]</a></sup> |
| 172 | +</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0">[1]</a></sup> |
173 | 173 | </p> |
174 | | -<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0" title="">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1" title="">1.1</a></sup> 0</li></ol> |
| 174 | +<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1">1.1</a></sup> 0</li></ol> |
175 | 175 | |
176 | 176 | !! end |
177 | 177 | |
— | — | @@ -183,10 +183,10 @@ |
184 | 184 | |
185 | 185 | <references/> |
186 | 186 | !! result |
187 | | -<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup> |
188 | | -</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0" title="">[1]</a></sup> |
| 187 | +<p><sup id="cite_ref-blank_0-0" class="reference"><a href="#cite_note-blank-0">[1]</a></sup> |
| 188 | +</p><p><sup id="cite_ref-blank_0-1" class="reference"><a href="#cite_note-blank-0">[1]</a></sup> |
189 | 189 | </p> |
190 | | -<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0" title="">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1" title="">1.1</a></sup> 1</li></ol> |
| 190 | +<ol class="references"><li id="cite_note-blank-0">↑ <sup><a href="#cite_ref-blank_0-0">1.0</a></sup> <sup><a href="#cite_ref-blank_0-1">1.1</a></sup> 1</li></ol> |
191 | 191 | |
192 | 192 | !! end |
193 | 193 | |
— | — | @@ -199,13 +199,13 @@ |
200 | 200 | |
201 | 201 | <references /> |
202 | 202 | !! result |
203 | | -<p><sup id="cite_ref-test123test_0-0" class="reference"><a href="#cite_note-test123test-0" title="">[1]</a></sup> |
204 | | -<sup id="cite_ref-123test_1-0" class="reference"><a href="#cite_note-123test-1" title="">[2]</a></sup> |
205 | | -<sup id="cite_ref-test123_2-0" class="reference"><a href="#cite_note-test123-2" title="">[3]</a></sup> |
| 203 | +<p><sup id="cite_ref-test123test_0-0" class="reference"><a href="#cite_note-test123test-0">[1]</a></sup> |
| 204 | +<sup id="cite_ref-123test_1-0" class="reference"><a href="#cite_note-123test-1">[2]</a></sup> |
| 205 | +<sup id="cite_ref-test123_2-0" class="reference"><a href="#cite_note-test123-2">[3]</a></sup> |
206 | 206 | </p> |
207 | | -<ol class="references"><li id="cite_note-test123test-0"><a href="#cite_ref-test123test_0-0" title="">↑</a> One</li> |
208 | | -<li id="cite_note-123test-1"><a href="#cite_ref-123test_1-0" title="">↑</a> Two</li> |
209 | | -<li id="cite_note-test123-2"><a href="#cite_ref-test123_2-0" title="">↑</a> Three</li></ol> |
| 207 | +<ol class="references"><li id="cite_note-test123test-0"><a href="#cite_ref-test123test_0-0">↑</a> One</li> |
| 208 | +<li id="cite_note-123test-1"><a href="#cite_ref-123test_1-0">↑</a> Two</li> |
| 209 | +<li id="cite_note-test123-2"><a href="#cite_ref-test123_2-0">↑</a> Three</li></ol> |
210 | 210 | |
211 | 211 | !! end |
212 | 212 | |
— | — | @@ -230,21 +230,21 @@ |
231 | 231 | !! result |
232 | 232 | <p><strong class="error">Cite error: Invalid <code><ref></code> tag; |
233 | 233 | name cannot be a simple integer. Use a descriptive title</strong> |
234 | | -</p><p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup> |
| 234 | +</p><p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup> |
235 | 235 | </p><p><strong class="error">Cite error: Invalid <code><ref></code> tag; |
236 | 236 | refs with no content must have a name</strong> |
237 | | -</p><p><sup id="cite_ref-bar_1-0" class="reference"><a href="#cite_note-bar-1" title="">[2]</a></sup> |
238 | | -</p><p><sup id="cite_ref-blankwithnoreference_2-0" class="reference"><a href="#cite_note-blankwithnoreference-2" title="">[3]</a></sup> |
| 237 | +</p><p><sup id="cite_ref-bar_1-0" class="reference"><a href="#cite_note-bar-1">[2]</a></sup> |
| 238 | +</p><p><sup id="cite_ref-blankwithnoreference_2-0" class="reference"><a href="#cite_note-blankwithnoreference-2">[3]</a></sup> |
239 | 239 | </p><p><strong class="error">Cite error: Invalid <code><references></code> tag; |
240 | 240 | no input is allowed. Use <code><references /></code></strong> |
241 | 241 | </p><p><strong class="error">Cite error: Invalid <code><references></code> tag; |
242 | 242 | parameter "group" is allowed only. |
243 | 243 | Use <code><references /></code>, or <code><references group="…" /></code></strong> |
244 | 244 | </p> |
245 | | -<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Also zero, but differently! (Normal ref)</li> |
246 | | -<li id="cite_note-bar"><a href="#cite_ref-bar_0" title="">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag; |
| 245 | +<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> Also zero, but differently! (Normal ref)</li> |
| 246 | +<li id="cite_note-bar"><a href="#cite_ref-bar_0">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag; |
247 | 247 | no text was provided for refs named <code>bar</code></strong></li> |
248 | | -<li id="cite_note-blankwithnoreference"><a href="#cite_ref-blankwithnoreference_0" title="">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag; |
| 248 | +<li id="cite_note-blankwithnoreference"><a href="#cite_ref-blankwithnoreference_0">↑</a> <strong class="error">Cite error: Invalid <code><ref></code> tag; |
249 | 249 | no text was provided for refs named <code>blankwithnoreference</code></strong></li></ol> |
250 | 250 | |
251 | 251 | !! end |
— | — | @@ -259,11 +259,11 @@ |
260 | 260 | <references/> |
261 | 261 | <references group=note/> |
262 | 262 | !! result |
263 | | -<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[1]</a></sup> |
264 | | -Wikipedia rocks!<sup id="cite_ref-1" class="reference"><a href="#cite_note-1" title="">[note 1]</a></sup> |
| 263 | +<p>Wikipedia rocks!<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup> |
| 264 | +Wikipedia rocks!<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[note 1]</a></sup> |
265 | 265 | </p> |
266 | | -<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> Proceeds of Rockology, vol. XXI</li></ol> |
267 | | -<ol class="references"><li id="cite_note-1"><a href="#cite_ref-1" title="">↑</a> Proceeds of Rockology, vol. XXI</li></ol> |
| 266 | +<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> Proceeds of Rockology, vol. XXI</li></ol> |
| 267 | +<ol class="references"><li id="cite_note-1"><a href="#cite_ref-1">↑</a> Proceeds of Rockology, vol. XXI</li></ol> |
268 | 268 | |
269 | 269 | !! end |
270 | 270 | |
— | — | @@ -277,14 +277,14 @@ |
278 | 278 | ;notes |
279 | 279 | <references group="注" /> |
280 | 280 | !! result |
281 | | -<p>AAA<sup id="cite_ref-0" class="reference"><a href="#cite_note-0" title="">[参 1]</a></sup>BBB<sup id="cite_ref-1" class="reference"><a href="#cite_note-1" title="">[注 1]</a></sup>CCC<sup id="cite_ref-2" class="reference"><a href="#cite_note-2" title="">[参 2]</a></sup> |
| 281 | +<p>AAA<sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[参 1]</a></sup>BBB<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[注 1]</a></sup>CCC<sup id="cite_ref-2" class="reference"><a href="#cite_note-2">[参 2]</a></sup> |
282 | 282 | </p> |
283 | 283 | <dl><dt>refs |
284 | 284 | </dt></dl> |
285 | | -<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0" title="">↑</a> ref a</li> |
286 | | -<li id="cite_note-2"><a href="#cite_ref-2" title="">↑</a> ref c</li></ol> |
| 285 | +<ol class="references"><li id="cite_note-0"><a href="#cite_ref-0">↑</a> ref a</li> |
| 286 | +<li id="cite_note-2"><a href="#cite_ref-2">↑</a> ref c</li></ol> |
287 | 287 | <dl><dt>notes |
288 | 288 | </dt></dl> |
289 | | -<ol class="references"><li id="cite_note-1"><a href="#cite_ref-1" title="">↑</a> note b</li></ol> |
| 289 | +<ol class="references"><li id="cite_note-1"><a href="#cite_ref-1">↑</a> note b</li></ol> |
290 | 290 | |
291 | 291 | !! end |