query_report 1.0.20 → 1.0.21

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: 72ecea2b5888973d9466d275b82d9b430aede2a0
4
- data.tar.gz: ece6ae1a06070abfd8e135db96d084b451014fd8
3
+ metadata.gz: 9c8c81573f3c058802d4e0f5c79b1ac71e86df64
4
+ data.tar.gz: 703e69202bc42844c1a87445cdb61e832936c309
5
5
  SHA512:
6
- metadata.gz: a7ab2b78338519ab00943689c92bd17573dd63658eff709c07e5cfef6abd1c8a4e39c284037a24e2de15b57850749d531fd2e574ab3e16a9f0792ff7bd5c2625
7
- data.tar.gz: b03d1fd45a9f515c74e4f860469f77e869166346226d36dddd6c7df0a0040d858d3ad491125908ae6f1ed75c930113db1a00e91ba5f269a5fe91a944263504a4
6
+ metadata.gz: 0e1aa0d0d9609ec2d46087ddadea6be908da1b6c11847286e8cb02b500c308381f08172fd09bc268f47acefa423f6ea593981785dcfb368e482f2336be64dc76
7
+ data.tar.gz: f05c03a9b18a4ce9554ddfa30cdd3eb2d7a9f1a605acaa048798d3955ab3a1b22b9684d28de72f5aa3a36099681de39e8329d488437acc1520dc43b78a23b6e2
@@ -38,11 +38,16 @@ module QueryReport
38
38
  @columns = @columns.delete_if { |col| col.only_on_web? } unless render_from_view
39
39
 
40
40
  query.map do |record|
41
- array = @columns.collect { |column| [column.humanize, render_from_view ? column.value(record) : strip_tags(column.value(record))] }
41
+ array = @columns.collect { |column| [column.humanize, sanitize_value(column.value(record), render_from_view)] }
42
42
  Hash[*array.flatten]
43
43
  end
44
44
  end
45
45
 
46
+ def sanitize_value(data, render_from_view)
47
+ data = strip_tags(data) if !render_from_view && data.present? && data.is_a?(String)
48
+ data
49
+ end
50
+
46
51
  def has_any_rowspan?
47
52
  @has_any_rowspan = @columns.any?(&:rowspan?) if @has_any_rowspan.nil?
48
53
  @has_any_rowspan
@@ -1,3 +1,3 @@
1
1
  module QueryReport
2
- VERSION = "1.0.20"
2
+ VERSION = "1.0.21"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_report
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.20
4
+ version: 1.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.K.M. Ashrafuzzaman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-02 00:00:00.000000000 Z
11
+ date: 2014-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails