Poke has uploaded a new change for review. https://gerrit.wikimedia.org/r/164894
Change subject: Add support for apostrophes in titles ...................................................................... Add support for apostrophes in titles The href attribute is urlencoded, so (for example) apostrophes appear as %27. This causes the API request to contain the percent-encoded name instead of the the actual file name; thus, the API request fails and the overlay will not work. To fix this, decode the title from the URL first to get a valid title representation for the API. Change-Id: I00f96c9c870b878ca25792a878f3ceb7e9aefacc --- M formats/gallery/resources/ext.srf.gallery.overlay.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticResultFormats refs/changes/94/164894/1 diff --git a/formats/gallery/resources/ext.srf.gallery.overlay.js b/formats/gallery/resources/ext.srf.gallery.overlay.js index 430cb34..b9b21ae 100644 --- a/formats/gallery/resources/ext.srf.gallery.overlay.js +++ b/formats/gallery/resources/ext.srf.gallery.overlay.js @@ -104,7 +104,7 @@ util.spinner.create( { context: $this, selector: 'img' } ); // Re-assign image url - util.getImageURL( { 'title': ns + ':' + title[1] }, + util.getImageURL( { 'title': ns + ':' + decodeURIComponent( title[1] ) }, function( url ) { if ( url === false ) { image.attr( 'href', '' ); // Release thumb image -- To view, visit https://gerrit.wikimedia.org/r/164894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00f96c9c870b878ca25792a878f3ceb7e9aefacc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticResultFormats Gerrit-Branch: master Gerrit-Owner: Poke <patrickwesterh...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits