Sha256: e66ea0a68bde9ec12eab66069d71b87f486ee9d255be84ff46370d9930546a10

Contents?: true

Size: 523 Bytes

Versions: 11

Compression:

Stored size: 523 Bytes

Contents

module Shamu
  module Entities

    # Forces all string attributes to be html sanitized.
    module HtmlSanitation
      extend ActiveSupport::Concern

      included do
        include Shamu::Attributes::HtmlSanitation
        extend AttributeMethod
      end

      module AttributeMethod
        # (see Attributes::HtmlSanitation.attribute)
        def attribute( name, *args, **options, &block )
          options[:html] ||= :none

          super name, *args, **options, &block
        end
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
shamu-0.0.24 lib/shamu/entities/html_sanitation.rb
shamu-0.0.21 lib/shamu/entities/html_sanitation.rb
shamu-0.0.20 lib/shamu/entities/html_sanitation.rb
shamu-0.0.19 lib/shamu/entities/html_sanitation.rb
shamu-0.0.18 lib/shamu/entities/html_sanitation.rb
shamu-0.0.17 lib/shamu/entities/html_sanitation.rb
shamu-0.0.15 lib/shamu/entities/html_sanitation.rb
shamu-0.0.14 lib/shamu/entities/html_sanitation.rb
shamu-0.0.13 lib/shamu/entities/html_sanitation.rb
shamu-0.0.11 lib/shamu/entities/html_sanitation.rb
shamu-0.0.9 lib/shamu/entities/html_sanitation.rb