提交 84828958 编写于 作者: P Pavel Pravosud

DRY AS::SafeBuffer a bit using existing helper

上级 6df507e8
......@@ -171,11 +171,7 @@ def clone_empty
%w[concat prepend].each do |method_name|
define_method method_name do |value|
if !html_safe? || value.html_safe?
super(value)
else
super(ERB::Util.h(value))
end
super(html_escape_interpolated_argument(value))
end
end
alias << concat
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册