diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-09-21 15:46:31 +0200 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-09-23 15:27:48 +0200 |
commit | 0fe33f925a26c5004080a0102e6665fc8012a67d (patch) | |
tree | 4f7f13947fef01dea961c586ede6738f0cd9200a /lib | |
parent | bc16d7679b841e30258483013414d79990a1880a (diff) | |
download | gitlab-ce-0fe33f925a26c5004080a0102e6665fc8012a67d.tar.gz |
Revert "Fix a memory leak caused by Banzai::Filter::SanitizationFilter"
This reverts commit 504a3b5e6f0b2e2957cf1e4d9d8eebbf32234bdb.
Diffstat (limited to 'lib')
-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) |