过滤htmljava代码(过滤htmljava代码).docVIP

  • 10
  • 0
  • 约6.11千字
  • 约 12页
  • 2017-08-02 发布于河南
  • 举报
过滤htmljava代码(过滤htmljava代码) / / 防html注入 public static string replacebadchar (string str) { if (! string.isnullorempty (str)) { str = regex.replace (str, @ ? s) / \ * *? \ * / , , regexoptions.ignorecase); / / 删除注释: / * * / str = regex.replace (str, @ ? s) script. *? *? / script , , regexoptions.ignorecase); / / 删除脚本 str = regex.replace (str, @ ? s) iframe. *? *? / iframe , , regexoptions.ignorecase); / / 过滤ifrmae str = regex.replace (str, @ ? s) style. *? *? / style) , , regexoptions.ignorecase); / / 需要把用户自己添加的样式都删除 / / link href = / scripts / popbox / css / styles.css rel = stylesh

文档评论(0)

1亿VIP精品文档

相关文档