From b7b508aa7908efb1c6ef6667e3087f4f6a4b508f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 5 Jan 2016 18:32:16 -0300 Subject: Prefer inspect over escaping and sorround by quote marks --- actionview/lib/action_view/template/handlers/raw.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'actionview/lib/action_view') 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 -- cgit v1.2.3