This project is archived and is in readonly mode.
Rails 3 beta3: mail_to displays incorrectly i.e. mail_to not returning html_safe string
Reported by Sailorxyz | April 16th, 2010 @ 10:27 PM | in 3.0.2
In Rails 3 beta3 mail_to (when used in a view) is not returning a html_safe string.
Code in view:
<%= raw mail_to(supplier.email, h(supplier.email), :subject => "Bathroom Direct Order:", :encode => "javascript") %>
Returns this in the browser:
My temporary solution (code in view) use raw to get a html_safe string:
<%= raw mail_to(supplier.email, h(supplier.email), :subject => "Bathroom Direct Order:", :encode => "javascript") %>
This returns the correct line in the browser: xyz@xyz.com
I believe this needs fixing in the Rails 3 code.
Comments and changes to this ticket
-
Lenary April 16th, 2010 @ 10:54 PM
- Tag changed from mail_to to html_safe, mail_to
Your code and highlighting is broken i think. Indeed not using the raw() method doesn't work, when it should. I shall look into this and try to make a patch.
-
Lenary April 16th, 2010 @ 11:32 PM
- Tag changed from html_safe, mail_to to html_safe, mail_to, patch
Ok, I have a patch and have updated the tests.
It should all pass and do what you need it to.
-
Santiago Pastorino April 16th, 2010 @ 11:42 PM
- Milestone cleared.
- State changed from new to open
-
Santiago Pastorino April 16th, 2010 @ 11:45 PM
- State changed from open to verified
-
Santiago Pastorino April 18th, 2010 @ 09:14 PM
- State changed from verified to committed
Remember to patch with [#bug_id state:committed] in the commit message
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to Low
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>