Class: HTML::LinkSanitizer

Inherits:
FullSanitizer show all
Defined in:
lib/action_view/vendor/html-scanner/html/sanitizer.rb

Instance Method Summary collapse

Methods inherited from FullSanitizer

#sanitize

Methods inherited from Sanitizer

#sanitize

Instance Method Details

#sanitizeable?(text) ⇒ Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/action_view/vendor/html-scanner/html/sanitizer.rb', line 62

def sanitizeable?(text)
  !(text.nil? || text.empty? || !((text.index("<a") || text.index("<href")) && text.index(">")))
end