Copy codeThe Code is 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 and Iframe
Regs. pattern = "<script. +? /Script>"
T0 = Regs. Replace (t0 ,"")
Regs. pattern = "<iframe. +? /Iframe>"
T0 = Regs. Replace (t0 ,"")
'Filter other
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