diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/rels/relationship.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/rels/relationship.rb b/lib/axlsx/rels/relationship.rb index 99c8e112..04911904 100644 --- a/lib/axlsx/rels/relationship.rb +++ b/lib/axlsx/rels/relationship.rb @@ -55,7 +55,7 @@ module Axlsx h = self.instance_values h[:Id] = 'rId' << rId.to_s str << '<Relationship ' - str << h.map { |key, value| '' << key.to_s << '="' << value.to_s << '"'}.join(' ') + str << h.map { |key, value| '' << key.to_s << '="' << Axlsx::coder.encode(value.to_s) << '"'}.join(' ') str << '/>' end diff --git a/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb b/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb index 3ea89c14..d352ec90 100644 --- a/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb +++ b/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb @@ -73,7 +73,7 @@ module Axlsx # r:id should only be specified for external targets. # @return [Hash] def location_or_id - @target == :external ? { :"r:id" => id } : { :location => location } + @target == :external ? { :"r:id" => id } : { :location => Axlsx::coder.encode(location) } end end end |
