steam-market-api-v2
steam-market-api-v2 copied to clipboard
Incorrect handling of '&' inside Steam URL
Hi there,
I noticed inside the file ItemListings.php
with the path /src/Requests/Steam/ItemListings.php
the constant URL
contains regular &
symbols.
Because of the current notation, the output of getUrl()
and other methods will be https://steamcommunity.com/market/listings/730/AK-47%20%7C%20Redline%20%28Field-Tested%29/render/?query=&start=0&count=1&country=US&language=english¤cy=1&filter=
with focus on the last part language=english¤cy=1
.
The original ¤cy
will turn into ¤cy
.
To fix this problem, you can use various ways looking at following post on Stackoverflow https://stackoverflow.com/questions/41335786/php-curren-string-turns-into-weird-symbol.
The way I fixed it, is using the HTML character entity &
, which can be placed just fine inside the URL: https://steamcommunity.com/market/listings/%s/%s/render/?query=%s&start=%s&count=%s&country=%s&language=%s&currency=%s&filter=%s
.
I hope this helps! Kind regards
Hello,
Thank you for your report. This is the first time I've seen such a problem in two years of the library's work.
Сan you tell me what version of php you are using and at what point this error occurred? How can i reproduce this error? Because on response in field url
it shows me the correct query with &
symbols.