Function TextEncode(ByVal Str)
If Trim(Str) = "" Or IsNull(Str) Then TextEncode = "": Exit Function
Str = Replace(Str, ">", ">")
Str = Replace(Str, "<", "<")
Str = Replace(Str, Chr(32), " ")
Str = Replace(Str, Chr(9), " ")
Str = Replace(Str, Chr(34), """)
Str = Replace(Str, Chr(39), "'")
Str = Replace(Str, Chr(13), "")
Str = Replace(Str, Chr(10), "
")
TextEncode = Str
End Function
输出文章内容
Response.Write TextEncode(文章内容字段)
希望对你能有所帮助。
你存这些文本的时候没有加格式么?