Fix local storage file download links [SCI-3048]

This commit is contained in:
Oleksii Kriuchykhin 2019-03-07 16:46:05 +01:00
parent d5110a4f87
commit 0c99ea9c5c
4 changed files with 7 additions and 5 deletions

View file

@ -152,6 +152,7 @@ class TeamZipExport < ZipExport
type_of: :deliver,
title: I18n.t('zip_export.notification_title'),
message: "<a data-id='#{id}' " \
"data-turbolinks='false' " \
"href='#{Rails.application
.routes
.url_helpers

View file

@ -90,6 +90,7 @@ class ZipExport < ApplicationRecord
type_of: :deliver,
title: I18n.t('zip_export.notification_title'),
message: "<a data-id='#{id}' " \
"data-turbolinks='false' " \
"href='#{Rails.application
.routes
.url_helpers

View file

@ -12,7 +12,7 @@
<button type="button" class="preview-close" data-dismiss="modal"><span class="fas fa-times"></span></button>
<span class="file-name"></span>
<span class="file-wopi-controls"></span>
<a class="file-download-link" href='#'>
<a class="file-download-link" href="#" data-turbolinks="false">
<p><span class="fas fa-download"></span> <%= t('Download')%></p>
</a>
</div>

View file

@ -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,