jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/384501 )

Change subject: Add workaround for T178184
......................................................................


Add workaround for T178184

Wikibase incorrectly escapes titles when assembling the Commons map URI.
This fixes the most common error, though I’m not sure if it covers all
possible incorrect escapings.

Bug: T178184
Change-Id: Iec65c448ea857e386a1da9027e9851de2966e20e
---
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index d7d4b95..b9cbd3c 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -484,6 +484,7 @@
                // rewrite data URL to API because the data URL doesn’t support 
CORS at all
                var titleURI = url.match( 
/^http:\/\/commons.wikimedia.org\/data\/main\/(.*)$/ )[1],
                        title = decodeURIComponent( titleURI );
+               title = title.replace( /\+/g, ' ' ); // TODO workaround for 
T178184, remove when possible
                return $.getJSON(
                        'https://commons.wikimedia.org/w/api.php',
                        {

-- 
To view, visit https://gerrit.wikimedia.org/r/384501
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec65c448ea857e386a1da9027e9851de2966e20e
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to