diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-09-21 16:46:31 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-09-23 16:27:48 +0300 |
commit | 0fe33f925a26c5004080a0102e6665fc8012a67d (patch) | |
tree | 4f7f13947fef01dea961c586ede6738f0cd9200a | |
parent | bc16d7679b841e30258483013414d79990a1880a (diff) |
Revert "Fix a memory leak caused by Banzai::Filter::SanitizationFilter"
This reverts commit 504a3b5e6f0b2e2957cf1e4d9d8eebbf32234bdb.
-rw-r--r-- | lib/banzai/filter/sanitization_filter.rb | 4 |
1 files changed, 1 insertions, 3 deletions
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) |