07 2015 档案
asp.net c#过滤html代码,净化DIV SPAN等
摘要:public static string GetSafeHtml(string val) { if (string.IsNullOrEmpty(val)) { return string.Empt...
阅读全文
AntiXSS v4.0中Sanitizer.GetSafeHtmlFragment等方法将部分汉字编码为乱码的解决方案
摘要:AntiXSS v4.0中Sanitizer.GetSafeHtmlFragment等方法将部分汉字编码为乱码的解决方案以下代码为asp.net环境下,c#语言编写的解决方案.数据用Dictionary,而不是用其他的例如ArrayList存放,是为了速度.将Dictionary替换为HashTab...
阅读全文
ASP.NET POST XML JSON数据,发送与接收
摘要:接收端通过Request.InputStream读取:byte[] byts = new byte[Request.InputStream.Length];Request.InputStream.Read(byts,0,byts.Length);string req =System.Text.Enc...
阅读全文
C# 正则表达式,提取字符串
摘要:Regex.Match(n1,@"blog\.xxxx\.com/(.+)/blog_(\d+)\.html").Result("$2")
阅读全文
Chome v42 支持Java
摘要:从ver42开始,Chrome默认禁用了NPAPI。可以去chrome://flags/#enable-npapi开启,但是google很有可能在9月从代码中彻底移除NPAPIFirefox也有这个意图接下来只有IE坚守
阅读全文
浙公网安备 33010602011771号