Remove <br /> line breaks from emails

Hi, it appears that line breaks in customer communications are all turned into
HTML tags. What arrives on the customer side looks horrific. How can the line breaks be preserved properly?



Thanks





[color=#000000][font=Helvetica][size=3]Hello,[/size][/font][/color]



[color=#000000][font=Helvetica][size=3]This is a notification of a new message relating to [/size][/font][/color]Order[color=#000000][font=Helvetica][size=3]: #1 [/size][/font][/color]



Name[color=#000000][font=Helvetica][size=3]: Tom[/size][/font][/color]

Message[color=#000000][font=Helvetica][size=3]:[/size][/font][/color]

[color=#000000][font=Helvetica][size=3]Hello,

thank you for your order. As the product description states, this product is not available to customers in the United States of America.

We apologise for any inconvenience caused.

Regards

Tom[/size][/font][/color]



[color=#000000][font=Helvetica][size=3]View:[/size][/font][/color]

[url=“http://www.japanexposures.com/shop1/index.php?dispatch=orders.details&order_id=1”]http://www.server.com/index.php?dispatch=orders.details&order_id=1[/url]

Did you try this?

http://forum.cs-cart.com/tracker/issue-4643-html-code-printing-in-notes/page__verfilter__78

Hi, thanks. Yes, could be related so I will check it out.



I have found this



replace:"\n":"
"} - Developers' Corner - CS-Cart Community Forums




but I cannot find which file to change. The places that I found [color=#000000][font=arial, sans, sans-serif][size=3]replace:“\n”:"
[/size][/font][/color]
are all add-ons, not core files. Not sure where to look.



[color=#000000][font=arial, sans, sans-serif][size=3]./design/themes/basic/mail/templates/addons/social_buttons/mail.tpl:{$send_data.notes|replace:“\n”:“
”}[/size][/font][/color]

[color=#000000][font=arial, sans, sans-serif][size=3]./design/themes/basic/templates/addons/social_buttons/providers/email.tpl: {if $send_data.notes}[/size][/font][/color]

[color=#000000][font=arial, sans, sans-serif][size=3]./design/themes/basic/templates/addons/social_buttons/providers/email.tpl: {$send_data.notes}[/size][/font][/color]

[color=#000000][font=arial, sans, sans-serif][size=3]./product_inquiry_v40x/var/themes_repository/basic/mail/templates/addons/1clue_product_inquiry/mail.tpl:{$send_data.notes|nl2br}[/size][/font][/color]

[color=#000000][font=arial, sans, sans-serif][size=3]./var/themes_repository/basic/mail/templates/addons/social_buttons/mail.tpl:{$send_data.notes|replace:“\n”:“
”}[/size][/font][/color]

[color=#000000][font=arial, sans, sans-serif][size=3]./var/themes_repository/basic/templates/addons/social_buttons/providers/email.tpl: {if $send_data.notes}[/size][/font][/color]

[color=#000000][font=arial, sans, sans-serif][size=3]./var/themes_repository/basic/templates/addons/social_buttons/providers/email.tpl: {$send_data.notes}[/size][/font][/color]

[size=4][font=arial,helvetica,sans-serif]I think I found it, thanks to your link about nl2br expression.[/font][/size]



[font=Monaco][size=2][size=4][font=arial,helvetica,sans-serif]./design/themes/basic/mail/templates/addons/discussion/notification.tpl:[/font][/size][/size][/font]



[font=arial, helvetica, sans-serif][size=4]Contains this:[/size][/font]


{if $post_data.message}
{__("message")}:

{$post_data.message|nl2br}



{/if}




I will try tweaking this later and report back.

Did you change the 2 locations? That fixed it for me on the invoice notes

[color=“#000000”]design[/color][color=“#666600”]/[/color][color=“#000000”]themes[/color][color=“#666600”]/[/color][color=“#000000”]basic[/color][color=“#666600”]/[/color][color=“#000000”]mail[/color][color=“#666600”]/[/color][color=“#000000”]templates[/color][color=“#666600”]/[/color][color=“#000000”]orders[/color][color=“#666600”]/[/color][color=“#000000”]invoice[/color][color=“#666600”].[/color][color=“#000000”]tpl[/color]



and



[color=“#000000”]design[/color][color=“#666600”]/[/color][color=“#000000”]backend[/color][color=“#666600”]/[/color][color=“#000000”]mail[/color][color=“#666600”]/[/color][color=“#000000”]templates[/color][color=“#666600”]/[/color][color=“#000000”]orders[/color][color=“#666600”]/[/color][color=“#000000”]invoice[/color][color=“#666600”].[/color][color=“#000000”]tpl[/color]

No effect, at least not on the email body text, I did not check invoice text.

[quote name='zeero6' timestamp='1385222548' post='172214']

Did you change the 2 locations? That fixed it for me on the invoice notes

[color=#000000]design[/color][color=#666600]/[/color][color=#000000]themes[/color][color=#666600]/[/color][color=#000000]basic[/color][color=#666600]/[/color][color=#000000]mail[/color][color=#666600]/[/color][color=#000000]templates[/color][color=#666600]/[/color][color=#000000]orders[/color][color=#666600]/[/color][color=#000000]invoice[/color][color=#666600].[/color][color=#000000]tpl[/color]



and



[color=#000000]design[/color][color=#666600]/[/color][color=#000000]backend[/color][color=#666600]/[/color][color=#000000]mail[/color][color=#666600]/[/color][color=#000000]templates[/color][color=#666600]/[/color][color=#000000]orders[/color][color=#666600]/[/color][color=#000000]invoice[/color][color=#666600].[/color][color=#000000]tpl[/color]

[/quote]



Hi, not sure what I have done differently this time, but it worked, for invoices changing the files above, and for email notification changing design/themes/basic/mail/templates/addons/discussion/notification.tpl



I am not now looking for the relevant files for shipments.



Many thanks!!

design/backend/mail/templates/orders/print_packing_slip.tpl



for shipping



hallelujah, finally I fixed this. Many thanks for helping me here!!

You welcome.

On 4.x you need to use [color=#ff0000]nofilter[/color] and can be used like this
{$post_data.message|nl2br nofilter}




i found the issue on addon form_builder but i see the issue appear also in other places



I hope that helps,





Valentin

[color=#808080][size=2]part of hungryweb.net[/size][/color]