Skip to content

Commit

Permalink
Added not to sanitize helper docs that it doesn't guarantee well-form…
Browse files Browse the repository at this point in the history
…ed markup.

Signed-off-by: Michael Koziarski <michael@koziarski.com>

[#166 state:resolved]
  • Loading branch information
mschuerig authored and NZKoz committed May 11, 2008
1 parent 236f0bb commit 9a13750
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions actionpack/lib/action_view/helpers/sanitize_helper.rb
Expand Up @@ -48,6 +48,11 @@ def self.included(base)
# config.action_view.sanitized_allowed_attributes = 'id', 'class', 'style'
# end
#
# Please note that sanitizing user-provided text does not guarantee that the
# resulting markup is valid (conforming to a document type) or even well-formed.
# The output may still contain e.g. unescaped '<', '>', '&' characters and
# confuse browsers.
#
def sanitize(html, options = {})
self.class.white_list_sanitizer.sanitize(html, options)
end
Expand Down

0 comments on commit 9a13750

Please sign in to comment.