Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js |
— | — | @@ -328,19 +328,19 @@ |
329 | 329 | $j( _this.titleInput ).data( 'valid', false ); |
330 | 330 | |
331 | 331 | // result is NOT unique |
332 | | - var title; |
| 332 | + var titleString; |
333 | 333 | try { |
334 | | - title = new mw.Title( result.title ).setNamespace( 'file' ); |
| 334 | + titleString = new mw.Title( result.title ).setNamespace( 'file' ).toString(); |
335 | 335 | } catch ( e ) { |
336 | 336 | // unparseable result from unique test? |
337 | | - title = '[unparseable name]'; |
| 337 | + titleString = '[unparseable name]'; |
338 | 338 | } |
339 | 339 | |
340 | 340 | var errHtml; |
341 | 341 | if ( result.href ) { |
342 | | - errHtml = gM( 'mwe-upwiz-fileexists-replace-on-page', title.toString(), result.href ); |
| 342 | + errHtml = gM( 'mwe-upwiz-fileexists-replace-on-page', titleString, $j( '<a />' ).attr( { href: result.href, target: '_blank' } ) ); |
343 | 343 | } else { |
344 | | - errHtml = gM( 'mwe-upwiz-fileexists-replace-no-link', title.getNameText() ); |
| 344 | + errHtml = gM( 'mwe-upwiz-fileexists-replace-no-link', titleString ); |
345 | 345 | } |
346 | 346 | |
347 | 347 | _this.$form.find( 'label[for=' + _this.titleId + ']' ) |