Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space added in long attachment file name with special characters #240

Closed
fundo-moretti opened this issue Aug 2, 2024 · 3 comments
Closed

Comments

@fundo-moretti
Copy link

As of version 3.x, when parsing a long attachement file name with special characters, a space is added when encoded file name splits over two lines.

Original file name:

Finethic_action S_Décompte_Fondation NEXT_31 mars 2017.pdf

Encoded file name:

name="=?UTF-8?Q?Finethic=5Faction_S=5FD=C3=A9compte=5FFondation_NEXT=5F31_mars_2017=2Epd?=
=?UTF-8?Q?f?="

Decoded file name:

Finethic_action S_Décompte_Fondation NEXT_31 mars 2017.pd f

If you remove a single character from file name, decoding is correct; I suspect that the extra space comes from an encoding on two lines.

Example with attached files: Test.txt

zbateson added a commit that referenced this issue Aug 5, 2024
If two mime-encoded parts are found in a single quoted-part, ignore
any whitespace between them.
@zbateson
Copy link
Owner

zbateson commented Aug 5, 2024

Hi @fundo-moretti -- this should be good in 'master' now if you have a chance to give it a go. I'll aim to release in a week or so if nothing else comes up.

Thanks for the detailed report :)

@fundo-moretti
Copy link
Author

Hi @zbateson, many thanks! It works as expected.

@zbateson
Copy link
Owner

Released in 3.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants