diff options
author | Andrew White <andrew.white@unboxed.co> | 2018-02-27 11:07:04 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2018-02-27 15:03:50 +0000 |
commit | 96eeea538c9c5b7b60d6f8baed2e86a9e2a920c9 (patch) | |
tree | 0dd707fe4f9e13b99ef967e479146ed6273832af /actionview/lib/action_view/helpers/form_helper.rb | |
parent | f86b221a53e8363b7c8a5688df603fc388b62b7c (diff) | |
download | rails-96eeea538c9c5b7b60d6f8baed2e86a9e2a920c9.tar.gz rails-96eeea538c9c5b7b60d6f8baed2e86a9e2a920c9.tar.bz2 rails-96eeea538c9c5b7b60d6f8baed2e86a9e2a920c9.zip |
Don't enforce UTF-8 by default
With the disabling of TLS 1.0 by most major websites, continuing to run
IE8 or lower becomes increasingly difficult so default to not enforcing
UTF-8 encoding as it's not relevant to other browsers.
Diffstat (limited to 'actionview/lib/action_view/helpers/form_helper.rb')
-rw-r--r-- | actionview/lib/action_view/helpers/form_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index e27628f58b..65143efabb 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -1519,10 +1519,10 @@ module ActionView private def html_options_for_form_with(url_for_options = nil, model = nil, html: {}, local: !form_with_generates_remote_forms, - skip_enforcing_utf8: false, **options) + skip_enforcing_utf8: nil, **options) html_options = options.slice(:id, :class, :multipart, :method, :data).merge(html) html_options[:method] ||= :patch if model.respond_to?(:persisted?) && model.persisted? - html_options[:enforce_utf8] = !skip_enforcing_utf8 + html_options[:enforce_utf8] = !skip_enforcing_utf8 unless skip_enforcing_utf8.nil? html_options[:enctype] = "multipart/form-data" if html_options.delete(:multipart) |