Python语言技术文档

微信小程序技术文档

php语言技术文档

jsp语言技术文档

asp语言技术文档

C#/.NET语言技术文档

html5/css技术文档

javascript

点击排行

您现在的位置:首页 > 技术文档 > asp函数/类库

asp中格式化HTML函数代码_SDCMS加强版

来源:中文源码网    浏览:315 次    日期:2024-04-27 16:21:27
【下载文档:  asp中格式化HTML函数代码_SDCMS加强版.txt 】


asp中格式化HTML函数代码 SDCMS加强版
复制代码 代码如下:'============================== '格式化HTML,SDCMS加强版 '============================== Function Nohtml(ByVal t0) IF Len(t0)=0 Or IsNull(t0) Then Nohtml="" Exit Function End IF Dim Regs,Matches,Match Set Regs=New Regexp Regs.Ignorecase=True Regs.Global=True '过滤掉JS,Iframe Regs.pattern ="" t0=Regs.Replace(t0,"") Regs.pattern ="" t0=Regs.Replace(t0,"") '再过滤其他 Regs.Pattern="<.+?>" Set Matches=Regs.Execute(t0) IF Matches.Count>0 Then For Each Match In Matches t0=Replace(t0,Match.value,"") Next End IF t0=Replace(t0," ","") t0=Replace(t0,vbCrLf,"") t0=Replace(t0," ","") t0=Replace(t0," ","") t0=Replace(t0,CHR(9),"") t0=Replace(t0,CHR(13),"") t0=Replace(t0,CHR(10),"") t0=Replace(t0,CHR(22),"") Set Regs=Nothing Nohtml=t0 End Function

相关内容