Closed freakpants closed 9 years ago
this fix seems to now result in spaces being escaped twice :/
Could you provide an example of this happening?
im using php to call the endpoint - generating an url that replaces spaces with plus signs. I fixed the issue for summoner names with single spaces (eg. silent Yuma) by replacing the plus sign with a space before it gets encoded. that however breaks players with 2 spaces. (BEV BUS Driver)
options.url = 'http://'+req.params.region+'.op.gg/summoner/userName='+encodeURIComponent(req.params.summoner.replace("+"," "));
is the fix i currently use - the correct way would probably to decode the summoner
I think you misunderstood me. I call the endpoint with an url like http://localhost:1337/euw/summoner/BEV+ROBINWASDIA
Node then receives "BEV+ROBINWASDIA" as the summoner name. There are no Spaces to be replaced, just the plus sign which php adds because otherwise i couldnt make a http request because a valid url doesnt have spaces. However - removing spaces on my end before calling the endpoint solves the issue as well. I hope I made myself clearer.
Should be fixed now
Presumably because special characters are not escaped in the url for the request to op.gg?
Example Summoner: Bêluga (euw)