Skip to content
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

Merged
merged 1 commit into from Feb 27, 2018

Conversation

pixeltrix
Copy link
Contributor

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.

@@ -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)
Copy link
Contributor Author

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
Copy link
Member

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.
@pixeltrix pixeltrix force-pushed the switch-to-not-enforcing-utf8-by-default branch from 91a66b6 to 96eeea5 Compare February 27, 2018 15:04
@pixeltrix pixeltrix merged commit 70169dc into master Feb 27, 2018
@pixeltrix pixeltrix deleted the switch-to-not-enforcing-utf8-by-default branch February 27, 2018 15:54
bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Feb 27, 2018
`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
bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Aug 27, 2018
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.
bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Jan 5, 2019
- 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`
bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Jan 5, 2019
- 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`
bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Jan 5, 2019
- 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`
bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Jan 5, 2019
- 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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants