Skip to content

Commit

Permalink
Merge pull request #965 from q-centrix/eval-interpolated-change
Browse files Browse the repository at this point in the history
Replace interpolated interpolation with cleaner method
  • Loading branch information
amatsuda committed Oct 26, 2017
2 parents e0b8fbd + 229299d commit 28e9222
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,5 +1,6 @@
# Haml Changelog

* Performance/memory improvement in `lib/haml/util.rb` that saves a string allocation [#965](https://github.com/haml/haml/pull/965) (thanks [Dillon Welch](https://github.com/oniofchaos))
* Add constant for default options in `lib/haml/helpers/action_view_mods.rb` [#966](https://github.com/haml/haml/pull/966) (thanks [Dillon Welch](https://github.com/oniofchaos))
* Performance/memory usage improvement in `lib/haml/buffer.rb` [#963](https://github.com/haml/haml/pull/963) (thanks [Dillon Welch](https://github.com/oniofchaos))

Expand Down
2 changes: 1 addition & 1 deletion lib/haml/util.rb
Expand Up @@ -212,7 +212,7 @@ def unescape_interpolation(str, escape_html = nil)
else
scan.scan(/\w+/)
end
content = eval('"' + interpolated + '"')
content = eval("\"#{interpolated}\"")
content.prepend(char) if char == '@' || char == '$'
content = "Haml::Helpers.html_escape((#{content}))" if escape_html

Expand Down

0 comments on commit 28e9222

Please sign in to comment.