public static string EscapeXML(this string s) { return !SecurityElement.IsValidText(s) ? SecurityElement.Escape(s) : s; }