r75044 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75043‎ | r75044 | r75045 >
Date:21:30, 19 October 2010
Author:hartman
Status:deferred
Tags:
Comment:
encodeURIComponent the title of the srt file that needs to be loaded.
Modified paths:
  • /branches/MwEmbedStandAlone/modules/TimedText/mw.TimedText.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/TimedText/mw.TimedText.js
@@ -271,16 +271,16 @@
272272 // Try to insert the track source:
273273 var textElm = document.createElement( 'track' );
274274 $j( textElm ).attr({
275 - 'category' : 'SUB',
 275+ 'category' : 'SUB',
276276 'srclang' : textSource.srclang,
277 - 'type' : _this.timedTextExtMime[ textSource.extension ],
 277+ 'type' : _this.timedTextExtMime[ textSource.extension ],
278278 'titleKey' : textSource.titleKey
279279 });
280280
281281 // Build the url for downloading the text:
282282 $j( textElm ).attr('src',
283283 _this.textProvider.apiUrl.replace('api.php', 'index.php?title=') +
284 - textSource.titleKey + '&action=raw&ctype=text/x-srt'
 284+ encodeURIComponent( textSource.titleKey ) + '&action=raw&ctype=text/x-srt'
285285 );
286286
287287 // Add a title

Status & tagging log