From 443ca0e6633cd2210ff3dc6f19bafcf7335bda6b Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 28 Dec 2014 19:06:04 +0100 Subject: [PATCH] added sanitize initializer --- config/initializers/sanitize.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 config/initializers/sanitize.rb diff --git a/config/initializers/sanitize.rb b/config/initializers/sanitize.rb new file mode 100644 index 00000000..69b8764d --- /dev/null +++ b/config/initializers/sanitize.rb @@ -0,0 +1,9 @@ +EVIL_TAGS = { + elements: %w(quote a p i strong em del pre code table tr td th br ul ol li hr), + attributes: { + 'a' => %w(href) + }, + protocols: { + 'a' => { 'href' => ['http', 'https', :relative] } + } +} \ No newline at end of file