Skip to content
代码片段 群组 项目
提交 0fe33f92 编辑于 作者: Ahmad Sherif's avatar Ahmad Sherif
浏览文件

Revert "Fix a memory leak caused by Banzai::Filter::SanitizationFilter"

This reverts commit 504a3b5e.
上级 bc16d767
No related branches found
No related tags found
无相关合并请求
......@@ -7,7 +7,7 @@ class SanitizationFilter < HTML::Pipeline::SanitizationFilter
UNSAFE_PROTOCOLS = %w(data javascript vbscript).freeze
def whitelist
whitelist = super.dup
whitelist = super
customize_whitelist(whitelist)
......@@ -42,8 +42,6 @@ def customize_whitelist(whitelist)
# 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)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册