mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-10 09:52:33 +01:00
FIX : filepath of generated documents doesn't handle products with special characters
This commit is contained in:
@@ -764,7 +764,7 @@ class FormFile
|
||||
|
||||
// Show file name with link to download
|
||||
$out.= '<td class="minwidth200">';
|
||||
$out.= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).($param?'&'.$param:'').'"';
|
||||
$out.= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode(dol_sanitizePathName($relativepath)).($param?'&'.$param:'').'"';
|
||||
$mime=dol_mimetype($relativepath,'',0);
|
||||
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
||||
$out.= '>';
|
||||
|
||||
Reference in New Issue
Block a user