Webform url attachment are not url_encode.

Created on 29 March 2023, over 1 year ago
Updated 11 June 2023, about 1 year ago

Problem/Motivation

The attachments' urls in the email sent by the webform cause 404 error.
/system/files/webform/xxxxxxxxxxxx/14455/Objectifs%20de%20qualité%20++-+àèé!i.pdf
The url is not url_encoded.

The url works after being encoded manually.

Steps to reproduce

Create a webform
Add a file upload field
Configure the webform to send all values using :
{{ webform_token('[webform_submission:values]', webform_submission, [], options) }}
Submit the form with a file which as a filename with special characters.
Received the mail and test the attachment url.

Proposed resolution

Url_encoding attachment url.

I know that I can use the sanitize option in the file upload field but it's not the correct solution if sanitizment is not required.
I guess we should be able to reach unsanitize files using a url_encoded url.

πŸ› Bug report
Status

Fixed

Version

6.1

Component

Code

Created by

πŸ‡«πŸ‡·France paul_leclerc Lausanne Switzerland

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

Comments & Activities

Production build 0.69.0 2024