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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3351042-webform-6.1.x-5.patch | 1.77 KB | jrockowitz |
| #3 | 3351042-3.patch | 1.03 KB | jrockowitz |
Comments
Comment #2
jrockowitz commentedThe error I am getting with that file name is
Comment #3
jrockowitz commentedPlease review the attached patch
Comment #4
jrockowitz commentedComment #5
jrockowitz commentedHere is a backport to 6.1.x
Comment #8
jrockowitz commented