Skip to content

Commit 3532678

Browse files
Encode article title in WikiWho API access
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.
1 parent b46af9f commit 3532678

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class Api {
126126
this.url,
127127
subdomain,
128128
'whocolor/v1.0.0-beta',
129-
this.mwConfig.get( 'wgPageName' ),
129+
encodeURIComponent( this.mwConfig.get( 'wgPageName' ) ),
130130
// Always include the revision ID, to make sure we are always asking for
131131
// the correct revision, whether the page was just edited, or, whether the
132132
// page was edited by someone else while we were looking at the current page

0 commit comments

Comments
 (0)