/// <summary> /// Get string Attribute Value. It converts xhtml and if makeName = true it removes multiple white spaces and control sequences from string /// </summary> /// <param name="attrValue"></param> /// <param name="makeName">True: Remove multiple whitespaces, control characters</param> /// <returns></returns> protected string GetStringAttrValue(string attrValue, bool makeName = false) { // convert xhtml or use the origianl text var text = attrValue.Contains("http://www.w3.org/1999/xhtml") ? HtmlToText.ConvertReqIfXhtml(attrValue) : attrValue; return(makeName ? MakeNameFromString(text) : text); }