New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't enforce UTF-8 by default #32125
Conversation
@@ -1519,10 +1519,10 @@ def range_field(object_name, method, options = {}) | |||
|
|||
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No happy about changing this but to leave it as false would mean extra logic in this method to extract the default setting.
# Read the Guide for Upgrading Ruby on Rails for more info on each option. | ||
|
||
# Don't force requests from old versions of IE to be UTF-8 encoded | ||
# Rails.application.config.action_controller.default_enforce_utf8 = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to add the new config to the configuring.md guide.
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.
91a66b6
to
96eeea5
Compare
`default_enforce_utf8` belongs to `config.action_view` Update info about `:skip_enforcing_utf8` since we can change default behavior via `config.action_controller.default_enforce_utf8` Related to rails#32125
This commit is the next work after rails#33523. Also, this commit removes mention about hidden `utf8` input. Since form helpers don't generate this input by default since rails#32125. Note that I also had created PR rails#31972 with improvements to "Action View Form Helpers" guide, but I'll rebase it after merging the current PR.
- config.load_defaults 6.0 in the dummy app and fix the test since by default rails 6.0 configured not to generate "utf8" hidden input, see rails#32125 - Use `ActiveRecord::Migration[6.0]` in the dummy app since actiontext will be since Rails 6.0 - Fix `CreateActiveStorageTables` migration in the dummy app. Add `t.foreign_key :active_storage_blobs, column: :blob_id` It was added in 2ae3a29. - `rails/actiontext$ yarn install`
- config.load_defaults 6.0 in the dummy app and fix the test since by default rails 6.0 configured does not generate "utf8" hidden input, see rails#32125 - Use `ActiveRecord::Migration[6.0]` in the dummy app since actiontext will be since Rails 6.0 - Fix `CreateActiveStorageTables` migration in the dummy app. Add `t.foreign_key :active_storage_blobs, column: :blob_id` It was added in 2ae3a29. - `rails/actiontext$ yarn install`
- config.load_defaults 6.0 in the dummy app and fix the test since by default rails 6.0 configured does not generate "utf8" hidden input, see rails#32125 - Use `ActiveRecord::Migration[6.0]` in the dummy app since actiontext will be since Rails 6.0 - Fix `CreateActiveStorageTables` migration in the dummy app. Add `t.foreign_key :active_storage_blobs, column: :blob_id` It was added in 2ae3a29. - `rails/actiontext$ yarn install`
- config.load_defaults 6.0 in the dummy app and fix the test since by default rails 6.0 configured does not generate "utf8" hidden input, see rails#32125 - Use `ActiveRecord::Migration[6.0]` in the dummy app since actiontext will be since Rails 6.0 - Fix `CreateActiveStorageTables` migration in the dummy app. Add `t.foreign_key :active_storage_blobs, column: :blob_id` It was added in 2ae3a29. - `rails/actiontext$ yarn install`
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.