问题:
1、客服端要过滤那些字符? (“。”“、”这些字符要过滤吗  )
2、服务器要过滤、调整哪些字符?
最好有相关代码,或文章。

解决方案 »

  1.   

    100分求站内全文搜索的asp.net(C#)代码?
      

  2.   

    要防止SQL和JS注入,使用SQL SERVER的全文搜索
    public static string InputText(string text, int maxLength) 
        { 
            text = Regex.Replace(text, "[\\s]{2,}", " "); 
            text = Regex.Replace(text, "( <[b|B][r|R]/*>)+|( <[p|P](.|\\n)*?>)", "\n"); 
            text = Regex.Replace(text, "(\\s*&[n|N][b|B][s|S][p|P];\\s*)+", " "); 
            text = Regex.Replace(text, " <(.|\\n)*?>", string.Empty); 
            text = text.Replace("'", "''"); 
            return text; 
        } 
    html=Regex.Replace(html,@" <[^>]+>",  " ",  RegexOptions.IgnoreCase); 
      

  3.   

    我是用SqlParameter实例化参数,还要用以上这些代码吗?
      

  4.   

    我是用SqlParameter实例化参数,还要用以上这些代码吗?