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