diff options
author | Go MAEDA <maeda@farend.jp> | 2023-03-22 03:43:19 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-03-22 03:43:19 +0000 |
commit | 5198dd54b7684dac2bd3379d9a5779c018aae323 (patch) | |
tree | 323ab7a62a75535db8bece0fed9ac7666a1f35eb | |
parent | fe386d14977b85a92aa430bc181703835372b144 (diff) | |
download | redmine-5198dd54b7684dac2bd3379d9a5779c018aae323.tar.gz redmine-5198dd54b7684dac2bd3379d9a5779c018aae323.zip |
WebP images support in PDF output (#38368).
Patch by Jun NAITOH.
git-svn-id: https://svn.redmine.org/redmine/trunk@22141 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | lib/redmine/export/pdf.rb | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -12,7 +12,7 @@ gem 'marcel' gem 'mail', '~> 2.8.1' gem 'nokogiri', '~> 1.14.0' gem 'i18n', '~> 1.12.0' -gem 'rbpdf', '~> 1.21.0' +gem 'rbpdf', '~> 1.21.1' gem 'addressable' gem 'rubyzip', '~> 2.3.0' diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index 2ead7f7ca..e7133210d 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -149,7 +149,7 @@ module Redmine def self.attach(attachments, filename, encoding) filename_utf8 = Redmine::CodesetUtil.to_utf8(filename, encoding) atta = nil - if /^[^\/"]+\.(gif|jpg|jpe|jpeg|png)$/i.match?(filename_utf8) + if /^[^\/"]+\.(gif|jpg|jpe|jpeg|png|webp)$/i.match?(filename_utf8) atta = Attachment.latest_attach(attachments, filename_utf8) end if atta && atta.readable? && atta.visible? |