summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/cell_serializer.rb
diff options
context:
space:
mode:
authorArkadiy Butermanov <[email protected]>2016-04-05 14:06:10 +0300
committerArkadiy Butermanov <[email protected]>2016-04-05 14:06:10 +0300
commita0dc908f9df76f8c31a3238b1829eea2fd10c666 (patch)
tree63d08c43c7d1d5006441c47a512f3e97b4052be8 /lib/axlsx/workbook/worksheet/cell_serializer.rb
parent0d54b473cfa8a3325e1bc3fcd5525ebb7f4b68cb (diff)
downloadcaxlsx-a0dc908f9df76f8c31a3238b1829eea2fd10c666.tar.gz
caxlsx-a0dc908f9df76f8c31a3238b1829eea2fd10c666.zip
Escape html in :text type
Diffstat (limited to 'lib/axlsx/workbook/worksheet/cell_serializer.rb')
-rw-r--r--lib/axlsx/workbook/worksheet/cell_serializer.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell_serializer.rb b/lib/axlsx/workbook/worksheet/cell_serializer.rb
index 4da391b6..76a3c386 100644
--- a/lib/axlsx/workbook/worksheet/cell_serializer.rb
+++ b/lib/axlsx/workbook/worksheet/cell_serializer.rb
@@ -141,8 +141,12 @@ module Axlsx
# @param [Cell] cell The cell that is being serialized
# @param [String] str The string the serialized content will be appended to.
# @return [String]
- def text(cell, str='')
- inline_string_serialization cell, str
+ def text(cell, str)
+ if cell.ssti.nil?
+ inline_string_serialization cell, str
+ else
+ value_serialization 's', cell.ssti, str
+ end
end
private