middleman/middleman — pull request #927 by karlfreeman (2013-06-07 09:17:17+00:00)
Title: content_for is escaping .erb

It appears by [updating the padrino helpers to v11](https://github.com/middleman/middleman/commit/69c36e691f06d07cad26cc1129abc060d2b7cfd7) there has been some changes to the default behaviour for the `content_for`, `capture_html`, etc.. helper tags.

[In a blog post annoucing the v11](http://www.padrinorb.com/blog/padrino-0-11-0-released-padrino-lives) they mention the change ( search for "ActiveSupport::SafeBuffer"). Digging a little deeper [this pull request](https://github.com/padrino/padrino-framework/pull/1031) outlines the change but a TLDR; is that Padrino is assuming unsafe strings by default.

The haml tests pass because they have been [flagged as safe already?](https://github.com/middleman/middleman/blob/69c36e691f06d07cad26cc1129abc060d2b7cfd7/middleman-core/lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/rendering/extensions/haml.rb#L22), the same is [true for slim?](https://github.com/middleman/middleman/blob/69c36e691f06d07cad26cc1129abc060d2b7cfd7/middleman-core/lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/rendering/extensions/slim.rb#L10)

However, [erb is different?](https://github.com/middleman/middleman/blob/69c36e691f06d07cad26cc1129abc060d2b7cfd7/middleman-core/lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/application/rendering/extensions/erubis.rb#L11)

Havent gotten deeper then this but at least now the tests are representative of what the [docs state](http://beta.middlemanapp.com/helpers/#toc_2)

Its a difficult to grok whats changed / going on straight away due to the multiple layers ( us, padrino-helpers, tilt, template engines )