/// <summary> /// 时间:2018年7月18日09:04:18 /// 说明:清理Html标签 /// 作者:成建军 /// </summary> /// <param name="html"></param> /// <returns></returns> public static string ClearHtml(string html) { try { if (string.IsNullOrEmpty(html)) return html; while (html.IndexOf("<") >= 0) { var startIndex = html.IndexOf("<"); var endIndex = html.IndexOf(">") + 1; if (endIndex > startIndex) html = html.Remove(startIndex, endIndex - startIndex); } } catch (Exception) { return html; } return html; }