• Resolved WPMonkeyATL

    (@wpmonkeyatl)


    It seems there is a bug in the Newsletter editor when it parses Conditional Code for Outlook. Specifically, if your html email template has conditional code for outlook like this:

    <!–[if (gte mso 9)|(IE)]>

    Then the newsletter editor will improperly add a space beteen the ‘<!–‘ and the ‘[if’, resulting in the following after your email template is loaded into the editor:

    <!– [if (gte mso 9)|(IE)]>

    This is a huge problem for emails that are sent to Desktop Outlook clients (e.g. Outlook 2010, 2013, 2016) because that extra space causes the conditional html code to be ignored entirely by Outlook.

    To duplicate the problem: add conditinal code for outlook to an html newsletter theme (i.e. using proper syntax above, without the space). Load the newsletter, then hit “Save and Switch to Source Editor”. You will see that the extra space appears in the html code. Now delete that extra space and hit Save. Then hit “Save and Switch to Visual Editor”, and then return once again to the “Source Editor”. You will see that the space you deleted is added once again by the newsletter editor.

    I hope the author is able to fix this bug soon.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter WPMonkeyATL

    (@wpmonkeyatl)

    Hello again –

    I found the the source of the issue: the Newsletter plugin does not set the TinyMCE option that allows for conditional comments to be preserved (such as “<!–[if (gte mso 9)|(IE)]>”). The Newsletter plugin should set the TinyMCE option “allow_conditional_comments” to “true”, but it currently does not, so the option’s default value of “false” is used instead:

    https://www.tinymce.com/docs/configure/content-filtering/#allow_conditional_comments

    This can be fixed as follows:

    1. Edit the file \newsletter\emails\edit.php
    2. Go to line #265, where the options for “tinymce.init” are specified
    3. Add the following option within the “tinymce.init({ …. });” block of code:

    allow_conditional_comments: true,

    With this fix, the Newsletter editor will NOT add an extra space beteen ‘<!–‘ and ‘[if’ and therefore “<!–[if (gte mso 9)|(IE)]>” will be properly preserved.

    I hope the author can fix issue this in the plugin soon. Otherwise, the Newsletter plugin will not properly format emails that use conditional formatting for Outlook desktop clients, which is a huge problem if you are sending emails to corporate recipients where the desktop Outlook client is commonly used.

    Plugin Author Stefano Lissa

    (@satollo)

    Thank you for your report, already added to the base code and will be release on coming update!

    Stefano.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug: Editor adds a space in Conditional Code for Outlook’ is closed to new replies.