Remove HTML escape for apostrophe in chat (#1541)

Fixes #1537
This commit is contained in:
ModMaker101 2026-04-26 13:22:51 -04:00 committed by GitHub
parent e5351b51c0
commit 3ab29ec26e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6599,13 +6599,12 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado
//found list of html escapes at https://stackoverflow.com/questions/7381974/which-characters-need-to-be-escaped-in-html
wstring CMinecraftApp::EscapeHTMLString(const wstring& desc)
{
static std::unordered_map<wchar_t, wchar_t*> replacementMap = {
{L'&', L"&amp;"},
{L'<', L"&lt;"},
{L'>', L"&gt;"},
{L'\"', L"&quot;"},
{L'\'', L"&#39;"},
};
static std::unordered_map<wchar_t, wchar_t*> replacementMap = {
{L'&', L"&amp;"},
{L'<', L"&lt;"},
{L'>', L"&gt;"},
{L'\"', L"&quot;"},
};
wstring finalString = L"";
for (int i = 0; i < desc.size(); i++) {