Class: Rails::Html::Sanitizer

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/html/sanitizer.rb,
lib/rails-html-sanitizer.rb,
lib/rails/html/sanitizer/version.rb

Overview

:nodoc:

Direct Known Subclasses

FullSanitizer, LinkSanitizer, WhiteListSanitizer

Constant Summary collapse

VERSION =
"1.0.1"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.full_sanitizerObject


10
11
12
# File 'lib/rails-html-sanitizer.rb', line 10

def full_sanitizer
  Html::FullSanitizer
end

14
15
16
# File 'lib/rails-html-sanitizer.rb', line 14

def link_sanitizer
  Html::LinkSanitizer
end

.white_list_sanitizerObject


18
19
20
# File 'lib/rails-html-sanitizer.rb', line 18

def white_list_sanitizer
  Html::WhiteListSanitizer
end

Instance Method Details

#sanitize(html, options = {}) ⇒ Object

Raises:

  • (NotImplementedError)

6
7
8
# File 'lib/rails/html/sanitizer.rb', line 6

def sanitize(html, options = {})
  raise NotImplementedError, "subclasses must implement sanitize method."
end