apostrophes print funny in email
when a user types in an apostrphe (in any of the fields) it displays very funny in the email. is there a way around this?
this is how its viewed in the email
can\\\'t
thanks
sam
when a user types in an apostrphe (in any of the fields) it displays very funny in the email. is there a way around this?
this is how its viewed in the email
can\\\'t
thanks
sam
Yes, i can see the issue you are reporting.
In the webassist/email folder there should be a file named waus_(the page name).php. If you open that page and look for this line of code:
$WA_MailObject = WAUE_SendMail($WA_MailObject,$MailAttachments,$MailBCC,$MailCC,$MailTo,$MailImportance,$MailFrom,$MailSubject,$MailBody,"waue_untitled_1");
and change it by updating $MailBody to stripslashes($MailBody)
This is a temporary work around. I will log a bug in our bug base and a fix will be included in the next dot release.
Just to be clear on what im supposed to do this would be the exact line I would replace the current code for:
$WA_MailObject = WAUE_SendMail($WA_MailObject,$MailAttachments,$Mai lBCC,$MailCC,$MailTo,$MailImportance,$MailFrom,$Ma ilSubject,stripslashes($MailBody),"waue_untitled_1");
CORRECT?
Thank you.
that worked in 1 location and not another. but i think the reason is different.
i have 1 spot where a user enters data. your solution fixed that area.
but i have another spot where the data is added to the cart from a database field.
for that i get this
puppy’s head
any idea how to solve this one?
thanks
sam
When you look in the database, does it show it as puppy’s head?
the database that is populating the field (on the add to cart page) shows "puppy's head".
when i add it to cart, i see it correctly, and also on the order confirmation page.
but the database field where the order details are saved it shows "puppy’s head".
also the change I made above for the mail body, if I make an edit to this email using the webassist wizard, will it revert the code and I will need to override it again?
yes, if you reenter the wizard then that change will be overwritten. However, the fix should be in the next dot release.
In regard to your other issue, it looks like have to escape single quotes when you insert the order to your database or check the encoding of your database and make sure that it is able to handle single quotes. My database encoding is set to utf8.
my database is utf-8.
but how does that affect how it displays in an email?
when it prints puppy’s head in the email, its using the cart fields.
ie thats a cart column field called "design"
so the confirmation page i have <?php echo $boogie->DisplayInfo("DesignChar")?>
and it prints/displays correctly.
but in the email i have the same code <?php echo $boogie->DisplayInfo("DesignChar")?>
and its displays with the error
do you have any idea how i can resolve this in the confirmation email?
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.