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

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 //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) wstring CMinecraftApp::EscapeHTMLString(const wstring& desc)
{ {
static std::unordered_map<wchar_t, wchar_t*> replacementMap = { static std::unordered_map<wchar_t, wchar_t*> replacementMap = {
{L'&', L"&amp;"}, {L'&', L"&amp;"},
{L'<', L"&lt;"}, {L'<', L"&lt;"},
{L'>', L"&gt;"}, {L'>', L"&gt;"},
{L'\"', L"&quot;"}, {L'\"', L"&quot;"},
{L'\'', L"&#39;"}, };
};
wstring finalString = L""; wstring finalString = L"";
for (int i = 0; i < desc.size(); i++) { for (int i = 0; i < desc.size(); i++) {