Problem/Motivation
When viewing a form, the help text listing the `Allowed types` lists the extensions separated by spaces. Prior to 6.3.x, this was a comma-separated list.
Webform 6.2.6

Webform 6.3.x-dev

These screenshots are from Drupal Core 10, but I also tested Webform 6.3.x with Drupal Core 11 and got the same result.
Steps to reproduce
I used brand-new installations of Drupal and Webform.
1. Add a file element to a Webform, such as a Document File element.
2. View the form and scroll to the file element.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| webform-document-file-6-3.png | 14.56 KB | jenna.tollerson | |
| webform-document-file-6-2.png | 14.68 KB | jenna.tollerson |
Issue fork webform-3614360
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #6
alanjrl commentedThe comma-delimited Allowed types list was lost when webform_preprocess_file_upload_help() was rewritten in 6.3.x. The old hook rewrote Core's description, while the new one only handles webform_file_limit.
This MR restores the comma-delimited display in WebformManagedFileBase::prepare(). Only the display copy of the FileExtension validator is changed; validation continues to use the space-delimited list required by FileExtensionConstraintValidator.
It also updates getFileExtensions() to remove duplicate separators, preventing values like txt, pdf from rendering as txt, , pdf.