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

marketSearch breaks on weirdly named items #198

Open
yaneony opened this issue Apr 10, 2018 · 2 comments
Open

marketSearch breaks on weirdly named items #198

yaneony opened this issue Apr 10, 2018 · 2 comments

Comments

@yaneony
Copy link

yaneony commented Apr 10, 2018

As already reported on Discord, there are some strange named items on the market, for example this one:
https://steamcommunity.com/market/listings/570/Autograph%3A%20p%DA%29r

It seems, this one contains some weird character and "decodeURIComponent" can't handle this one.

An error occurs here, on this line https://github.com/DoctorMcKay/node-steamcommunity/blob/master/classes/CMarketSearchResult.js#L85

Message:

URIError: URI malformed
    at decodeURIComponent (<anonymous>)
@yaneony
Copy link
Author

yaneony commented Apr 13, 2018

Wrapping line 68 in try/catch works fine.

        try {
          results.push(new CMarketSearchResult($(rows[i])));
        } catch (error) {

        }

@Preport
Copy link

Preport commented Jul 21, 2020

As already reported on Discord, there are some strange named items on the market, for example this one:
https://steamcommunity.com/market/listings/570/Autograph%3A%20p%DA%29r

It seems, this one contains some weird character and "decodeURIComponent" can't handle this one.

An error occurs here, on this line https://github.com/DoctorMcKay/node-steamcommunity/blob/master/classes/CMarketSearchResult.js#L85

Message:

URIError: URI malformed
    at decodeURIComponent (<anonymous>)

Market link you've provided seems to be broken as well there is no such item called "Autograph: p�)r" problem could be from somewhere else.

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