Question

Premailer seems to convert my mako templates:

<div>
    <%block name="email_content">
    </%block>
</div>

Into a series of escaped sequences:

<div>

    %block&gt;
</div>

This is with premailer 1.8.2; there is some talk in various places of using premailer-ignore as a style tag or similar, but the premailer documentation seems severely lacking.

Is there some way of using escape sequences with premailer?

Was it helpful?

Solution

The answer is that nokogiri is currently broken somehow (there are few vaguely related open tickets on github, but nothing specifically relating to this).

Anyhow, you have to use hpricot (despite it being EOL) for this to work.

Be aware that hpricot won't install on OSX cleanly, and currently requires:

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install hpricot --no-rdoc --no-ri

All in all; messy and bad.

Simple solution: don't use premailer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top