Class: Rails::Html::Sanitizer
- Inherits:
-
Object
- Object
- Rails::Html::Sanitizer
show all
- Defined in:
- lib/rails/html/sanitizer.rb,
lib/rails-html-sanitizer.rb,
lib/rails/html/sanitizer/version.rb
Overview
Constant Summary
collapse
- VERSION =
"1.1.0"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.full_sanitizer ⇒ Object
10
11
12
|
# File 'lib/rails-html-sanitizer.rb', line 10
def full_sanitizer
Html::FullSanitizer
end
|
.link_sanitizer ⇒ Object
14
15
16
|
# File 'lib/rails-html-sanitizer.rb', line 14
def link_sanitizer
Html::LinkSanitizer
end
|
.safe_list_sanitizer ⇒ Object
18
19
20
|
# File 'lib/rails-html-sanitizer.rb', line 18
def safe_list_sanitizer
Html::SafeListSanitizer
end
|
.white_list_sanitizer ⇒ Object
22
23
24
25
26
|
# File 'lib/rails-html-sanitizer.rb', line 22
def white_list_sanitizer
ActiveSupport::Deprecation.warn "warning: white_list_sanitizer is" \
"deprecated, please use safe_list_sanitizer instead."
safe_list_sanitizer
end
|
Instance Method Details
#sanitize(html, options = {}) ⇒ Object
6
7
8
|
# File 'lib/rails/html/sanitizer.rb', line 6
def sanitize(html, options = {})
raise NotImplementedError, "subclasses must implement sanitize method."
end
|