File with percentage sign in file name does not open

Invoking encodeURI on the imageFileTitle makes sure that a "%" character is properly URL-escaped.

Bug: T337540
Change-Id: I538b7f813b546134848e93cea4744de8f4da9e90
This commit is contained in:
Simon Legner 2024-02-07 20:13:35 +01:00
parent 993936420c
commit ef53ab0834

View file

@ -43,6 +43,6 @@
* @return {string} the location hash
* @member mw.mmv
*/
getMediaHash: ( imageFileTitle ) => `#/media/${imageFileTitle}`
getMediaHash: ( imageFileTitle ) => `#/media/${encodeURI( imageFileTitle )}`
};
}() );