diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-09-25 16:45:45 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-09-25 16:45:45 -0300 |
commit | 80990e2a0b714043f3f7a5b6e3303bbd5b72dc6c (patch) | |
tree | 9687e03999cde73cc53b9c93ae3256b7c88fbd3c /guides | |
parent | 64fc8963b9998cc833d7f2b04e4b9fef3428b858 (diff) | |
download | rails-80990e2a0b714043f3f7a5b6e3303bbd5b72dc6c.tar.gz rails-80990e2a0b714043f3f7a5b6e3303bbd5b72dc6c.tar.bz2 rails-80990e2a0b714043f3f7a5b6e3303bbd5b72dc6c.zip |
rails-html-sanitizer is now the default
Also add to upgrading guide a notice about the deprecated sanitizers
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/upgrading_ruby_on_rails.md | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 4e538693f7..ca1a0b1494 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -186,15 +186,6 @@ venerable html-scanner approach is now officially being deprecated in favor of This means the methods `sanitize`, `sanitize_css`, `strip_tags` and `strip_links` are backed by a new implementation. -In the next major Rails version `Rails Html Sanitizer` will be the default -sanitizer. It already is for new applications. - -Include this in your Gemfile to try it out today: - -```ruby -gem 'rails-html-sanitizer' -``` - This new sanitizer uses [Loofah](https://github.com/flavorjones/loofah) internally. Loofah in turn uses Nokogiri, which wraps XML parsers written in both C and Java, so sanitization should be faster no matter which Ruby version you run. @@ -209,6 +200,12 @@ Read the [gem's readme](https://github.com/rails/rails-html-sanitizer) for more The documentation for `PermitScrubber` and `TargetScrubber` explains how you can gain complete control over when and how elements should be stripped. +If your application needs to old behaviour include `rails-deprecated_sanitizer` in your Gemfile: + +```ruby +gem 'rails-deprecated_sanitizer' +``` + ### Rails DOM Testing TODO: Mention https://github.com/rails/rails/commit/4e97d7585a2f4788b9eed98c6cdaf4bb6f2cf5ce |