diff options
Diffstat (limited to 'actionview/lib/action_view/helpers/capture_helper.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/capture_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/capture_helper.rb b/actionview/lib/action_view/helpers/capture_helper.rb index 7884e4f1f1..75d1634b2e 100644 --- a/actionview/lib/action_view/helpers/capture_helper.rb +++ b/actionview/lib/action_view/helpers/capture_helper.rb @@ -36,7 +36,7 @@ module ActionView def capture(*args) value = nil buffer = with_output_buffer { value = yield(*args) } - if string = buffer.presence || value + if string = buffer.presence || value and string.is_a?(String) ERB::Util.html_escape string end end |