diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 5b814ece52603..0fa6d65e9078a 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -928,7 +928,7 @@ public function exportAsAttachedPDF($name = "") if (!empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $name=preg_replace('/\.od(x|t)/i', '', $name); header('Content-type: application/pdf'); - header('Content-Disposition: attachment; filename="'.$name.'.pdf"'); + header('Content-Disposition: attachment; filename="'.basename($name).'.pdf"'); readfile($name.".pdf"); } }