FIX Yogosha report 4426 (backport)

This commit is contained in:
Alexandre SPANGARO 2020-09-16 21:19:31 +02:00
parent 2ff633a89f
commit be318f679b
2 changed files with 4 additions and 3 deletions

View File

@ -1259,7 +1259,8 @@ class FormFile
}
else
{
print dol_trunc($file['name'], 200);
$filenametoshow = preg_replace('/\.noexe$/', '', $file['name']);
print dol_escape_htmltag(dol_trunc($filenametoshow, 200));
print '</a>';
}
// Preview link

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2008-2017 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2008-2020 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -127,7 +127,7 @@ if ($action == 'update')
$oldlabel=GETPOST('urlfile', 'alpha');
$newlabel=GETPOST('label', 'alpha');
$shareenabled = GETPOST('shareenabled', 'alpha');
$shareenabled = dol_sanitizeFileName(GETPOST('label', 'alpha'));
//$db->begin();