forked from extern/egroupware
Let filemanager/vfs handle escaping characters instead of just stripping them out
This commit is contained in:
parent
18442ff3e5
commit
97efc7808c
@ -169,6 +169,11 @@ class filemanager_select
|
||||
$files = $content['path'];
|
||||
break;
|
||||
|
||||
case 'saveas':
|
||||
// Don't trust the name the user gives, encode it
|
||||
$content['name'] = egw_vfs::encodePathComponent($content['name']);
|
||||
// Fall through
|
||||
|
||||
default:
|
||||
$files = egw_vfs::concat($content['path'],$content['name']);
|
||||
break;
|
||||
|
@ -2579,7 +2579,7 @@ app.classes.mail = AppJS.extend(
|
||||
url += 'menuaction=filemanager.filemanager_select.select'; // todo compose for Draft folder
|
||||
url += '&mode=saveas';
|
||||
var subject = dataElem? dataElem.data.subject: _elems[0].subject;
|
||||
var filename = subject.replace(/[\f\n\t\v/\\:*#?<>\|]/g,"_")|| 'unknown';
|
||||
var filename = subject.replace(/[\f\n\t\v]/g,"_")|| 'unknown';
|
||||
url += '&name='+encodeURIComponent(filename+'.eml');
|
||||
url += '&mime=message'+encodeURIComponent('/')+'rfc822';
|
||||
url += '&method=mail.mail_ui.vfsSaveMessage';
|
||||
|
Loading…
Reference in New Issue
Block a user