asp html转换字符程序
发布时间:2015-06-05 来源:查字典编辑
摘要:这是一个简单的安全过滤函数了,把html转换字符转换成可以显示的文本了FunctionHTMLDecode(reString)DimStr:...
这是一个简单的安全过滤函数了,把html 转换字符转换成可以显示的文本了
Function HTMLDecode(reString)
Dim Str:Str=reString
If Not IsNull(Str) Then
Str = Replace(Str, "&", "&")
Str = Replace(Str, ">", ">")
Str = Replace(Str, "<", "<")
Str = Replace(Str, " ", CHR(32))
Str = Replace(Str, " ", CHR(9))
Str = Replace(Str, " ", CHR(9))
Str = Replace(Str, """, CHR(34))
Str = Replace(Str, "'", CHR(39))
Str = Replace(Str, "", CHR(13))
Str = Replace(Str, "<br>", CHR(10))
HTMLDecode = Str
End If
End Function