문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top