From 0fe33f925a26c5004080a0102e6665fc8012a67d Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Wed, 21 Sep 2016 15:46:31 +0200 Subject: Revert "Fix a memory leak caused by Banzai::Filter::SanitizationFilter" This reverts commit 504a3b5e6f0b2e2957cf1e4d9d8eebbf32234bdb. --- lib/banzai/filter/sanitization_filter.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/banzai/filter/sanitization_filter.rb b/lib/banzai/filter/sanitization_filter.rb index 6e13282d5f4..ca80aac5a08 100644 --- a/lib/banzai/filter/sanitization_filter.rb +++ b/lib/banzai/filter/sanitization_filter.rb @@ -7,7 +7,7 @@ module Banzai UNSAFE_PROTOCOLS = %w(data javascript vbscript).freeze def whitelist - whitelist = super.dup + whitelist = super customize_whitelist(whitelist) @@ -42,8 +42,6 @@ module Banzai # Allow any protocol in `a` elements... whitelist[:protocols].delete('a') - whitelist[:transformers] = whitelist[:transformers].dup - # ...but then remove links with unsafe protocols whitelist[:transformers].push(remove_unsafe_links) -- cgit v1.2.1