Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect handling of '&' inside Steam URL #15

Open
tomniekerken opened this issue Jun 16, 2023 · 1 comment
Open

Incorrect handling of '&' inside Steam URL #15

tomniekerken opened this issue Jun 16, 2023 · 1 comment

Comments

@tomniekerken
Copy link

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 &currency 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

@Allyans3
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants