Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for tunaries always being truthy when passed to escaping EJS tags.

The implementation was prepending an empty string blindly to the front of the fragment provided to the tags which caused the turnary to always be evaluated truthily.
  • Loading branch information...
commit c82ffa6bee61b35197bb96cb4bf753b30e9c8a19 1 parent 674a334
@onyxrev authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/ejs.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.