aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/sanitize_helper.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2014-08-16 21:16:24 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2014-08-17 19:25:47 +0200
commit1e2ffe7ae67c37cf8170be0c864cbdaacc27c1b4 (patch)
tree268a11144c9cf80d5ed4d8a5114cd33d4ee022e5 /actionview/lib/action_view/helpers/sanitize_helper.rb
parenta2400308eab88b5eff27e05d1f7624345fb33b54 (diff)
downloadrails-1e2ffe7ae67c37cf8170be0c864cbdaacc27c1b4.tar.gz
rails-1e2ffe7ae67c37cf8170be0c864cbdaacc27c1b4.tar.bz2
rails-1e2ffe7ae67c37cf8170be0c864cbdaacc27c1b4.zip
Prepare for partial release.
- Default to Rails::DeprecatedSanitizer in ActionView::Helpers::SanitizeHelper. - Add upgrade notes. - Add sanitizer to new applications Gemfiles. - Remove 'rails-dom-testing' as a dependency.
Diffstat (limited to 'actionview/lib/action_view/helpers/sanitize_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/sanitize_helper.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/actionview/lib/action_view/helpers/sanitize_helper.rb b/actionview/lib/action_view/helpers/sanitize_helper.rb
index 2268fe25c1..153c64d691 100644
--- a/actionview/lib/action_view/helpers/sanitize_helper.rb
+++ b/actionview/lib/action_view/helpers/sanitize_helper.rb
@@ -1,6 +1,6 @@
require 'active_support/core_ext/object/try'
require 'active_support/deprecation'
-require 'rails-html-sanitizer'
+require 'rails-deprecated_sanitizer'
module ActionView
# = Action View Sanitize Helpers
@@ -138,9 +138,14 @@ module ActionView
end
# Vendors the full, link and white list sanitizers.
- # Strictly for backwards compatibility with html-scanner.
+ # This uses html-scanner for the HTML sanitization.
+ # In the next Rails version this will use Rails::Html::Sanitizer instead.
+ # To get this new behavior now, in your Gemfile, add:
+ #
+ # gem 'rails-html-sanitizer'
+ #
def sanitizer_vendor
- Rails::Html::Sanitizer
+ Rails::DeprecatedSanitizer
end
def sanitized_allowed_tags