Community Forum

Over the years we have built up a community of email marketers, coders and designers that live and breathe email.

Use the Email on Acid Forum like your virtual water cooler: Stop by to discuss email code, quirky clients and fixes and post your issues (with an example of the code) for our community to offer its assistance.

 
   
<br/> tags duplicated in Outlook 2013

barleby

Newbie
Total Posts:  2
Posted: 07 June 2016 01:04 AM

Hi.
I recently realized that Outlook 2013 is Duplicating the <br> tags I’m insertting in my HTML code.
Let’s say I have a:

<P>Dear  customer.....blah blah
</br><br/>Let us know if you are interested ...
</
br><br/>
Best regards
</P

This outputs in Outlook double the
tags I typed. Former code will show as:

<P>Dear  customer.....blah blah
<br></br>
<
br></br>
<
br></br>
<
br></br>
Let us know if you are interested ...
<
br></br>
<
br></br>
<
br></br>
<
br></br>
Best regards
</P

That is: 4 <br> instead of 2

┬┐Any hint on this?
Thanks a lot


 

Alex Ilhan

Avatar
Administrator
Total Posts:  203
Posted: 07 June 2016 10:21 PM
[ # 1 ]

Hi barleby and thanks for choosing to become a part of the Email on Acid forums!

This issue could be a number of different things.

When I test this small snippet of code I’m not seeing the errors. I have a few bug fixes for you to check.

My first small guess is changing the way you’re calling your br tags, instead of using this:

<P>Dear  customer.....blah blah
</br><br/>Let us know if you are interested ...
</
br><br/>
Best regards
</P

use this:

<P>Dear  customer.....blah blah
<br><br>Let us know if you are interested ...
<
br><br>
Best regards
</P

As Outlook map be converted the line break tags with a backslash as closing tags, hence adding more in.

If this doesn’t work, could you please post your full email code as a HTML attachment. It’s very likely that there could be something else in the code that’s throwing off the line breaks (as is often the way with email code!)

Cheers
Alex


 

barleby

Newbie
Total Posts:  2
Posted: 07 February 2017 02:33 AM
[ # 2 ]

Your solution worked pretty well.
However as I am “obligued” to use XHTML (due to the html templates engine my company use) I had to slightly modify the tag.
In order to not generate XHTML parse error I put the
tag inside a CDATA section. I.E:

<![CDATA[<br>]]

This way Outlook is displaying
as intended and our html engine not complaining.
Thanks a lot.


 

Alex Ilhan

Avatar
Administrator
Total Posts:  203
Posted: 07 February 2017 10:47 PM
[ # 3 ]

Hey barleby,

So glad you found a solution. Please don’t hesitate to ask if you have any other questions.

Cheers,
Alex