lib/axlsx/workbook/worksheet/cell.rb in axlsx-1.3.3 vs lib/axlsx/workbook/worksheet/cell.rb in axlsx-1.3.4
- old
+ new
@@ -396,12 +396,12 @@
Axlsx::validate_unsigned_int(v)
@ssti = v
end
# assigns the owning row for this cell.
- def row=(v) DataTypeValidator.validate "Cell.row", Row, v; @row=v end
-
+ def row=(v) @row=v end
+
# Determines the cell type based on the cell value.
# @note This is only used when a cell is created but no :type option is specified, the following rules apply:
# 1. If the value is an instance of Date, the type is set to :date
# 2. If the value is an instance of Time, the type is set to :time
# 3. If the value is an instance of TrueClass or FalseClass, the type is set to :boolean
@@ -442,9 +442,12 @@
v.to_i
elsif @type == :boolean
v ? 1 : 0
else
@type = :string
+ v.to_s
+ # TODO find a better way to do this as it accounts for 30% of
+ # processing time in benchmarking...
::CGI.escapeHTML(v.to_s)
end
end
end
end