Ecodev / newsletter

TYPO3 extension to send newsletter
https://extensions.typo3.org/extension/newsletter/
25 stars 26 forks source link

[BUG] Embed images with special chars in url #163

Closed rr-it closed 5 years ago

rr-it commented 6 years ago

The feature to embed images into the email does not work with image-urls containing special chars like "ä", "ö", "ü" etc.

Ecodev.Newsletter.Mailer::findAttachments searches the email-html-sourcecode for image-urls. The image-urls found are already urlencoded. Therfore the urls must be urldecoded before being processed further.

https://github.com/Ecodev/newsletter/blob/2b575eff2d78147c7fed0a7c36f33b49522118ea/Classes/Mailer.php#L186

As a fix I propose to change this line to: $swiftEmbeddedMarker = $this->getSwiftEmbeddedMarker(rawurldecode($url));

PowerKiKi commented 6 years ago

Your fix looks like it should work. Would you please create a PR and cover it with functional tests ?