From 0c99ea9c5c1c96405d82313d3d6f088e89a2706a Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Thu, 7 Mar 2019 16:46:05 +0100 Subject: [PATCH] Fix local storage file download links [SCI-3048] --- app/models/team_zip_export.rb | 1 + app/models/zip_export.rb | 1 + app/views/shared/_file_preview_modal.html.erb | 2 +- config/initializers/constants.rb | 8 ++++---- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/models/team_zip_export.rb b/app/models/team_zip_export.rb index 2a55d2de4..0d9c9f85f 100644 --- a/app/models/team_zip_export.rb +++ b/app/models/team_zip_export.rb @@ -152,6 +152,7 @@ class TeamZipExport < ZipExport type_of: :deliver, title: I18n.t('zip_export.notification_title'), message: " +

<%= t('Download')%>

diff --git a/config/initializers/constants.rb b/config/initializers/constants.rb index fc656f499..e47ad2acf 100644 --- a/config/initializers/constants.rb +++ b/config/initializers/constants.rb @@ -224,10 +224,10 @@ class Constants span u s blockquote pre col colgroup table thead tbody th tr td ).freeze - WHITELISTED_ATTRIBUTES = %w( - href src width height alt cite datetime title class name xml:lang abbr style - target data-* - ).freeze + WHITELISTED_ATTRIBUTES = [ + 'href', 'src', 'width', 'height', 'alt', 'cite', 'datetime', 'title', + 'class', 'name', 'xml:lang', 'abbr', 'style', 'target', :data + ].freeze WHITELISTED_CSS_ATTRIBUTES = { allow_comments: false,