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

Projects
None yet
3 participants
@pixeltrix
Member

pixeltrix commented Feb 27, 2018

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)

This comment has been minimized.

@pixeltrix

pixeltrix Feb 27, 2018

Member

No happy about changing this but to leave it as false would mean extra logic in this method to extract the default setting.

@pixeltrix

pixeltrix Feb 27, 2018

Member

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

This comment has been minimized.

@rafaelfranca

rafaelfranca Feb 27, 2018

Member

we need to add the new config to the configuring.md guide.

@rafaelfranca

rafaelfranca Feb 27, 2018

Member

we need to add the new config to the configuring.md guide.

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.

@pixeltrix pixeltrix merged commit 70169dc into master Feb 27, 2018

3 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@pixeltrix pixeltrix deleted the switch-to-not-enforcing-utf8-by-default branch Feb 27, 2018

bogdanvlviv added a commit to bogdanvlviv/rails that referenced this pull request Feb 27, 2018

Fix `new_framework_defaults_6_0.rb`
`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

Follow up rails#33523 [ci skip]
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment