escape filename in the ui

This commit is contained in:
Danny Coates 2017-07-18 11:53:43 -07:00
parent 45eccc1cad
commit b712a9d175
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
3 changed files with 7 additions and 9 deletions

View file

@ -104,19 +104,19 @@ $(document).ready(function() {
$('.percent-number').html(`${Math.floor(percent * 100)}`);
});
if (progress[1] < 1000000) {
$('.progress-text').html(
$('.progress-text').text(
`${file.name} (${(progress[0] / 1000).toFixed(
1
)}KB of ${(progress[1] / 1000).toFixed(1)}KB)`
);
} else if (progress[1] < 1000000000) {
$('.progress-text').html(
$('.progress-text').text(
`${file.name} (${(progress[0] / 1000000).toFixed(
1
)}MB of ${(progress[1] / 1000000).toFixed(1)}MB)`
);
} else {
$('.progress-text').html(
$('.progress-text').text(
`${file.name} (${(progress[0] / 1000000).toFixed(
1
)}MB of ${(progress[1] / 1000000000).toFixed(1)}GB)`
@ -225,7 +225,7 @@ $(document).ready(function() {
const url = file.url.trim() + `#${file.secretKey}`.trim();
$('#link').attr('value', url);
$('#copy-text').html(
$('#copy-text').text(
'Copy and share the link to send your file: ' + file.name
);
$popupText.attr('tabindex', '-1');