diff options
| author | randym <[email protected]> | 2018-02-07 11:21:00 +0900 |
|---|---|---|
| committer | randym <[email protected]> | 2018-02-07 11:21:00 +0900 |
| commit | 3f34514ecf53fb4a3401b5336833bbeb439efe2a (patch) | |
| tree | 5a911a498db05f87756313e6d737e866dd37d176 /lib/axlsx.rb | |
| parent | 14c05d69ddf555528bb20991d289454d5350969c (diff) | |
| parent | 545d77371cf81c368ccfd761e5409cbc7e141711 (diff) | |
| download | caxlsx-3f34514ecf53fb4a3401b5336833bbeb439efe2a.tar.gz caxlsx-3f34514ecf53fb4a3401b5336833bbeb439efe2a.zip | |
Merge branch 'master' into release-3.0.0
Diffstat (limited to 'lib/axlsx.rb')
| -rw-r--r-- | lib/axlsx.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/axlsx.rb b/lib/axlsx.rb index 387a8b89..23fc6c8b 100644 --- a/lib/axlsx.rb +++ b/lib/axlsx.rb @@ -135,8 +135,12 @@ module Axlsx # @param [String] str The string to process # @return [String] def self.sanitize(str) - str.delete!(CONTROL_CHARS) - str + if str.frozen? + str.delete(CONTROL_CHARS) + else + str.delete!(CONTROL_CHARS) + str + end end # If value is boolean return 1 or 0 |
