diff --git a/lib/ejs.rb b/lib/ejs.rb index 686649a..77c75e9 100644 --- a/lib/ejs.rb +++ b/lib/ejs.rb @@ -69,7 +69,7 @@ def js_unescape!(source) def replace_escape_tags!(source, options) source.gsub!(options[:escape_pattern] || escape_pattern) do - "',(''+#{js_unescape!($1)})#{escape_function},'" + "',(''+(#{js_unescape!($1)}))#{escape_function},'" end end