'安全字符过滤
2008-10-10 09:08
'安全字符过滤
Function tihuan(str)
sTemp=trim(str)
if sTemp="" or sTemp=Empty then Exit Function
sTemp=cstr(sTemp)
sTemp=LCase(sTemp)
sTemp=replace(sTemp,"or","or")
sTemp=replace(sTemp,"and","and")
sTemp=replace(sTemp,"insert","insert")
sTemp=replace(sTemp,"select","select")
sTemp=replace(sTemp,"delete","delete")
sTemp=replace(sTemp,"update","update")
sTemp=replace(sTemp,"drop","drop")
sTemp=replace(sTemp,"runcate","runcate")
sTemp=replace(sTemp,chr(9),"")
sTemp=replace(sTemp,chr(10),"<br>")
sTemp=replace(sTemp,chr(10)&chr(10),"</p><p>")
sTemp=replace(sTemp,chr(13),"")
sTemp=replace(sTemp,chr(32),"")
sTemp=replace(sTemp,chr(34),"")
sTemp=replace(sTemp,chr(39),"")
sTemp=replace(sTemp,",",",")
sTemp=replace(sTemp,"(","(")
sTemp=replace(sTemp,")",")")
sTemp=replace(sTemp,"=","=")
sTemp=replace(sTemp," "," ")
sTemp=replace(sTemp,"!"," !")
sTemp=replace(sTemp,"_","—")
sTemp=replace(sTemp,"+","+")
sTemp=replace(sTemp,"-","—")
sTemp=replace(sTemp,"*","×")
sTemp=replace(sTemp,"/","")
sTemp=replace(sTemp,"%","%")
sTemp=replace(sTemp,"&","&")
sTemp=replace(sTemp,"#","#")
sTemp=replace(sTemp,"\","")
sTemp=replace(sTemp,":",":")
sTemp=replace(sTemp,"@","@")
sTemp=replace(sTemp,">","〈")
sTemp=replace(sTemp,"<","〉")
sTemp=replace(sTemp,"<>","")
sTemp=replace(sTemp,"|","|")
sTemp=replace(sTemp,";",";")
sTemp=replace(sTemp,"""","”")
tihuan=sTemp
End Function