rails/rails — Issue #3978: content_tag with block does always escape html
Author: kmerz
Created: 2011-12-14 11:25:59+00:00
State: open

A *content_tag* using block does *escape_html* even so it was set to false, this leads to problems calling a
string and a *content_tag* in a *content_tag* block:

```ruby
content_tag(:div, nil, false) do
"label_string" + content_tag(:div, "other_label_string")
end

=> "

label_string<div>other_label_string</div>

"
```

The reason is that *content_tag* with block uses the function *capture* which does the *escape_html* always,
since it has no argument to do otherwise.

https://github.com/rails/rails/blob/master/actionpack/lib/action_view/helpers/capture_helper.rb