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

tidy: remove deprecation warnings from ActionView::Helpers::SanitizeHelper #190

Open
flavorjones opened this issue Aug 28, 2024 · 1 comment

Comments

@flavorjones
Copy link
Member

See

[:protocol_separator,
:uri_attributes,
:bad_tags,
:allowed_css_properties,
:allowed_css_keywords,
:shorthand_css_properties,
:allowed_protocols].each do |meth|
meth_name = "sanitized_#{meth}"
define_method(meth_name) { deprecate_option(meth_name) }
define_method("#{meth_name}=") { |_| deprecate_option("#{meth_name}=") }
end
private
def deprecate_option(name)
ActiveSupport::Deprecation.warn "The #{name} option is deprecated " \
"and has no effect. Until Rails 5 the old behavior can still be " \
"installed. To do this add the `rails-deprecated-sanitizer` to " \
"your Gemfile. Consult the Rails 4.2 upgrade guide for more information."
end

These methods were deprecated back in 2014 in 2dbae3e when the old sanitizer was dropped from Rails. I think it's time.

@rubyrider
Copy link

rubyrider commented Oct 27, 2024

Hi @flavorjones I have created a pull request to clean these depreciated methods. Here is my pull request:
#192 . I hope you will review this.

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

No branches or pull requests

2 participants