summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-06 05:52:07 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-06 05:52:07 +0000
commitd6e2e81f0c860c7fa5b2142a591419275e0f51cf (patch)
tree0f31a6df350980f6055f5dde962a4aa0a8ca6152 /lib
parent411c7100cb7331968bef08458e0999959661099c (diff)
downloadredmine-d6e2e81f0c860c7fa5b2142a591419275e0f51cf.tar.gz
redmine-d6e2e81f0c860c7fa5b2142a591419275e0f51cf.zip
PDF: nil safe at fix_text_encoding(txt) of lib/redmine/export/pdf.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5345 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/export/pdf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb
index 55ab37da4..5ea33e3a8 100644
--- a/lib/redmine/export/pdf.rb
+++ b/lib/redmine/export/pdf.rb
@@ -143,6 +143,7 @@ module Redmine
end
def fix_text_encoding(txt)
+ txt ||= ''
if txt.respond_to?(:force_encoding)
txt.force_encoding('UTF-8')
txt = txt.encode(l(:general_pdf_encoding), :invalid => :replace,
@@ -154,7 +155,7 @@ module Redmine
@ic.iconv(txt)
rescue
txt
- end || ''
+ end
end
# 0x5c char handling
txt.gsub(/\\/, "\\\\\\\\")