Ruby on Rails 2.3.7 Released
Posted by Jeremy Kemper May 24, 2010 @ 08:20 AM
With the 2.3.6 release hot out of the oven, Nathan Weizenbaum began updating HAML to support it. He uncovered a couple of bugs in the HTML-safety changes backported from Rails 3, so we’re cutting a 2.3.7 release to fix them.
If you use the rails_xss plugin for automatic HTML escaping, you should upgrade to Rails 2.3.7 and the latest rails_xss plugin.
If you don’t use the rails_xss plugin yet, now’s the time to start. It’s baked in to Rails 3.
Update: fixing compatibility with the rails_xss plugin broke HTML-safety for apps that don’t use rails_xss. We’re sorry, all: HTML-safety is meant to be opt-in! The fix is available now in 2.3.8.pre1 and will be released shortly.

Prikittiiiw…! This new release So close from rails 2.3.6. Good job and thanks to all contributor.
Mantab gan..!
Ну вы писец! :(
Thanks for fast fix.
I don’t want to use xss protected strings. Is there an Option to opt out or do i Need to monkeypatch Some classes? Thanks in Advance.
It looks like 2.3.7+rails_xss breaks will_paginate’s output. I’ve opened an issue on GitHub: http://github.com/mislav/will_paginate/issues/50
Michael: by default on Rails 2.3.7 strings are not XSS-protected. To use XSS-protected strings, you need to opt in by using the rails_xss plugin.
epic lol
It appears that Rails 2.3.7 change something in form_remote_tag helper, escaping all the ”<” and ”>” tags, breaking my project.
I use the helper “content_for”. After the update to rails 2.3.7 the
I use the helper “content_for”. After the update to rails 2.3.7 the script tag in this block is escaped.
uhm…
2.3.5 -> 2.3.6 = months 2.3.6 -> 2.3.7 = hours
I’m using rails since version 1 and I know that this kind of things happens, but is really hard to explain to new people those weird release cycles.
maybe it’s time to add another number for patches and fixes (2.3.6.1).
Anyway, thanks to the community for this release!
In form_for it’s escaping ”<” and ”>” too… Any solutions?
I think that this kind of problems may discredit the work of the Rails team.
I mean, releasing a new minor update after several months and releasing an urgent patch one day later…
I hope that the Rails team will take actions to avoid this in the future : for example, releasing at least ONE release candidate even for minor releases…
Nicolas
The rails ecosystem has become so big that such things just happen. And I’m glad that the team does those fixes immediately rather than insisting on release cycles.
Nathan: Like Rasidee, all the Output from various helpers is escaped. For example link_to escapes the Text.
Ok guys, found the solution. Actually you must use the rails_xss plug-ins or else, need to deal with the problem.
Yes, all link_to and link_to_remote will be escaped by default (after the plug-ins install). So need to use “raw” helper or mark it as html_safe!
Eg:
link_to “TEST”.html_safe!
What’s the simplest way to make the form_tag or link_to works like 2.3.5? The escaped ”<” and ”>” make me sad:(
Sao bản 2.3.7 ra lò nhanh vậy 0_0”
This morning I upgraded to rails 2.3.6. Then I had to upgrade haml to 3.0.5, because it was broken.
Now I have to upgrade to rails 2.3.7.html_safe!
I thought rails is covered by tests…so that such grave bugs do not happen?!
Great Job.. Keep going..
thanks for the quick fix.
I had rails_xss and erubis running in 2.3.5, and upon upgrading to 2.3.7, my local machine works, but the test server has an error:
ActionView::TemplateError (undefined method `html_safe!’ for NoMethodError) in /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.7/lib/action_controller/templates/rescues/template_error.erb:
DGM, you need to upgrade rails_xss as well. Install the latest plugin from http://github.com/rails/rails_xss
DGM,
To install the correct version, run:
ruby script/plugin install git://github.com/rails/rails_xss.git
The instructions on the rails_xss GitHub page incorrectly say to install from the NZKoz repo instead of the rails fork.
To me, this is totally broken.
The “protection” break so many apps, it’s hilarious.
And as far as i can see, there’s no option to opt out.
Every single helper is broken.
Please, present an option to opt out.
Here comes the fix for the fix that hopefully fixes the escaping:
http://github.com/rails/rails/commit/c66013e2c5dc77e9bfa06111fb8841b9b0e41ceb
2.3.8 tomorrow?
подожду еще пару дней перед обновлением …. :)
Thanks Eric, you were right. Now to get will_paginate fixed…
Thanks poopsy… I’m looking forward to 2.3.8 :)
Poopsy,
Thanks for the link – I applied that patch against a project without the rails_xss plugin installed and the application passed all my tests this time.
However, I’m inclined to install the plugin as part of upgrading to 2.3.7/8 to help with the migration to 3.0.
pekwan gan!! . indonesian love this update :)
Michael, it’s a bug when running without the rails_xss plugin. We’ll have a fix released shortly.
Since Jose Valim is on the team, I trust that he knows this already, that Rails-Footnotes is broken with, so far, 2.3.6. I haven’t tested it on 2.3.7. But I submitted an issue to the github repo of rails-footnotes
Kiểu này chắc update khùng luôn :( Không biết sắp đến còn có 2.3.9 nữa hay không..
ありがとう
Your post has been linked at the DrinkRails blog as one of the top ruby on rails blogs of the day.
Good job.
What’s the simplest way to make the form_tag or link_to works like 2.3.5? The escaped ”<”>Oyunlar ”>” make me sad:(