过滤HTML脚本
来源:互联网 发布:美食软件 编辑:程序博客网 时间:2024/06/18 02:37
'函数名:FilterJS
'作 用:过滤HTML脚本
'参 数:strHTML ---- 被检测的HTML字串
'返回值:返回过滤后的HTML
'**************************************************
Function FilterJS(ByVal strHTML)
Dim objReg,strContent
If IsNull(strHTML) OR strHTML="" Then Exit Function
Set objReg=New RegExp
objReg.IgnoreCase =True
objReg.Global=True
objReg.Pattern="(&#)"
strContent=objReg.Replace(strHTML,"")
objReg.Pattern="(function|meta|value|window/.|script|js:|about:|file:|Document/.|vbs:|frame|cookie)"
strContent=objReg.Replace(strContent,"")
objReg.Pattern="(on(finish|mouse|Exit=|error|click|key|load|focus|Blur))"
strContent=objReg.Replace(strContent,"")
FilterJS=strContent
strContent=""
Set objReg=Nothing
End Function
'作 用:过滤HTML脚本
'参 数:strHTML ---- 被检测的HTML字串
'返回值:返回过滤后的HTML
'**************************************************
Function FilterJS(ByVal strHTML)
Dim objReg,strContent
If IsNull(strHTML) OR strHTML="" Then Exit Function
Set objReg=New RegExp
objReg.IgnoreCase =True
objReg.Global=True
objReg.Pattern="(&#)"
strContent=objReg.Replace(strHTML,"")
objReg.Pattern="(function|meta|value|window/.|script|js:|about:|file:|Document/.|vbs:|frame|cookie)"
strContent=objReg.Replace(strContent,"")
objReg.Pattern="(on(finish|mouse|Exit=|error|click|key|load|focus|Blur))"
strContent=objReg.Replace(strContent,"")
FilterJS=strContent
strContent=""
Set objReg=Nothing
End Function
0 0
- 过滤HTML脚本
- C#过滤Script脚本 过滤Html标记
- 过滤HTML/javascript等脚本
- html编辑及JS脚本过滤
- 正则表达式过滤HTML危险脚本
- 正则表达式过滤HTML危险脚本
- 正则表达式过滤HTML危险脚本
- java过滤html style script脚本
- LR HTTP/HTML脚本中过滤,不需要的请求
- html编辑及JS脚本过滤(优化版)
- preg_replace 过滤掉html代码中的script脚本
- LR HTTP/HTML脚本中过滤不需要的请求
- Loadrunner HTTP/HTML脚本中过滤不需要的请求
- loadrunner如何过滤http/html脚本中不需要的请求
- 过滤脚本
- HTML过滤
- 过滤html
- .net 字符串过滤标记(包括HTML,脚本,数据库关键字,特殊字符的源码)
- 勾股定理一日一证连载107
- 23种设计模式全解析
- node获取当前路径
- 线程中生产者和消费者
- 使用Ajax实现动态双组合功能(asp.net)
- 过滤HTML脚本
- 分类法在前端编程的应用
- Nodejs初学
- Bash On Windows ,每次用每次都不同
- 小部门经理的苦B一天
- sublime Text3在mac下设置窗口实现多标签
- PHP7,需要注意的地方
- 《剑指offer》-链表中环的入口结点
- The Very First Presentation