Skip to content

Commit

Permalink
optimize html sanitization
Browse files Browse the repository at this point in the history
closes #70
  • Loading branch information
Dennis Schubert committed Dec 15, 2014
1 parent bac2dfe commit 1d764d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/planet/models/entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ class Entry < ActiveRecord::Base

def sanitized_body
Sanitize.fragment(self.body, Sanitize::Config.merge(
Sanitize::Config::RELAXED,
:add_attributes => {
'a' => {'rel' => 'nofollow'}
}
Sanitize::Config::BASIC,
:elements => Sanitize::Config::BASIC[:elements] + ['img', 'table']
))
end
end
Expand Down

0 comments on commit 1d764d1

Please sign in to comment.