virtual protected string Escape(string value)
{
// added null check - you can't call .Replace on a null
// string, but you can just return null as a string
if (value != null)
{
// NOTE: fixed a bug that caused text parsing to fail on
// programmatically entered strings.
// SEE unit test SERIALIZE25().
value = value.Replace("\r\n", @"\n");
value = value.Replace("\r", @"\n");
value = value.Replace("\n", @"\n");
value = value.Replace(";", @"\;");
value = value.Replace(",", @"\,");
}
return value;
}