forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Flagg on November 26, 2005, 11:57:29 am
-
I'm running 1.4.2 coppermine and I have an issue with emails.
The title of the coppermine gallery is "Richard & Vivian"
When sending emails. eg password reminders, welcome emails, ecards etc. the email subject for example has an string & in it instead of &
For example: "Richard & Vivians Fotoalbums - New password request"
I think this is because of the general encoding, imho it should not encode in emails. As a wokaround i made the following change to mailer.inc.php at line 80
Original code
$mail->FromName = $sender_name;
$mail->Subject = $subject;
Replaced with new code
$sender_name = str_replace("&", "&", $sender_name);
$mail->FromName = $sender_name;
$subject = str_replace("&", "&", $subject);
$mail->Subject = $subject;
Flagg (aka Richard)
http://www.richardoe.nl
-
Bumping thread to top. Issue still open?
-
merging Titooy's report with another similar one.
-
I split Titooy's report and merged it with a more related thread.
I confirmed this issue in 1.4.9 from svn.
I think the answer is in modifying include/mailer.inc.php by adding html_entity_decode() in the right place(s). Problem is I can't tell where.
-
I guess it's the same location as Flagg's suggested fix.
FIND:
$mail->FromName = $sender_name;
$mail->Subject = $subject;
$mail->Body = $msg_body;
REPLACE with:
$mail->FromName = html_entity_decode($sender_name);
$mail->Subject = html_entity_decode($subject);
$mail->Body = html_entity_decode($msg_body);
I'm guessing that that is all that needs to be replace. At least when I tested with the forgot password form, it looked fine. I didn't know what else to test with. The ecard email worked fine without the fix.
This needs to be confirmed with another dev.
-
Since the related bug (http://forum.coppermine-gallery.net/index.php?topic=33536.0) was OK'd, is the fix here ok?
-
Guess so - this thread is identical to the other one that got fixed. Marking this one accordingly.