apostrophe problem in email sent

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
stopmotion24
Posts: 1
Joined: Thu Aug 18, 2005 11:07 pm

apostrophe problem in email sent

Post 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
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Post 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,
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply