Module: WhiteListModel

Defined in:
lib/white_list_model.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Constant Summary collapse

PROFILES =
{
  :empty => {
    :attributes => [],
    :bad_tags => [],
    :protocols => [],
    :tags => []
  },
  :mini => {
    :attributes => [],
    :bad_tags => %w(script),
    :protocols => %w(ed2k ftp http https irc mailto news gopher nntp telnet webcal xmpp callto feed),
    :tags => []
  },
  :base => {
    :attributes => %w(href src),
    :bad_tags => %w(script),
    :protocols => %w(ed2k ftp http https irc mailto news gopher nntp telnet webcal xmpp callto feed),
    :tags => %w(b i u strike br)
  },
  :web => {
    :attributes => %w(href src),
    :bad_tags => %w(script),
    :protocols => %w(ed2k ftp http https irc mailto news gopher nntp telnet webcal xmpp callto feed),
    :tags => %w(b u i strike br ul ol li)
  },
  :default => {
    :attributes => %w(href src width height alt cite datetime title class),
    :bad_tags => %w(script),
    :protocols => %w(ed2k ftp http https irc mailto news gopher nntp telnet webcal xmpp callto feed),
    :tags => %w(strong em b i u p code pre tt output samp kbd var sub sup dfn cite big small address hr br div span h1 h2 h3 h4 h5 h6 ul ol li dt dd abbr acronym a img blockquote del ins fieldset legend)
  }
}

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



36
37
38
# File 'lib/white_list_model.rb', line 36

def self.included(base)
  base.extend(ClassMethods)
end