Zendesk adds random line breaks in email template

9 Comments

  • Tal Admon
    Comment actions Permalink

    Hi Thomas,

    My guess is that you probably have some non-printable characters after your 3rd td tag and after the  .

    Try editing this text with Notepad++ or similar editor, and make sure you turn on "view all characters" -

     

    0
  • Tomas V.L.
    Comment actions Permalink

    Hi Tal

     

    Thanks for your comment!

    Unfortunately, I don't think it will be the solution to the problem: I don't see any weird chars...

    0
  • Tal Admon
    Comment actions Permalink

    Thanks.

    The Notepad++ screenshot actually looks different from your 1st image - there is no extra line and   after the 3rd td before the table tag.

    Try to copy and paste from notepad as it is now and see if the email is still weird.

     

    0
  • Tomas V.L.
    Comment actions Permalink

    Hi Tal

     

    Sorry for not claryifing that - indeed I have cleaned up a little in the Notepad, but already copy pasted that back into Zendesk with the same result (unnecessary <br />'s) :)

    0
  • Tal Admon
    Comment actions Permalink

    actually, the table html is not well formatted - for example I see only one table tag but two /table closing tagss

    0
  • Tomas V.L.
    Comment actions Permalink

    Hi Tal,

     

    It is there :) Just not indented really well - since I was trying if it mattered if I had absolutely no line break between the two tables.

    0
  • Tomas V.L.
    Comment actions Permalink

    As I investigated this further... there is a bug in the online tool I use to make the source code of the email a little more readable.

    Now did the check manually... Apparently it's not adding that much line breaks, just a lot spread all over the code:

    Any way to disable these automatic line breaks? Would it work if I put the whole code on one line, so Zendesk doesn't interpret a CR/LF as something to replace with a <br>?

    0
  • Tomas V.L.
    Comment actions Permalink

    FYI - I was able to fix it like that.

    Lesson learned: when using HTML code in a trigger email set-up, make sure you remove all line breaks (e.g. using http://www.textfixer.com/tools/remove-line-breaks.php) so all HTML code is in one block, or Zendesk will replace all new lines from your HTML with <br>'s.

    Thanks a lot for your help Tal!

    1
  • Jessie Schutz
    Comment actions Permalink

    Hey Tal, long time no see! Welcome back! 

    0

Please sign in to leave a comment.

Powered by Zendesk