复制代码 代码如下:
'==============================
'格式化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 ="<script.+?/script>"
t0=Regs.Replace(t0,"")
Regs.pattern ="<iframe.+?/iframe>"
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
'==============================
'格式化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 ="<script.+?/script>"
t0=Regs.Replace(t0,"")
Regs.pattern ="<iframe.+?/iframe>"
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
标签:
格式化HTML
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“asp中格式化HTML函数代码 SDCMS加强版”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。