-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mime] Fix embed logic for background attributes #45376
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
Conversation
@@ -329,7 +329,7 @@ public function testGenerateBody() | |||
$generatedHtml = $parts[0]->getParts()[1]; | |||
$this->assertStringContainsString('cid:'.$parts[1]->getContentId(), $generatedHtml->getBody()); | |||
|
|||
$content = 'html content <img src="cid:test.gif">'; | |||
$content = '<div background="cid:test.gif"></div>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add new tests instead of modifying existing ones?
There's a coding style violation that wants me to add a trailing comma in the regex array. AFAIK that is only supported on PHP 7.3+, so it'll probably cause CI to fail. Should I still do it? |
also, what is your policy with implementing review comments, should I make new commits or squash immediately? |
implemented review comments (except for the trailing comma one, see above) |
Trailing commas in array constructors are allowed in PHP 7.1 already, no worries. |
As you wish, we can squash while merging. |
alright, thx. All suggestions should be implemented now |
I'm merging it in 6.1 as this is a new feature (this was not supported before). |
well, it worked with Swiftmailer, so from the point of view of the user it's still a regression |
Thank you @flack. |
We've been more and more strict about what we consider a bug. Stability is the most important thing for already released versions. |
Yeah, makes sense I guess. Unfortunately, for me it means I have to continue using the abandoned Switfmailer package (with composer shouting at me every time I update something) until I can migrate to php 8+ and sf 6 |
Hi. |
As suggested by @fabpot here #43255 (comment), this is the most minimal fix for the linked issue. I guess the same problem can happen if you use e.g.
I have changed it so that there is now an array of regexes to look for embedded images, so at least code for the
background-image
case (or others that might be found later on) can easily be added.