aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2016-01-05 18:32:16 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2016-01-05 18:32:16 -0300
commitb7b508aa7908efb1c6ef6667e3087f4f6a4b508f (patch)
treece336042693f523c60f85fcf44dd544bcd5e3b6a /actionview
parent8a998b0fa7523c2c8eb6d0cf56e40408bf6e9b2e (diff)
downloadrails-b7b508aa7908efb1c6ef6667e3087f4f6a4b508f.tar.gz
rails-b7b508aa7908efb1c6ef6667e3087f4f6a4b508f.tar.bz2
rails-b7b508aa7908efb1c6ef6667e3087f4f6a4b508f.zip
Prefer inspect over escaping and sorround by quote marks
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/template/handlers/raw.rb4
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