Fix #1015 Export name containing non ASCII are now escaped

This commit is contained in:
Romain Neutron
2012-11-28 13:50:26 +01:00
parent 6dcf57b2fc
commit 07d65d12d5

View File

@@ -768,11 +768,12 @@ class set_export extends set_abstract
$file, $exportname, $mime, $disposition = 'inline')
{
$registry = registry::get_instance();
$unicode = new \unicode();
$response = new Symfony\Component\HttpFoundation\Response();
$disposition = $disposition === 'attachment' ? ResponseHeaderBag::DISPOSITION_ATTACHMENT : ResponseHeaderBag::DISPOSITION_INLINE;
$headerDisposition = $response->headers->makeDisposition($disposition, $exportname);
$headerDisposition = $response->headers->makeDisposition($disposition, $exportname, $unicode->remove_nonazAZ09($exportname));
if (is_file($file)) {
if ($registry->get('GV_modxsendfile')) {