@@ -330,7 +330,7 @@ angular.module('mm.core')
330330 // with white spaces, special characters...
331331 if ( path . indexOf ( fsRoot > - 1 ) ) {
332332 path = path . replace ( fsRoot , "" ) ;
333- path = encodeURIComponent ( decodeURIComponent ( path ) ) ;
333+ path = encodeURIComponent ( $mmText . decodeURIComponent ( path ) ) ;
334334 path = fsRoot + path ;
335335 }
336336
@@ -1468,14 +1468,14 @@ angular.module('mm.core')
14681468 // Treat elements with src (img, audio, video, ...).
14691469 media = div [ 0 ] . querySelectorAll ( 'img, video, audio, source, track' ) ;
14701470 angular . forEach ( media , function ( el ) {
1471- var src = paths [ decodeURIComponent ( el . getAttribute ( 'src' ) ) ] ;
1471+ var src = paths [ $mmText . decodeURIComponent ( el . getAttribute ( 'src' ) ) ] ;
14721472 if ( typeof src !== 'undefined' ) {
14731473 el . setAttribute ( 'src' , src ) ;
14741474 }
14751475
14761476 // Treat video posters.
14771477 if ( el . tagName == 'VIDEO' && el . getAttribute ( 'poster' ) ) {
1478- src = paths [ decodeURIComponent ( el . getAttribute ( 'poster' ) ) ] ;
1478+ src = paths [ $mmText . decodeURIComponent ( el . getAttribute ( 'poster' ) ) ] ;
14791479 if ( typeof src !== 'undefined' ) {
14801480 el . setAttribute ( 'poster' , src ) ;
14811481 }
@@ -1484,7 +1484,7 @@ angular.module('mm.core')
14841484
14851485 // We do the same for links.
14861486 angular . forEach ( div . find ( 'a' ) , function ( anchor ) {
1487- var href = decodeURIComponent ( anchor . getAttribute ( 'href' ) ) ,
1487+ var href = $mmText . decodeURIComponent ( anchor . getAttribute ( 'href' ) ) ,
14881488 url = paths [ href ] ;
14891489
14901490 if ( typeof url !== 'undefined' ) {
0 commit comments