| 7:32 pm on Dec 17, 2008 (gmt 0)|
probably mod_security running on the server as it will escape quotes and apostrophes
| 7:45 pm on Dec 17, 2008 (gmt 0)|
Hmm; I don't think it's safe to turn that off. What do you think I could do to work around it?
I just did a test to see what $_POST['message'] was sending across, and it was in fact escaped from the get go. PHPMailer doesn't have anything to do with it.
So hmm; need to find why my server adds the slashes automatically, and if it's safe to turn them off.
| 7:55 pm on Dec 17, 2008 (gmt 0)|
Not sure, maybe someone else will chime in as I do not know of a "fix".
| 7:59 pm on Dec 17, 2008 (gmt 0)|
Ah, hah! stripslashes() looks to do the trick. :) I also tested it with commas, quotations, and the mail is sent fine without errors.
Is there anything wrong with doing it this way?
| 11:05 am on Dec 18, 2008 (gmt 0)|
Sounds to me like magic_quotes is the culprit. You can check your server\'s setting on this using:
<?php echo get_magic_quotes_gpc(); ?>
As for stripslashes, there\'s nothing wrong with using it in these circumstances.