提交 b7b508aa 编写于 作者: S Santiago Pastorino

Prefer inspect over escaping and sorround by quote marks

上级 8a998b0f
......@@ -2,9 +2,7 @@ module ActionView
module Template::Handlers
class Raw
def call(template)
escaped = template.source.gsub(':'.freeze, '\:'.freeze)
'%q:' + escaped + ':;'
"#{template.source.inspect};"
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册