Skip to content

Commit

Permalink
Fix market_hash_name being double encoded in getCurrentPriceHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw authored Sep 22, 2024
1 parent 644bc1c commit 909b19f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@

// Get the item name id from a market item.
SteamMarket.prototype.getCurrentMarketItemNameId = function(appid, market_name, callback) {
const url = `${window.location.origin}/market/listings/${appid}/${market_name}`;
const url = `${window.location.origin}/market/listings/${appid}/${escapeURI(market_name)}`;

const options = { method: 'GET' };

Expand Down Expand Up @@ -986,19 +986,19 @@
}

if (item.description != null && item.description.market_hash_name != null) {
return escapeURI(item.description.market_hash_name);
return item.description.market_hash_name;
}

if (item.description != null && item.description.name != null) {
return escapeURI(item.description.name);
return item.description.name;
}

if (item.market_hash_name != null) {
return escapeURI(item.market_hash_name);
return item.market_hash_name;
}

if (item.name != null) {
return escapeURI(item.name);
return item.name;
}

return null;
Expand Down

0 comments on commit 909b19f

Please sign in to comment.