diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2016-01-05 18:32:16 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2016-01-05 18:32:16 -0300 |
commit | b7b508aa7908efb1c6ef6667e3087f4f6a4b508f (patch) | |
tree | ce336042693f523c60f85fcf44dd544bcd5e3b6a /actionview/lib/action_view/template/handlers | |
parent | 8a998b0fa7523c2c8eb6d0cf56e40408bf6e9b2e (diff) | |
download | rails-b7b508aa7908efb1c6ef6667e3087f4f6a4b508f.tar.gz rails-b7b508aa7908efb1c6ef6667e3087f4f6a4b508f.tar.bz2 rails-b7b508aa7908efb1c6ef6667e3087f4f6a4b508f.zip |
Prefer inspect over escaping and sorround by quote marks
Diffstat (limited to 'actionview/lib/action_view/template/handlers')
-rw-r--r-- | actionview/lib/action_view/template/handlers/raw.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/actionview/lib/action_view/template/handlers/raw.rb b/actionview/lib/action_view/template/handlers/raw.rb index b08fb0870f..760f517431 100644 --- a/actionview/lib/action_view/template/handlers/raw.rb +++ b/actionview/lib/action_view/template/handlers/raw.rb @@ -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 |