sqreen 1.8.4 → 1.8.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b98e63dada1f42cf20026dd3cc0c9785716fbffc
4
- data.tar.gz: fe78cceafb93d57e06919df9fb7f7021007d9426
3
+ metadata.gz: 3f399192916d62e32ac7dc431d7f9567451b3b4c
4
+ data.tar.gz: c50f2371cedb78ea513b13773da2fcab80786994
5
5
  SHA512:
6
- metadata.gz: 97edd909e427fbf02d791c05633dc4d3a4d997093030511d6f4b0ee5c085a9792b3c6c3f7ad1e35bebb57a87236fce7e34a718c7e896efcd91e4354ab3c34dcc
7
- data.tar.gz: ce0cfcdf70964f359da9efa7a7b9a3ab3cbab223a2a8ae7e284715e01a2f25215aeff270b957254addfac01ff9c90e0a7215ce3d074031fef3ea97111735b89c
6
+ metadata.gz: 98569486b7c5344745d4542f0a856673db74431f703ee96c192c0b28efda36ddefc6ee88978ef93f4bea7a7a92264c9eba55c52a3b03de16ed461bec4d88b3a0
7
+ data.tar.gz: 16bc37bfdbf917d013f66559cf34431e1ac39c62678cd3ad9aab2c66d2f6b8ac084dc15fea24b2f00e8da2b9aeff81938f2f6418c5e325e98d5c9a8b2be2c16f
@@ -90,7 +90,7 @@ module Sqreen
90
90
  if escape_html == false &&
91
91
  text.respond_to?(:include?) &&
92
92
  !text.include?('html_escape')
93
- args[0].replace("Sqreen.escape_haml(#{args[0]})")
93
+ args[0].replace("Sqreen.escape_haml((#{args[0]}))")
94
94
  end
95
95
  nil
96
96
  end
@@ -104,7 +104,7 @@ module Sqreen
104
104
  if tag.value[:escape_html] == false &&
105
105
  tag.value[:value].respond_to?(:include?) &&
106
106
  !tag.value[:value].include?('html_escape')
107
- tag.value[:value] = "Sqreen.escape_haml(#{tag.value[:value]})"
107
+ tag.value[:value] = "Sqreen.escape_haml((#{tag.value[:value]}))"
108
108
  return { :status => :override, :new_return_value => tag }
109
109
  end
110
110
  nil
@@ -126,7 +126,7 @@ module Sqreen
126
126
  else
127
127
  content = eval('"' + Haml::Util.balance(scan, '{', '}', 1)[0][0...-1] + '"')
128
128
  content = "Haml::Helpers.html_escape((#{content}))" if escape_html
129
- res << '#{Sqreen.escape_haml(' + content + ')}' # Use eval to get rid of string escapes
129
+ res << '#{Sqreen.escape_haml((' + content + '))}' # Use eval to get rid of string escapes
130
130
  end
131
131
  end
132
132
  { :status => :skip, :new_return_value => res + rest }
@@ -180,7 +180,7 @@ module Sqreen
180
180
 
181
181
  class Haml5EscapableHookCB < RuleCB
182
182
  def pre(_inst, *args, &_block)
183
- args[0] = "Sqreen.escape_haml(#{args[0]})"
183
+ args[0] = "Sqreen.escape_haml((#{args[0]}))"
184
184
  { :status => :modify_args, :args => args }
185
185
  end
186
186
  end
@@ -188,7 +188,7 @@ module Sqreen
188
188
  # Hook into temple template rendering
189
189
  class TempleEscapableHookCB < RuleCB
190
190
  def post(ret, _inst, *_args, &_block)
191
- ret[1] = "Sqreen.escape_temple(#{ret[1]})"
191
+ ret[1] = "Sqreen.escape_temple((#{ret[1]}))"
192
192
  { :status => :override, :new_return_value => ret }
193
193
  end
194
194
  end
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.io/terms.html
3
3
  module Sqreen
4
- VERSION = '1.8.4'.freeze
4
+ VERSION = '1.8.5'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqreen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.4
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sqreen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-17 00:00:00.000000000 Z
11
+ date: 2017-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs