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
This commit is contained in:
@@ -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(/\\/, "\\\\\\\\")
|
||||
|
||||
Reference in New Issue
Block a user