module HtmlTerminator
Constants
- SANITIZE_OPTIONS
- VERSION
Public Class Methods
included(base)
click to toggle source
# File lib/html_terminator.rb, line 76 def self.included(base) base.send :extend, ClassMethods base.send :include, InstanceMethods end
sanitize(val, config = {})
click to toggle source
# File lib/html_terminator.rb, line 10 def self.sanitize(val, config = {}) if val.is_a?(String) # Sanitize produces escaped content. # Unescape it to get the raw html CGI.unescapeHTML(Sanitize.fragment(val, config).strip) else val end end