标签:style blog color ar div amp log sql
/// <summary> /// 过滤SQL非法字符串 /// </summary> /// <param name="value"></param> /// <returns></returns> public static string Filter(string value) { if (string.IsNullOrEmpty(value)) return string.Empty; value = Regex.Replace(value, @";", string.Empty); value = Regex.Replace(value, @"‘", string.Empty); value = Regex.Replace(value, @"&", string.Empty); value = Regex.Replace(value, @"%20", string.Empty); value = Regex.Replace(value, @"--", string.Empty); value = Regex.Replace(value, @"==", string.Empty); value = Regex.Replace(value, @"<", string.Empty); value = Regex.Replace(value, @">", string.Empty); value = Regex.Replace(value, @"%", string.Empty); return value; }
记录下
标签:style blog color ar div amp log sql
原文地址:http://www.cnblogs.com/flyfish2012/p/3911224.html