Upgraded from rails 3.0.7.rc1 to 3.0.8 today and ran into a problem when rendering haml: TypeError in Pages#home Cannot modify SafeBuffer in place Full Trace: activesupport (3.0.8) lib/active_support/core_ext/string/output_safety.rb:122:in `gsub!'' haml (3.1.1) lib/haml/compiler.rb:382:in `block in build_attributes'' haml (3.1.1) lib/haml/compiler.rb:358:in `each'' haml (3.1.1) lib/haml/compiler.rb:358:in `collect'' haml (3.1.1) lib/haml/compiler.rb:358:in `build_attributes'' haml (3.1.1) lib/haml/compiler.rb:407:in `prerender_tag'' haml (3.1.1) lib/haml/compiler.rb:119:in `compile_tag'' haml (3.1.1) lib/haml/compiler.rb:447:in `compile'' haml (3.1.1) lib/haml/compiler.rb:446:in `block (2 levels) in compile Only way I can avoid the error is if I remove everything from application.haml below %body Could this be the culprit? https://github.com/rails/rails/commit/ed3796434af6069ced6a641293cf88eef3b284da -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/NXhxaERIZGw1Z29K. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
> Only way I can avoid the error is if I remove everything from application.haml below %body > > Could this be the culprit? https://github.com/rails/rails/commit/ed3796434af6069ced6a641293cf88eef3b284daNo, this is: https://github.com/rails/rails/commit/53a2c0baf2b128dd4808eca313256f6f4bb8c4cd That change is intentional and haml will have to ship a point release to address it. Sorry about this, we should have noticed earlier and noticed the haml guys. We''ll be sure to add haml views to our security-verification checklist for future changes. -- Cheers Koz -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Please test with the most recent haml release: https://rubygems.org/gems/haml/versions/3.1.2 Comment here: https://github.com/nex3/haml/issues/400 if you have any further issues. Chris On Jun 7, 6:40 pm, Michael Koziarski <mich...@koziarski.com> wrote:> > Only way I can avoid the error is if I remove everything from application.haml below %body > > > Could this be the culprit? https://github.com/rails/rails/commit/ed3796434af6069ced6a641293cf88e... > > No, this is: > > https://github.com/rails/rails/commit/53a2c0baf2b128dd4808eca313256f6... > > That change is intentional and haml will have to ship a point release > to address it. Sorry about this, we should have noticed earlier and > noticed the haml guys. We''ll be sure to add haml views to our > security-verification checklist for future changes. > -- > Cheers > > Koz-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
This should now be fixed with the 3.1.2 release of Haml: https://rubygems.org/gems/haml/versions/3.1.2. On Wednesday, 8 June 2011 at 11:40 AM, Michael Koziarski wrote:> > Only way I can avoid the error is if I remove everything from application.haml below %body > > > > Could this be the culprit? https://github.com/rails/rails/commit/ed3796434af6069ced6a641293cf88eef3b284da > > No, this is: > > https://github.com/rails/rails/commit/53a2c0baf2b128dd4808eca313256f6f4bb8c4cd > > That change is intentional and haml will have to ship a point release > to address it. Sorry about this, we should have noticed earlier and > noticed the haml guys. We''ll be sure to add haml views to our > security-verification checklist for future changes. > -- > Cheers > > Koz > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com (mailto:rubyonrails-core@googlegroups.com). > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com (mailto:rubyonrails-core+unsubscribe@googlegroups.com). > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Excellent, working with haml 3.1.2. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/VUFNalhXV3VwZVlK. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.