New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActionMailer doing escaping in text templates #2496
Comments
My current workaround is using the following in my mailer layout.text.erb:
|
I am encountering a similar error, quite possibly the same one. In my case, I'm rendering a .xml.builder template as a partial. It works properly if I render it with no layout, or if I don't render it as a partial; it works properly if I override ActionView::Helpers::CaptureHelper and remove the ERB::Util.html_escape() call. But when rendered as a partial, with a layout, it gets html-escaped when it shouldn't. |
I could not reproduce this in 3.0.10, 3.1 and edge (all using Ruby 1.8.7). Which Ruby version are you using? Could you test this in 3.1 as well? |
I will follow up with more details on my issue soon, and test in 3.1. I've been using ruby-1.8.7-p330, but can replicate in REE p253 as well. Still not certain whether or not it is the same root issue. |
I just retested with 3.1.1.rc1 and 3.0.9 and it does seem to be working now. |
Using rails 3.1.0.rc5.
Create an email template/ view test.text.erb like this:
The layout.text.erb contains this:
The plain text body of the email then shows:
There should be no escaping at all in text views.
The text was updated successfully, but these errors were encountered: