Skip to content

Commit

Permalink
enable img's style attribute
Browse files Browse the repository at this point in the history
for floats and paddings.
  • Loading branch information
Dennis Schubert committed Dec 15, 2014
1 parent 08f5d83 commit 4fa9fad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/planet/models/entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ class Entry < ActiveRecord::Base
def sanitized_body
Sanitize.fragment(self.body, Sanitize::Config.merge(
Sanitize::Config::BASIC,
:elements => Sanitize::Config::BASIC[:elements] + ['img', 'table']
:elements => Sanitize::Config::BASIC[:elements] + %w[img table],
:attributes => {'img' => %w[alt src title style]},
:css => Sanitize::Config::RELAXED[:css]
))
end
end
Expand Down

0 comments on commit 4fa9fad

Please sign in to comment.