ArcGISPortalViewer.Popup.Converters.HtmlToTextConverter.ToStrippedHtmlText C# (CSharp) Method

ToStrippedHtmlText() static private method

static private ToStrippedHtmlText ( object input ) : string
input object
return string
        internal static string ToStrippedHtmlText(object input)
        {
            string retVal = string.Empty;

            if (input != null)
            {
                // Replace HTML line break tags with $LINEBREAK$:
                retVal = Regex.Replace(input as string, htmlLineBreakRegex, "$LINEBREAK$", RegexOptions.IgnoreCase);
                // Remove the rest of HTML tags:
                retVal = Regex.Replace(retVal, htmlStripperRegex, string.Empty);
            #if !SILVERLIGHT
                // In WPF all { characters must appear after a \ in XAML:
                retVal = retVal.Replace("{", "\\{");
            #endif
            }

            return retVal;
        }