Page 1 of 1

apostrophe problem in email sent

Posted: Fri Aug 19, 2005 12:33 am
by stopmotion24
Script URL: PRIVATE
Version of script: 093
Version of PHP: 4.3.2
Hosting company: my own server
Have you searched THIS FORUM for your problem: yes
(if not please do before posting)
If so, what terms did you try: apostrophe

When ever a user used and apostrophe in the subject. The email that they recieved back and the admin email would have / (a slash) right infront of the apostrophe '.

My fix was to do this:

I edited: submit_ticket.php

orginal line of code:

Code: Select all

$message=str_replace('%%SUBJECT%%',$subject,$message);
To this: I added the stripslashes() on the subject$ :

Code: Select all

$message=str_replace('%%SUBJECT%%',stripslashes($subject),$message);
I also edited this same line for where it sends and email to the admin's

http://us3.php.net/stripslashes info on stripslashes

Just thought I'd share this, not sure if anyone else had this problem.

Great script thank you!

stopmotion24

Posted: Fri Aug 19, 2005 10:20 am
by Klemen
Hi,

You are right, the message is cleared of slashes but the subject is not. Thanks for letting me know, I will fix it for the next update.

Regards,