chrisvmarle
04-25-2003, 08:50 PM
I have a quote-system on my page where visitors can post some comment. I want to filter the characters that might give problems like "
The var is later used in javascript:
startscroll("form01.vq","<?=$vqs?>")
So if $vqs contains a "
the JS will look like this:
startscroll("form01.vq","test quote with " in it")
Wich will result in a JS-error...
Is there a PHP-function to strip there characters?
I've tried htmlspecialchars but then the quote looks like
test quote with " in it
Thanks
Mzzl, Chris
The var is later used in javascript:
startscroll("form01.vq","<?=$vqs?>")
So if $vqs contains a "
the JS will look like this:
startscroll("form01.vq","test quote with " in it")
Wich will result in a JS-error...
Is there a PHP-function to strip there characters?
I've tried htmlspecialchars but then the quote looks like
test quote with " in it
Thanks
Mzzl, Chris