Htmlstring.Replace("<", "");
Htmlstring.Replace(">", "");
Htmlstring.Replace(">", "");
解决方案 »
- 怎么在MessageBox之前得到当前被激活窗口的句柄,关闭MessageBox之后再讲该窗口激活。
- 比较奇怪的问题???
- 项目功能已经完成,不过不是类库项目,怎么将项目输出为DLL
- 有没有把一个C#函数逆向工程为框图或流程图的工具
- 散分!!!大家上班快乐喔!!!顺便问个问题。
- 串行化与从流中读取字节数组的问题
- 想把 _子窗体或对话框_ 里的信息发到 _父窗体_ 的状态栏的panel里去.
- 我想预览 水晶报表 已经做了这些工作,还要做些什么工作?
- C#winform中,如何设置滚动条的颜色?
- 新手学习C#有什么快速入门的资料没?
- C#中调用脚本语言遇到的问题(急,请各位大虾指教!)
- 如何用C#实现获取sd卡序列号。。急!!!
{
Htmlstring = Regex.Replace(Htmlstring, @"<script[^>]*?>.*?</script>", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"<(.[^>]*)>", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"([\r\n])[\s]+", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"-->", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"<!--.*", "", RegexOptions.IgnoreCase); Htmlstring = Regex.Replace(Htmlstring, @"&(quot|#34);", "\"", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(amp|#38);", "&", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(lt|#60);", "<", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(gt|#62);", ">", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(nbsp|#160);", " ", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(iexcl|#161);", "\xa1", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(cent|#162);", "\xa2", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(pound|#163);", "\xa3", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(copy|#169);", "\xa9", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&#(\d+);", "", RegexOptions.IgnoreCase); Htmlstring.Replace("<", "");
Htmlstring.Replace(">", "");
Htmlstring.Replace("\r\n", "");
Htmlstring = HttpContext.Current.Server.HtmlEncode(Htmlstring).Trim(); return Htmlstring;
}