Class: RailsAdminContentBuilder::ContentBuilder
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- RailsAdminContentBuilder::ContentBuilder
- Extended by:
- FriendlyId
- Includes:
- SearchCop
- Defined in:
- app/models/rails_admin_content_builder/content_builder.rb
Instance Method Summary collapse
Instance Method Details
#attributes_hash ⇒ Object
37 38 39 40 41 |
# File 'app/models/rails_admin_content_builder/content_builder.rb', line 37 def attributes_hash %w( src class alt href allowfullscreen frameborder height width ) end |
#content_sanitized ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/models/rails_admin_content_builder/content_builder.rb', line 21 def content_sanitized white_list_sanitizer = Rails::Html::WhiteListSanitizer.new white_list_sanitizer.sanitize( content, tags: , attributes: attributes_hash ).try(:html_safe) end |
#tags_hash ⇒ Object
30 31 32 33 34 35 |
# File 'app/models/rails_admin_content_builder/content_builder.rb', line 30 def %w( div b i a u p img figure figcaption a iframe footer aside section blockquote ul ol li h1 h2 h3 h4 h5 h6 ) end |