mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Prefer inspect over escaping and sorround by quote marks
This commit is contained in:
parent
8a998b0fa7
commit
b7b508aa79
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue