mirror of
https://github.com/znc/znc.git
synced 2026-08-05 00:13:22 +02:00
Escape message tag values (ref #684)
This commit is contained in:
+4
-2
@@ -484,7 +484,9 @@ MCString CUtils::GetMessageTags(const CString& sLine) {
|
||||
|
||||
MCString mssTags;
|
||||
for (VCString::const_iterator it = vsTags.begin(); it != vsTags.end(); ++it) {
|
||||
mssTags[it->Token(0, false, "=", true)] = it->Token(1, true, "=", true);
|
||||
CString sKey = it->Token(0, false, "=", true);
|
||||
CString sValue = it->Token(1, true, "=", true);
|
||||
mssTags[sKey] = sValue.Escape(CString::EMSGTAG, CString::CString::EASCII);
|
||||
}
|
||||
return mssTags;
|
||||
}
|
||||
@@ -504,7 +506,7 @@ void CUtils::SetMessageTags(CString& sLine, const MCString& mssTags) {
|
||||
}
|
||||
sTags += it->first;
|
||||
if (!it->second.empty())
|
||||
sTags += "=" + it->second;
|
||||
sTags += "=" + it->second.Escape_n(CString::EMSGTAG);
|
||||
}
|
||||
sLine = "@" + sTags + " " + sLine;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user