未验证 提交 6f4719d9 编写于 作者: V Vipul A M

Freeze string for default content for tag_strings, which later goes on to...

Freeze string for default content for tag_strings, which later goes on to create new content. This should also be inline with content being passed should not be mutable
上级 13a5cc33
......@@ -41,7 +41,7 @@ def tag_string(name, content = nil, escape_attributes: true, **options, &block)
if VOID_ELEMENTS.include?(name) && content.nil?
"<#{name.to_s.dasherize}#{tag_options(options, escape_attributes)}>".html_safe
else
content_tag_string(name.to_s.dasherize, content || '', options, escape_attributes)
content_tag_string(name.to_s.dasherize, content || ''.freeze, options, escape_attributes)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册