Quote:
Originally Posted by kh99
Maybe, I'm not sure. But addslashes() escapes ', ", \, and null characters. addcslashes() escapes the characters you list as the second parameter, so I think addcslahses() will work if you provide the correct list of chars. This code is taking the setting text and using it as a double-quoted string. So I know double quotes need to be escaped, but I'm not sure what else might need to be. I don't think single quotes need to be, and I think if you escaped backslashes you couldn't use things like \n in the text.
|
That was my fault, I'd never actually seen or used addcslashes, so I was thinking it was a typo. My bad.