r77227 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77226‎ | r77227 | r77228 >
Date:10:01, 24 November 2010
Author:dale
Status:deferred
Tags:
Comment:
fixed iframe share link
Modified paths:
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
@@ -1623,7 +1623,7 @@
16241624 var request = {
16251625 'prop': 'imageinfo',
16261626 // In case the user added File: or Image: to the apiKey:
1627 - 'titles': 'File:' + this.apiTitleKey.replace( /^(File:|Image:)/ , '' ),
 1627+ 'titles': 'File:' + unescape( this.apiTitleKey ).replace( /^(File:|Image:)/ , '' ),
16281628 'iiprop': 'url|size|dimensions|metadata',
16291629 'iiurlwidth': _this.width,
16301630 'redirects' : true // automatically resolve redirects
@@ -2483,9 +2483,11 @@
24842484 // If using a gadget do the new embed format:
24852485 // @@NOTE this should be factored out into mediaWiki gadget helper
24862486 if( typeof wgServer != 'undefined' && typeof mwCheckForGadget != 'undefined' ){
2487 - var iframeUrl = wgServer + wgArticlePath.replace( /\$1/, wgPageName ) +
2488 - '?' + mw.getConfig( 'Mw.AppendWithJS' ) +
2489 - '&embedplayer=yes';
 2487+ var iframeUrl = wgServer +
 2488+ wgArticlePath.replace( /\$1/, 'File:' +
 2489+ unescape( this.apiTitleKey ).replace( /^(File:|Image:)/ , '' ) ) +
 2490+ '?' + mw.getConfig( 'Mw.AppendWithJS' ) +
 2491+ '&embedplayer=yes';
24902492 } else {
24912493 // old style embed:
24922494 var iframeUrl = mw.getMwEmbedPath() + 'mwEmbedFrame.php?';

Status & tagging log