- 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
您可能关注的文档
- 招投标指南(Bidding Guide).doc
- 找规律(2)(2)(Finding the law (2) (2)).doc
- 折减选择、振型个数(Reduction selection and mode number).doc
- 整蛊邻居2攻略(Our neighbor 2 Raiders).doc
- 庄园时代成长任务(Manor age growth mission).doc
- 抓好公路路面工程管理与质量管理的体会(Experience of highway pavement management and quality management).doc
- 总烧行管维修(Total fire line maintenance).doc
- 座便器安装规范及注意事项(Toilet installation specifications and matters needing attention).doc
- 左190自定义模块模板(Left 190 custom module templates).doc
- 跑跑卡丁车道具小技巧(Karting skills).doc
原创力文档

文档评论(0)