提交 5dfd394c 编写于 作者: T Timm

Added guard clauses to FullSanitizer.

上级 91712cc1
......@@ -7,7 +7,12 @@ module ActionView
class FullSanitizer
def sanitize(html, options = {})
Loofah.fragment(html).text
if html
return html if html.empty?
Loofah.fragment(html).text
else
nil
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册