# in pdf name not working
This commit is contained in:
parent
c5d481ee78
commit
1d5fdf35ec
3 changed files with 7 additions and 2 deletions
|
@ -66,7 +66,7 @@ pandora.ui.document = function() {
|
|||
? pandora.user.ui.documents[item.id].position
|
||||
: 1,
|
||||
url: '/documents/' + item.id + '/'
|
||||
+ item.title.replace('?', '_') + '.' + item.extension,
|
||||
+ pandora.safePDFName(item.title + '.' + item.extension),
|
||||
width: that.width(),
|
||||
zoom: 'fit'
|
||||
})
|
||||
|
|
|
@ -196,7 +196,7 @@ pandora.ui.documentDialog = function(options) {
|
|||
? pandora.user.ui.documents[item.id].position
|
||||
: 1,
|
||||
url: '/documents/' + item.id + '/'
|
||||
+ item.title.replace('?', '_') + '.' + item.extension,
|
||||
+ pandora.safePDFName(item.title + '.' + item.extension),
|
||||
width: dialogWidth,
|
||||
zoom: 'fit'
|
||||
})
|
||||
|
|
|
@ -2625,6 +2625,11 @@ pandora.openURL = function(url) {
|
|||
}
|
||||
};
|
||||
|
||||
pandora.safePDFName = function(name) {
|
||||
name = name.replace('?', '_').replace('#', '_');
|
||||
return name;
|
||||
};
|
||||
|
||||
pandora.saveURL = function(url, name) {
|
||||
var link = document.createElement('a');
|
||||
if (typeof link.download === 'string') {
|
||||
|
|
Loading…
Reference in a new issue