title: Rails escapes HTML in my plain text mails
body: <p>I am using the rails 3.2.5 <code>ActionMailer</code> to send plain text mails. Given I have a mail view like this:</p>
  <h2><code>message_from_user.text.erb</code>:</h2>
  <pre><code>Hi &lt;%= @recipient.name %&gt;,
  
  You got the following message from &lt;%= @sender.name %&gt;:
  
  &lt;%= @message %&gt;
  </code></pre>
  <p>When <code>@message</code> is <code>&quot;quotes &amp; ampersands&quot;</code>, then the plain text mail contains <code>&amp;quot;quotes &amp;amp; ampersands&amp;quot;</code>. So it seems like rails just treats this as a HTML view and escapes any html in order to prevent cross site scripting. However this is a plain text mail.  The extension is <code>.text.erb</code> and <code>ActionMailer</code> detectes this and sets the MIME to <code>text/plain</code>. So I never want to escape any html in it.</p>
  <p>I have quite a few mail templates in my application, they are all plain text. I would consider patching all of them to include <code>&lt;%=raw @message%&gt;</code> or <code>&lt;%= @message.html_safe %&gt;</code> bad style - <em>not very DRY</em>.</p>
  <p>I tried varios work-arounds that included money patching Erubis. None of them seem to work. I am looking for some patch or config option or anything to disable escaping html for all <code>.text.erb</code> files.</p>
  <p>Any help is greatly appreciated!</p>