Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to fix links #47

Open
wants to merge 2 commits into
base: live
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.1
3.2
4 changes: 2 additions & 2 deletions scripts/generate_ftp_links.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'json'
require 'pathname'
require 'uri'
require 'cgi'

def get_wgs_links(id, wgs)
return if wgs.nil?
Expand Down Expand Up @@ -86,7 +86,7 @@ def generate_urls(hash, keys, is_array = false)
urls = keys.map do |k|
is_array ? hash.map { |h| h[k]&.split(';') } : hash[k]&.split(';')
end.flatten.compact
urls.map { |e| URI.encode(e) }
urls.map { |e| CGI.escape(e) }
end

def process_links(links, id, type)
Expand Down
4 changes: 2 additions & 2 deletions www/assets/js/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ if (!PGP) {
PGP.addReports = function(data, child_html, type, wrapper_id) {
if (data[type] == undefined) return;
for (var i = 0; i < data[type].length; i++) {
$('<a download="">')
$('<a>')
.addClass('btn btn-3d btn-default btn-icon-left btn-lg')
.css('margin-right', '5px')
.attr('type', 'button')
Expand Down Expand Up @@ -282,7 +282,7 @@ if (!PGP) {
$(file_html)
.find('.' + data[i].section)
.append(
$('<a download="">')
$('<a>')
.addClass('btn btn-3d btn-default btn-icon-left btn-lg')
.css('margin-right', '10px')
.attr('type', 'button')
Expand Down