Skip to content

Commit

Permalink
Escape view in market links
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw authored Dec 23, 2024
1 parent 4d9e902 commit a1906b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@
const ownerActions = $(`#${item_info_id}_item_owner_actions`);

// Move market link to a button
ownerActions.append(`<a class="btn_small btn_grey_white_innerfade" href="/market/listings/${appid}/${market_hash_name}"><span>View in Community Market</span></a>`);
ownerActions.append(`<a class="btn_small btn_grey_white_innerfade" href="/market/listings/${appid}/${encodeURIComponent(market_hash_name)}"><span>View in Community Market</span></a>`);
$(`#${item_info_id}_item_market_actions > div:nth-child(1) > div:nth-child(1)`).hide();

// ownerActions is hidden on other games' inventories, we need to show it to have a "Market" button visible
Expand Down

0 comments on commit a1906b1

Please sign in to comment.