[thelist] DB error

aardvark roselli at earthlink.net
Fri Jul 13 17:34:55 CDT 2001


> From: "Kevin Stevens" <kjs at ratking.co.uk>
[...]
> an error which he suspected was due to the single quote he had used in
> an abbreviation. I tried this for myself and he is correct, I get the
> following error
[...]
> Any of you ASP bods out there know how to fix this?

stuff this at the very top of your script...

message = Trim(Request("message"))
message = Replace(message,"'","&#39;")
message = Replace(message,"%","&#37;")

parsing the '%' also helps minimize the chance someone will post 
ASP scripts...

others that may be useful:

message = Replace(message,"&","&amp;")
message = Replace(message,vbcrlf,"<br>")

etc...





More information about the thelist mailing list