effective_datatables 4.20.0 → 4.20.2

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: c5bf5141b655e975b0e158b2f33572d8b8acc1f13ffa50d25f761795c6cdeb25
4
- data.tar.gz: 67c30d8895b19d093e43e6ae1b521a528a18ea8ca156ca90209e8c1c922248c2
3
+ metadata.gz: 5bfbf37b105594f8effdd8c1ca01f55e377cb3a9b011acdb200c7feef5a7e3cf
4
+ data.tar.gz: 8a72ea83642057838ecb2161693d2ce5f82ad194b6a47e6965df5f2dda48d902
5
5
  SHA512:
6
- metadata.gz: 0d08c8f32b066240576a4e4ee4cdea3916999d6c26f44e9c4533b125625de29922ae49ceebfdbd9ce68ba6be5d7da81255f9b60e54af5a250b380ae9bab94952
7
- data.tar.gz: e20da9812bae53fbcaf98fc18022d624c41fe918f544607ea6a7ad0c8d8d062b9f4c8dc89fe5ca067e3b9daf2e47e2537404ce40a50d0c514b475a06b9aa05b7
6
+ metadata.gz: 7d494134ece7fd837e979d2d4e5206745c756e1d89a1e8a521fb33f897cd7a60ea329636ca2e2ec5287d2f70c1359ec0fee413a6ee04466c88cb2974ab6c805e
7
+ data.tar.gz: 0f55926b63825664257310ebe7de15a39b129a5a882439cf34f78fc0158b4f2bf64138f9fe3966950d9caa21e1f57a0cb3dbec8c88aa6e428d745dca167e3cfe
@@ -142,15 +142,25 @@ module Effective
142
142
  when :time
143
143
  value.respond_to?(:strftime) ? value.strftime(EffectiveDatatables.format_time) : BLANK
144
144
  when :text
145
+ value_to_s = value.to_s
146
+
145
147
  if csv
146
- value
147
- elsif value.to_s.starts_with?('<') && value.ends_with?('>')
148
- view.sanitize(value.to_s)
148
+ value_to_s
149
+ elsif value_to_s.starts_with?('<') && value_to_s.ends_with?('>')
150
+ view.sanitize(value_to_s)
149
151
  else
150
- view.simple_format(value.to_s)
152
+ view.simple_format(value_to_s)
151
153
  end
152
154
  when :string
153
- csv ? value : view.escape_once(value.to_s)
155
+ value_to_s = value.to_s
156
+
157
+ if csv
158
+ value_to_s
159
+ elsif value_to_s.starts_with?('<') && value_to_s.ends_with?('>')
160
+ view.sanitize(value_to_s)
161
+ else
162
+ view.escape_once(value_to_s)
163
+ end
154
164
  else
155
165
  value.to_s
156
166
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.20.0'.freeze
2
+ VERSION = '4.20.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.0
4
+ version: 4.20.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect