Extra spaces in rendered email?

Nick_Greca
Level 1

Extra spaces in rendered email?

Hi, I'm not sure what's happening here, but I'm using Email Editor 2.0 to edit content of our emails, both through the WYSIWYG and via the HTML code editor in an editable text module.

Normally it works fine, but I have noticed that if you have two words next to each other, with no space, and with an HTML tag in between, Marketo will add an extra space to the rendered output in browsers and email clients.  This space is not represented in the code, and checking the WYSIWYG and code after sending a sample, there is no space character that has been added, so it seems that Marketo is adding this space when it processes the email before sending it out.

Example:

example(strong)text(/strong)

where the parentheses are greater than/less than and there is no space between any character

renders as:

example text

(note the extra space between "example" and "text")

So there is no space in the original code, or when it's rendered in the email editor, but for some reason it's being added in ALL clients and ALL browsers when viewing the sample/test email.  This happens with b/i tags, strong/em tags, span tags, basically any HTML tag that you would use to modify a piece of text inside a paragraph, div, or td.

I'm beyond frustrated with this stupid little error and I've tried everything I can think of to no avail.  Any help is greatly appreciated, thanks.

14 REPLIES 14
Frank_Breen2
Level 10

Re: Extra spaces in rendered email?

I'm not able to replicate on my side, Email 2.0 is very buggy and bugs differ from instance to instance, it may be worth opening a support ticket to get Marketo to investigate.

Nick_Greca
Level 1

Re: Extra spaces in rendered email?

Just following up, I did some more digging and found that it’s definitely the text/html editor (some form of MCE?) that’s causing the problem, not the mail preprocessor.  Emails that do not have editable text sections do not have this issue.

For some reason, the text/html editor ALWAYS adds a trailing space to the end of every line of code, no matter what you do.  In addition, any time a new HTML tag is opened, the editor starts a new line, which means the trailing space is added to the line above, where it should not be.  That is what’s causing the gap in front of the tags.

So this (think of parentheses as gt/lt):

lorem(span style="color:red;")ipsum(/span)

gets rewritten to:

lorem

(span style="color:red;")ipsum(/span)

To solve this, I have requested that Marketo’s text/html editor does NOT add trailing spaces to ANY line, and does NOT start a new line every time an HTML tag is opened.  I would also like more control over the editor itself because I know that there's code validation and rewriting happening but we don't currently have the ability to turn it off.

Frank_Breen2
Level 10

Re: Extra spaces in rendered email?

Great work Nicholas, I think Marketo use's TinyMCE as the WYSIWYG editor and I find that some bugs or settings can be traced to that. Another fix can be if you add a Text Tokens, it should skip whatever the editor setting are and just push in the content, it's worth trying if you see other odd bugs.

Anonymous
Not applicable

Re: Extra spaces in rendered email?

We have started running into this issue intermittently.

Even within a sentence which has no code-break, though it seems to be punctuation.

Headline:

Going to Event? Join us the conference sessions...

Looks fine until you send a sample, then shows as:

"Going To Event ? Join us in the conference sessions..."

Grant_Booth
Level 10

Re: Extra spaces in rendered email?

That's odd. There's not a " or " in the HTML right there?

Anonymous
Not applicable

Re: Extra spaces in rendered email?

I am having the same issue with a space being added right before the registered mark. It just started happening. It only happens when the registered mark is made superscript. I would leave the registered mark as is, but it has been requested to make them always superscript. Any solutions or workarounds to this issue? I made it a token, but in some mobile versions it doesn't show as superscript.

Screen Shot 2017-06-23 at 10.28.48 AM.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Extra spaces in rendered email?

Please post

  • the HTML as entered in Marketo
  • the rendered HTML (in a received email)

for that fragment. Not a screenshot, but the actual HTML. (Using the Advanced Editor >> Syntax Highlighting feature here on the Nation will make it easier to read.)

Theo_Phan
Level 1

Re: Extra spaces in rendered email?

I am having this exact same issue with this gap showing on the right side for desktop client emails (Outlook). What is the workaround? I haven't figured it out yet. I may need to bake the workaround into the template too. Any help would be appreciated!

Katja_Keesom
Level 10 - Community Advisor + Adobe Champion

Re: Extra spaces in rendered email?

Can I suggest you start a new conversation on this topic? The current one is ancient and lots would have changed in the mean time. Please do include some examples of your html if you want the community to help trouble shoot.