[Done v1.6.0] email confirmation gets truncated on the < symbol in product names
It happens in the email confirmation that you receive once a customer orders products.
i have products with description like
Advantage Kitten <4kg 6 packs
the the symbol '<' triggers a truncation in the email so i have to log into the admin section to print off the order to fulfill.
this was identified in another version, is there a fix for this or should i go ahead and remove all the < symbols.
here is the older thread about this
http://www.zen-cart.com/showthread.p...l+confirmation
any help will be appreciated.
Thanks.
Re: email confirmation gets truncated on the < symbol
i use the latest version of zen cart, 1.5.1
Re: email confirmation gets truncated on the < symbol
The quick fix is to use a space, like this:
Advantage Kitten < 4kg 6 packs
instead of:
Advantage Kitten <4kg 6 packs
and that will fix it for now ...
Re: email confirmation gets truncated on the < symbol
Two options:
a) use the space, like Ajeh mentioned. That's the simplest.
b) or use the following code change, which will be included in v1.6.0:
Code:
if ($email_text == '') {
$email_text = str_replace(array('<br>','<br />'), "<br />\n", $block['EMAIL_MESSAGE_HTML']);
$email_text = str_replace('</p>', "</p>\n", $email_text);
$email_text = ($module != 'xml_record') ? htmlspecialchars(stripslashes(strip_tags($email_text)), ENT_COMPAT, CHARSET, TRUE) : $email_text;
} else {
$email_text = ($module != 'xml_record') ? strip_tags($email_text) : $email_text;
}
becomes:
Code:
if ($email_text == '') {
$email_text = str_replace(array('<br>','<br />'), "<br />\n", $block['EMAIL_MESSAGE_HTML']);
$email_text = str_replace('</p>', "</p>\n", $email_text);
$email_text = ($module != 'xml_record') ? zen_output_string_protected(stripslashes(strip_tags($email_text))) : $email_text;
} else if ($module != 'xml_record') {
$email_text = preg_replace("/<([^[:alpha:]])/", '@lt@\\1', $email_text);
$email_text = strip_tags($email_text);
$email_text = str_replace('@lt@', '<', $email_text);
}