/// <summary> /// Replace invalid XML characters in text string /// </summary> /// <param name="textData">the XML text input string</param> /// <param name="mask">the string to use in place of invalid characters</param> /// <returns>A string that does not contain invalid XML characters.</returns> /// <remarks> /// <para> /// Certain Unicode code points are not allowed in the XML InfoSet, for /// details see: <a href="http://www.w3.org/TR/REC-xml/#charsets">http://www.w3.org/TR/REC-xml/#charsets</a>. /// </para> /// <para> /// This method replaces any illegal characters in the input string /// with the mask string specified. /// </para> /// </remarks> public static string MaskXmlInvalidCharacters(string textData, string mask) { #if !UNITY_4_3 return(INVALIDCHARS.Replace(textData, mask)); #else return(textData); #endif }
/// <summary> /// Replace invalid XML characters in text string /// </summary> /// <param name="textData">the XML text input string</param> /// <param name="mask">the string to use in place of invalid characters</param> /// <returns>A string that does not contain invalid XML characters.</returns> /// <remarks> /// <para> /// Certain Unicode code points are not allowed in the XML InfoSet, for /// details see: <a href="http://www.w3.org/TR/REC-xml/#charsets">http://www.w3.org/TR/REC-xml/#charsets</a>. /// </para> /// <para> /// This method replaces any illegal characters in the input string /// with the mask string specified. /// </para> /// </remarks> public static string MaskXmlInvalidCharacters(string textData, string mask) { return(INVALIDCHARS.Replace(textData, mask)); }