Skip to content

Commit

Permalink
Encode article title in WikiWho API access
Browse files Browse the repository at this point in the history
The article title is not URL encoded when the WikiWho API URL is
being constructed (Api.js#getAjaxURL). This causes any article with
a question mark to have a URL containing query parameters starting
wherever the question mark is.
  • Loading branch information
ChlodAlejandro committed Apr 1, 2024
1 parent b46af9f commit 3532678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Api {
this.url,
subdomain,
'whocolor/v1.0.0-beta',
this.mwConfig.get( 'wgPageName' ),
encodeURIComponent( this.mwConfig.get( 'wgPageName' ) ),
// Always include the revision ID, to make sure we are always asking for
// the correct revision, whether the page was just edited, or, whether the
// page was edited by someone else while we were looking at the current page
Expand Down

0 comments on commit 3532678

Please sign in to comment.