替换HTML代码

作者:袖梨 2022-07-02
将一些HTML替换掉
eg:
strContent=strContent.Replace("&","&amp");
strContent=strContent.Replace("'","''");
strContent=strContent.Replace("<","&lt");
strContent=strContent.Replace(">","&gt");
strContent=strContent.Replace("chr(60)","&lt");
strContent=strContent.Replace("chr(37)","&gt");
strContent=strContent.Replace(""","&quot");
strContent=strContent.Replace(";",";");
strContent=strContent.Replace(" ","
");
strContent=strContent.Replace(" "," ");
return strContent;

相关文章

精彩推荐