better_html 1.0.12 → 1.0.13

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
  SHA256:
3
- metadata.gz: e9a13c27533e3023181c42a6d1d67eec983dd1f1c3dc045eb95c9868a65cc5ac
4
- data.tar.gz: 6c78a69777c0a02a7409767c5fd746a4c496f99bdfea1cad4bd39c68063ed9bb
3
+ metadata.gz: d883b68e79ca30133ef60fa7ad896971f5e41b3b26d96fd7174b19a24175ea48
4
+ data.tar.gz: e40a70a6b0d70c8be143e13d04deddf86147764c3ede93c10e88e1d9b8388c37
5
5
  SHA512:
6
- metadata.gz: ad1164a2dc8b92d1b18687b40b2190dae8137036067288f7b138323db8a02712235324353baf44c0f70d3526b0f35cbba78a82c1897211e60f8f8eca744026fc
7
- data.tar.gz: e229b74bb327bb4e6820c7c90fea5974c4302fe234e2909e2268d24dff8a79a8a236332c46ec4dc0ebe2a910a84de7f174d6fec7b0fa9cb3e8d7c90fa5b0142f
6
+ metadata.gz: 1baa015025db932f27c4e30fdd7769def14cdcf7d091f5e63c76640ac457444468cc7d5c8c3744465116603a785958a20ec23ea10197f3fb92ea0276ebc1ecfc
7
+ data.tar.gz: cb7d358fda5b576ec1ebeae39e1e1e196f4582c05f070a85325215721885e3a0badc6cddbc6b3cf417222805e9a4b7b6d00c740df12def3b3a3c7b985cd8c172
@@ -57,9 +57,14 @@ class BetterHtml::BetterErb
57
57
  klass = BetterHtml::BetterErb.content_types[exts] unless excluded_template
58
58
  klass ||= self.class.erb_implementation
59
59
 
60
+ escape = if ActionView::VERSION::MAJOR <= 5
61
+ self.class.escape_whitelist.include?(template.type)
62
+ else
63
+ self.class.escape_ignore_list.include?(template.type)
64
+ end
60
65
  generator = klass.new(
61
66
  erb,
62
- :escape => (self.class.escape_whitelist.include? template.type),
67
+ :escape => escape,
63
68
  :trim => (self.class.erb_trim_mode == "-")
64
69
  )
65
70
  generator.validate! if generator.respond_to?(:validate!)
@@ -1,3 +1,3 @@
1
1
  module BetterHtml
2
- VERSION = "1.0.12"
2
+ VERSION = "1.0.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francois Chagnon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-05 00:00:00.000000000 Z
11
+ date: 2019-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast