ASP 转换HTML特殊字符
1 Function HtmlDecode(ByVal s) 2 If Has(s) Then 3 s = regReplace(s, "<br\s*/?\s*>", vbCrLf) 4 s = Replace(s, " ", Chr(9)) 5 s = Replace(s, """, Chr(34)) 6 s = Replace(s, " ", Chr(32)) 7 s = Replace(s, "'", Chr(39)) 8 s = Replace(s, "'", Chr(39)) 9 s = Replace(s, ">", ">") 10 s = Replace(s, "<", "<") 11 s = Replace(s, "&", Chr(38)) 12 s = Replace(s, "&", Chr(38)) 13 s = Replace(s, "×", "×") 14 s = Replace(s, "÷", "÷") 15 s = Replace(s, "¼", "¼") 16 s = Replace(s, "½", "½") 17 s = Replace(s, "¾", "¾") 18 s = Replace(s, "±", "±") 19 s = Replace(s, "«", "«") 20 s = Replace(s, "»", "»") 21 s = Replace(s, "©", "©") 22 s = Replace(s, "®", "®") 23 s = Replace(s, "°", "°") 24 End If 25 HtmlDecode = s 26 End Function