Provide left-sided trimming for filename sanitization

Created on 16 January 2024, 5 months ago

Hello,

since drupal 10.2 we have in-core filename sanitzation.

At first a big thanks to this new feature. Made parts of our custom implementation obsolete :)

Only one thing bothers me: why is the replacement character only trimmed at the right side of the filename and not on the left one, as well?

https://github.com/drupal/core/blob/10.2.x/modules/file/src/EventSubscri...

I think filenames like -some-filename.png are not so nice. What has been the reason to implement it that way? Couldn't find info in the issue log of https://www.drupal.org/project/drupal/issues/2492171 ✨ Provide options to sanitize filenames (transliterate, lowercase, replace whitespace, etc) Fixed

Thanks in advance!

Bye

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
File moduleΒ  β†’

Last updated 3 days ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024