Post by jc-piazza » Mon Nov 16, 2009 4:39 am

I have a product called Coffee Lover's Basket, but on both the order confirmation email and the order notification email the name comes out like this:

Coffee Lover's Basket

How do I fix that?

Also how do I force a line break between products? Multiple products show up all on one line in the confirmation emails.

New member

Posts

Joined
Mon Sep 07, 2009 3:23 am

Post by Xsecrets » Mon Nov 16, 2009 5:39 am

this is because everything is htlmencoded before it is put into the database. Is there really any purpose for this?

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by moggiex » Mon Nov 16, 2009 5:41 am

Xsecrets wrote:this is because everything is htlmencoded before it is put into the database. Is there really any purpose for this?
I would have thought so, mainly because HTML can contain lots of junk which could break pages being viewed, also if php was added, it could cause undesired effects.

Matt

Code: Select all

It was like that when I found it, honest!


User avatar
Active Member

Posts

Joined
Mon Nov 09, 2009 9:55 pm

Post by Xsecrets » Mon Nov 16, 2009 6:13 am

moggiex wrote:
Xsecrets wrote:this is because everything is htlmencoded before it is put into the database. Is there really any purpose for this?
I would have thought so, mainly because HTML can contain lots of junk which could break pages being viewed, also if php was added, it could cause undesired effects.

Matt
well I certainly understand sanitizing the input, but I see no need to htmlencode it. It ends up causing lots of problems like the one mentioned here. I would imagine you could do a htmldecode before putting it into the email.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Mon Nov 16, 2009 6:28 am

I agree with xsecrets... back in 0.x, one of the last main changes was to put proper html into the database instead of the entity characters.

so in the DB you can see '<table>' instead of '<table$gt;'. That fixes a lot of issues and need for encoding and decoding unnecessarily.

Was sad to see that change didn't make it to 1.x

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jc-piazza » Mon Nov 16, 2009 6:32 am

so is there any hope of a workaround?

New member

Posts

Joined
Mon Sep 07, 2009 3:23 am

Post by dashik » Mon Nov 16, 2009 8:18 am

I hope I'm understanding your problem correctly. Try using the html_entity_decode method....i've used it a few times with great results. Never with e-mails but you might be able to make it work.

Instead of:

Code: Select all

<?php echo $fieldname; ?>
Maybe try something like this:

Code: Select all

<?php echo html_entity_decode($fieldname); ?>
Hope that helps.

New member

Posts

Joined
Fri Jul 31, 2009 8:10 pm
Who is online

Users browsing this forum: No registered users and 265 guests