From 909b19f69bbed59bb8c0f6113624aaf904b804ae Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 22 Sep 2024 21:15:22 +0300 Subject: [PATCH] Fix `market_hash_name` being double encoded in `getCurrentPriceHistory` --- code.user.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code.user.js b/code.user.js index 8db81b5..08d7a13 100644 --- a/code.user.js +++ b/code.user.js @@ -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' }; @@ -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;