diff --git a/etemplate/inc/class.etemplate_widget_link.inc.php b/etemplate/inc/class.etemplate_widget_link.inc.php index 11d8499649..84daf6da92 100644 --- a/etemplate/inc/class.etemplate_widget_link.inc.php +++ b/etemplate/inc/class.etemplate_widget_link.inc.php @@ -179,10 +179,6 @@ class etemplate_widget_link extends etemplate_widget $link['target'] = '_blank'; $link['label'] = 'Delete'; $link['help'] = lang('Delete this file'); - if ($GLOBALS['egw_info']['user']['preferences']['common']['link_list_format'] != 'text') - { - $link['title'] = preg_replace('/: ([^ ]+) /',': ',$link['title']); // remove mime-type, it's alread in the icon - } $link['title'] = egw_vfs::decodePath($link['title']); $link['icon'] = egw_link::vfs_path($link['app2'],$link['id2'],$link['id'],true); $link['download_url'] = egw_vfs::download_url($link['icon']); diff --git a/etemplate/js/et2_widget_link.js b/etemplate/js/et2_widget_link.js index 9bddad4735..9ac47fff91 100644 --- a/etemplate/js/et2_widget_link.js +++ b/etemplate/js/et2_widget_link.js @@ -1517,7 +1517,8 @@ var et2_link_list = et2_link_string.extend( var link_data = self.context.data; if(link_data.app == 'file') { - var url = self.egw().mime_open(link_data); + // File info is always the same + var url = '/apps/'+link_data.app2+'/'+link_data.id2+'/'+decodeURIComponent(link_data.id); if(typeof url == 'string' && url.indexOf('webdav.php')) { // URL is url to file in webdav, so get rid of that part diff --git a/filemanager/inc/class.filemanager_select.inc.php b/filemanager/inc/class.filemanager_select.inc.php index bc105282ac..95723a1cdc 100644 --- a/filemanager/inc/class.filemanager_select.inc.php +++ b/filemanager/inc/class.filemanager_select.inc.php @@ -168,6 +168,11 @@ class filemanager_select case 'select-dir': $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']); diff --git a/mail/js/app.js b/mail/js/app.js index a8da721b96..e1b138d03b 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2552,7 +2552,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'; @@ -3481,7 +3481,7 @@ app.classes.mail = AppJS.extend( 'acc_id': acc_id, 'ajax': 'true' }); - + // an ugly hack for idots to show up sieve rules not in an iframe // but as new link, better to remove it after get rid of idots template if (typeof window.framework == 'undefined')