diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-06-06 13:55:11 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-06-06 13:55:11 +0100 |
commit | 4b77176613a1235cc9f4f813bb5610c9930e3d2e (patch) | |
tree | d88b084ad348a9c3c95b1b78328125e3e4113c91 /lib | |
parent | 841fe0722498f6ec5b97ce22f8c7a429a1497843 (diff) | |
parent | 895fffedf54ae9ea4168cf03ca5aa55f93a93b49 (diff) |
Merge remote-tracking branch 'origin/hotfix/0.18.0.3'0.18.0.3
Diffstat (limited to 'lib')
-rw-r--r-- | lib/attachment_to_html/adapters/rtf.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/attachment_to_html/adapters/rtf.rb b/lib/attachment_to_html/adapters/rtf.rb index 859c0e541..95f499689 100644 --- a/lib/attachment_to_html/adapters/rtf.rb +++ b/lib/attachment_to_html/adapters/rtf.rb @@ -73,6 +73,8 @@ module AttachmentToHTML # Works around http://savannah.gnu.org/bugs/?42015 in unrtf ~> 0.21 def sanitize_converted(html) + html.nil? ? html = '' : html + invalid = %Q(<!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN>) valid = %Q(<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN>") if html.include?(invalid) |