Skip to content

Commit

Permalink
Update protocol whitelist for rails-html-sanitizer
Browse files Browse the repository at this point in the history
  • Loading branch information
dnrce committed May 23, 2016
1 parent d42bf51 commit 3ecf9d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ class Application < Rails::Application
# configure Tracks to handle deployment in a subdir
config.relative_url_root = SITE_CONFIG['subdir'] if SITE_CONFIG['subdir']

# allow onenote:// and message:// as protocols for urls
config.action_view.sanitized_allowed_protocols = 'onenote', 'message'

config.middleware.insert_after ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser
end
end
1 change: 1 addition & 0 deletions config/initializers/sanitizer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Loofah::HTML5::WhiteList::ALLOWED_PROTOCOLS.merge(%w(message onenote))

0 comments on commit 3ecf9d6

Please sign in to comment.