From 428f379eefd0d530ea79a892e6dc13751c274302 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 10 Jan 2015 17:37:15 +0000 Subject: [PATCH 1/1] Restore removal of div and style elements when sanitizing HTML --- config/initializers/sanitize.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/initializers/sanitize.rb b/config/initializers/sanitize.rb index 0df38f0fa..eb3039a13 100644 --- a/config/initializers/sanitize.rb +++ b/config/initializers/sanitize.rb @@ -1,4 +1,5 @@ Sanitize::Config::OSM = Sanitize::Config::RELAXED.dup +Sanitize::Config::OSM[:elements] -= [ 'div', 'style' ] Sanitize::Config::OSM[:add_attributes] = { 'a' => { 'rel' => 'nofollow' } } Sanitize::Config::OSM[:remove_contents] = [ 'script', 'style' ] -- 2.43.2