提交 88cb4eed 编写于 作者: K Kasper Timm Hansen 提交者: GitHub

Merge pull request #25554 from vipulnsward/25543-freeze-string

Freeze string for default content for tag_strings, which later goes on to build a new one
......@@ -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.
先完成此消息的编辑!
想要评论请 注册