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.
2 of 2 people found this helpful
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):
gets rewritten to:
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.
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.
We have started running into this issue intermittently.
Even within a sentence which has no code-break, though it seems to be punctuation.
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..."
That's odd. There's not a " or " in the HTML right there?
1 of 1 people found this helpful
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.
- 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.)
If I add class="mktoText" to a <td> then Marketo editor adds a space wherever there's a beginning parenthesis. If I take mktoText out, no added spaces.
HTML Before mktoText:
The 2016 General Conference approved the celebration of United Methodist Volunteers in Mission Awareness Sunday (<a href="http://www.umcmission.org/volunteer" target="_blank">UMVIM Awareness Sunday</a>).
HTML after mktoText:
<br /> The 2016 General Conference approved the celebration of United Methodist Volunteers in Mission Awareness Sunday (
<a href="http://www.umcmission.org/volunteer" target="_blank">UMVIM Awareness Sunday</a>).
So it's like Nick mentioned. The editor is adding a trailing space on the new line that's added, but only in certain instances. Not sure what all those instances are, but it's annoying.
3 of 3 people found this helpful
Marketo support got back and said:
The extra whitespace shows up before in certain cases because the email is split into separate lines before we send it out (to avoid problems with max line length problems https://tools.ietf.org/html/rfc2822#section-2.1.1). HTML then presents that linefeed as a space.
There is a workaround for this behavior. In the case of your example in the Community article, by surrounding the text with <span></span> you can force the entire element to be rendered as one continuous line. To do that, you need to click on the HTML button in the richtext editor and add <span> tags around the block of text that contains the <a>.
2 of 2 people found this helpful
Another FYI. One of our admin thought they were doing the right thing by setting our "root block element" to div instead of p tags. They did it because they didn't like the email editor adding p tags which can cause spacing issues in some clients. However, using <div> tags as the root block element causes the aforementioned spacing issues. I switched it back to <p> tags and the spacing issues stopped. You can switch it here: Admin > Email > Edit Text Editor Settings > Email / Snippet Editor
Now that it's set back to p tags, if I add spaces in the editor (which I rarely do) I just change it from "double spacing" to "single spacing" to avoid p tags being inserted and potential spacing issues.
Adding a double space seems to default to a single space which has worked for me.
The code still sits on separate lines but removes any unwanted spacing.