Copy Code code as follows:
'==============================
' Format Html,sdcms enhanced version
'==============================
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
' Filter out Js,iframe
Regs.pattern = "<script.+?/script>"
T0=regs.replace (t0, "")
Regs.pattern = "<iframe.+?/iframe>"
T0=regs.replace (t0, "")
' And then filter other
Regs.pattern= "<.+?>"
Set Matches=regs.execute (t0)
IF matches.count>0 Then
For the 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