Merge pull request #1853 from seltonmt012/fix/discord-presence-placeholders

fix(es_extended/client/modules/adjustments): escape placeholder values before substitution
This commit is contained in:
_Not_
2026-08-07 22:07:09 -05:00
committed by GitHub
@@ -175,11 +175,11 @@ function Adjustments:ReplacePlaceholders(text)
local success, result = pcall(cb)
if not success then
error(("Failed to execute placeholder: ^5%s^7\n%s"):format(placeholder, result))
print(("[^1ERROR^7] Failed to execute placeholder: ^5%s^7\n%s"):format(placeholder, result))
result = "Unknown"
end
text = text:gsub(("{%s}"):format(placeholder), tostring(result))
text = text:gsub(("{%s}"):format(placeholder), (tostring(result):gsub("%%", "%%%%")))
end
return text
end