Report a bug #342
Cannot select files containing blanks
|Target version:||HRM Development - 3.2.2|
Dear HRM developers,
In the image selection step of the job creation wizard (select_images.php) I cannot move images from the selecetion list "Images available on server" to the list "Selected images", if the image has a blank in its name. I tracked the problem down to line 58 of the file select_images.php:
$name = htmlentities($file, null, 'utf-8');
htmlentities returns nothing, if $file contains a non-breakable blank (0xA0). HRM converts normal blanks to non-breakable blanks and htmlentities seems to choke on that. The problem disappears, if I adjust the line as follows:
$name = htmlentities(str_replace(chr(160), ' ', $file), null, 'utf-8');
which replaces non-breakable blanks by normal blanks.
This affects version 3.2.1 of HRM.
#1 Updated by Aaron over 5 years ago
- Assignee set to Aaron
- Target version set to 11
Please try replacing select_images.php with this (not yet released) version: https://github.com/aarpon/hrm/blob/fix/3.2.2/select_images.php