Skip to content

Commit

Permalink
Add simple_format protection
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed May 7, 2010
1 parent 3c7391f commit 96cb005
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/rails_xss_helper.rb
Expand Up @@ -38,5 +38,12 @@ def content_tag_string_with_escaping(name, content, options, escape = true)
end
alias_method_chain :content_tag_string, :escaping
end

module TextHelper
def simple_format_with_escaping(text, html_options={})
simple_format_without_escaping(ERB::Util.h(text), options)
end
alias_method_chain :simple_format, :escaping
end
end
end

0 comments on commit 96cb005

Please sign in to comment.