网站应用数据库相关 - 过滤类

 

(来自QQ群"MSDN 微软开发者网络",作者:DEVIN  )

 

ExpandedBlockStart.gif 代码
  1  using  System;
  2  using  System.Text;
  3  using  System.Text.RegularExpressions;
  4 
  5  namespace  Onfly.Common.Utility
  6  {
  7       ///  
  8       ///  过滤类
  9       ///  

 10       public   class  Filter
 11      {
 12           ///  
 13           ///  需要过滤的字符(多个以|相隔)
 14           ///  

 15           public   static  String keyWord  =   "" ;
 16           ///  
 17           ///  需要过滤的字符(多个以|相隔)
 18           ///  

 19           public   static  String KeyWord
 20          {
 21               get  {  return  keyWord; }
 22               set  { keyWord  =  value; }
 23          }
 24           ///  
 25           ///  过滤 javascript
 26           ///  

 27           ///   需过滤文本内容
 28           ///  
 29           public   static  String FilterScript(String content)
 30          {
 31              String commentPattern  =   @" (?'comment'

你可能感兴趣的:(网站应用数据库相关 - 过滤类)