From 91705e083beeece533afcad8b7285f6698c2a6da Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Mon, 16 Jan 2023 01:23:36 +0000 Subject: Support for WebP images (#38168). * Inline image * Thumbnail * Inserting markup for an image uploaded by drag and drop Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22045 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/helpers') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fac31d569..72d9d8efd 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -944,7 +944,7 @@ module ApplicationHelper attachments += obj.attachments if obj.respond_to?(:attachments) end if attachments.present? - text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png))"(\s+alt="([^"]*)")?/i) do |m| + text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpe|jpeg|png|webp))"(\s+alt="([^"]*)")?/i) do |m| filename, ext, alt, alttext = $1, $2, $3, $4 # search for the picture in attachments if found = Attachment.latest_attach(attachments, CGI.unescape(filename)) -- cgit v1.2.3