Use the plugin API to the getter and setters

To avoid having to redefine these methods on the deprecated plugin we
should be using the sanitizer_vendor API.
This commit is contained in:
Rafael Mendonça França 2014-07-15 14:57:22 -03:00
parent 82e478836f
commit 045d717316

@ -144,11 +144,11 @@ def sanitizer_vendor
end
def sanitized_allowed_tags
Rails::Html::WhiteListSanitizer.allowed_tags
sanitizer_vendor.white_list_sanitizer.allowed_tags
end
def sanitized_allowed_attributes
Rails::Html::WhiteListSanitizer.allowed_attributes
sanitizer_vendor.white_list_sanitizer.allowed_attributes
end
# Gets the Rails::Html::FullSanitizer instance used by +strip_tags+. Replace with
@ -191,7 +191,7 @@ def white_list_sanitizer
# end
#
def sanitized_allowed_tags=(tags)
Rails::Html::WhiteListSanitizer.allowed_tags = tags
sanitizer_vendor.white_list_sanitizer.allowed_tags = tags
end
# Replaces the allowed HTML attributes for the +sanitize+ helper.
@ -201,7 +201,7 @@ def sanitized_allowed_tags=(tags)
# end
#
def sanitized_allowed_attributes=(attributes)
Rails::Html::WhiteListSanitizer.allowed_attributes = attributes
sanitizer_vendor.white_list_sanitizer.allowed_attributes = attributes
end
end
end