Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/9177
Change subject: redmine: add missing patch "redmine-issue-2047-svg-image-support.diff" ...................................................................... redmine: add missing patch "redmine-issue-2047-svg-image-support.diff" Change-Id: Ib357ed1c847c7c3d9395b1b45a7f9b4a88dd09f8 --- A redmine/redmine-issue-2047-svg-image-support.diff 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/77/9177/1 diff --git a/redmine/redmine-issue-2047-svg-image-support.diff b/redmine/redmine-issue-2047-svg-image-support.diff new file mode 100644 index 0000000..23fc1e2 --- /dev/null +++ b/redmine/redmine-issue-2047-svg-image-support.diff @@ -0,0 +1,24 @@ +diff -ru app.orig/helpers/application_helper.rb app/helpers/application_helper.rb +--- app.orig/helpers/application_helper.rb 2018-01-08 19:37:37.000000000 +0000 ++++ app/helpers/application_helper.rb 2018-05-14 08:15:11.558390732 +0000 +@@ -637,7 +637,7 @@ + attachments = options[:attachments] || [] + attachments += obj.attachments if obj.respond_to?(:attachments) + 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|svg))"(\s+alt="([^"]*)")?/i) do |m| + filename, ext, alt, alttext = $1.downcase, $2, $3, $4 + # search for the picture in attachments + if found = Attachment.latest_attach(attachments, CGI.unescape(filename)) +diff -ru app.orig/models/attachment.rb app/models/attachment.rb +--- app.orig/models/attachment.rb 2018-01-08 19:37:37.000000000 +0000 ++++ app/models/attachment.rb 2018-05-14 08:14:49.542526978 +0000 +@@ -193,7 +193,7 @@ + end + + def image? +- !!(self.filename =~ /\.(bmp|gif|jpg|jpe|jpeg|png)$/i) ++ !!(self.filename =~ /\.(bmp|gif|jpg|jpe|jpeg|png|svg)$/i) + end + + def thumbnailable? -- To view, visit https://gerrit.osmocom.org/9177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib357ed1c847c7c3d9395b1b45a7f9b4a88dd09f8 Gerrit-Change-Number: 9177 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>