Merge pull request #1556 from okriuchykhin/ok_SCI_3048

Fix local storage file download links [SCI-3048]
This commit is contained in:
Alex Kriuchykhin 2019-03-07 16:58:30 +01:00 committed by GitHub
commit ec1aec3bf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View file

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

View file

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

View file

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

View file

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