diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-08-12 04:18:44 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-12 04:18:44 -0300 |
commit | dd5c0696d87d82ae118d74984dbfd7569cd4e9d8 (patch) | |
tree | 84aaacf6ff61b9ed66ca5b181d1444a7b58d2764 /actionview/lib | |
parent | 5821baebe5cedf710ffa5bd99ff80b2150227676 (diff) | |
parent | 20afe71f5f63ad07b99e7257539fffd0da817e83 (diff) | |
download | rails-dd5c0696d87d82ae118d74984dbfd7569cd4e9d8.tar.gz rails-dd5c0696d87d82ae118d74984dbfd7569cd4e9d8.tar.bz2 rails-dd5c0696d87d82ae118d74984dbfd7569cd4e9d8.zip |
Merge pull request #26133 from smellsblue/dont-fail-on-non-string
Ensure values are strings before calling gsub
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/tag_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb index 7af26edf95..4950f272a4 100644 --- a/actionview/lib/action_view/helpers/tag_helper.rb +++ b/actionview/lib/action_view/helpers/tag_helper.rb @@ -88,7 +88,7 @@ module ActionView if value.is_a?(Array) value = escape ? safe_join(value, " ") : value.join(" ") else - value = escape ? ERB::Util.unwrapped_html_escape(value) : value + value = escape ? ERB::Util.unwrapped_html_escape(value) : value.to_s end %(#{key}="#{value.gsub(/"/, '"'.freeze)}") end |