Skip to content

Instantly share code, notes, and snippets.

@dkln
Created September 20, 2010 13:46
Show Gist options
  • Save dkln/587929 to your computer and use it in GitHub Desktop.
Save dkln/587929 to your computer and use it in GitHub Desktop.
class HtmlEmailSanitizer < HTML::WhiteListSanitizer
self.allowed_tags = Set.new(%w(strong em b i p code pre tt samp kbd var sub
sup dfn cite big small address hr br div span h1 h2 h3 h4 h5 h6 ul ol li dl dt dd abbr
acronym a img blockquote del ins html head body title))
self.allowed_protocols = Set.new(%w(http https mailto cid))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment