htmlemailhtml-emailmailchimpvml

MailChimp auto completing custom HTML, ruining formatting


Is there a way to stop MailChimp from attempting to auto complete my HTML?

I've created a custom HTML template to use with MailChimp. However, when I click 'Save & Close' after pasting it in, MailChimp is adding and removing some tags in an attempt to 'fix' my code.

Here is an example. I'm using some VML to get around some Outlook issues.

This is a small portion of the code I'm pasting in:

  <table cellpadding="0" ... >
    <tr>
      <td background="http://oi63.tinypic.com/2jexxsp.jpg" bgcolor="#7be2eb" width="640" valign="top">
        <!--[if gte mso 9]>
        <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:640px;">
        <v:fill type="frame" src="http://oi63.tinypic.com/2jexxsp.jpg" color="#7be2eb" />
        <v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
        <![endif]-->
          <tr>

           ...

          </tr>
         <!--[if gte mso 9]>
         </v:textbox>
         </v:rect>
         <![endif]-->
      </td>
    </tr>
  </table>

But after saving and then returning to the editor, it looks like this:

  <table cellpadding="0" ... >
    <tr>
      <td background="http://oi63.tinypic.com/2jexxsp.jpg" bgcolor="#7be2eb" width="640" valign="top">
        <!--[if gte mso 9]>
        <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:640px;">
        <v:fill type="frame" src="http://oi63.tinypic.com/2jexxsp.jpg" color="#7be2eb" />
        <v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
        <![endif]-->
          </td></tr><tr>

           ...

          </tr>
         <!--[if gte mso 9]>
         </v:textbox>
         </v:rect>
         <![endif]-->
      </table></td>
    </tr>
  </table>

It is trying to close the TD(line 9), TR(line 9), and TABLE(line 18) tags for me, and completely disregards the fact that they are already closed farther down.

There are also a couple other spots where, because it creates closing tags too early, it will just delete the closing tags that I've made farther down.

Is there a way to stop MailChimp from trying to 'fix' my code?


Solution

  • You'll need to add a table inside the VML area. Mailchimp is automatically closing up td and tr elements to prevent a serious rendering issue.

      <table cellpadding="0" ... >
        <tr>
          <td background="http://oi63.tinypic.com/2jexxsp.jpg" bgcolor="#7be2eb" width="640" valign="top">
            <!--[if gte mso 9]>
            <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:640px;">
            <v:fill type="frame" src="http://oi63.tinypic.com/2jexxsp.jpg" color="#7be2eb" />
            <v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
            <![endif]-->
            <table cellpadding="0" ...>
              <tr>
                <td>
    
               ...
                </td>
              </tr>
             </table>
             <!--[if gte mso 9]>
             </v:textbox>
             </v:rect>
             <![endif]-->
          </td>
        </tr>
      </table>