mirror of
https://github.com/Kopano-dev/kopano-ol-extension.git
synced 2023-10-10 13:37:40 +02:00
[KOE-96] Added XML escaping to OOF messages.
This commit is contained in:
parent
ab909dc4c5
commit
4b0df802c4
@ -266,7 +266,7 @@ namespace Acacia.Utils
|
||||
s.Append("<Enabled>1</Enabled>");
|
||||
s.Append("<BodyType>Text</BodyType>");
|
||||
s.Append("<ReplyMessage>");
|
||||
s.Append(_value.Message[i].Message); // TODO: escaping
|
||||
s.Append(_value.Message[i].Message.EncodeXML());
|
||||
s.Append("</ReplyMessage>");
|
||||
}
|
||||
}
|
||||
|
@ -77,6 +77,8 @@ namespace Acacia.Utils
|
||||
|
||||
#endregion
|
||||
|
||||
#region XML
|
||||
|
||||
public static string ToXMLString(this XmlNode xml)
|
||||
{
|
||||
using (var stringWriter = new StringWriter())
|
||||
@ -88,6 +90,13 @@ namespace Acacia.Utils
|
||||
}
|
||||
}
|
||||
|
||||
public static string EncodeXML(this string s)
|
||||
{
|
||||
return System.Security.SecurityElement.Escape(s);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Resources
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user