Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:6.1fromflack:fix42921
Feb 10, 2022

Conversation

@flack
Copy link
Contributor

@flackflack commentedFeb 9, 2022
edited
Loading

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#42921
LicenseMIT
Doc PR

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.

<divstyle="background-image:url(cid:test.gif)"></div>

I have changed it so that there is now an array of regexes to look for embedded images, so at least code for thebackground-image case (or others that might be found later on) can easily be added.

$this->assertStringContainsString('cid:'.$parts[1]->getContentId(),$generatedHtml->getBody());

$content ='html content <img src="cid:test.gif">';
$content ='<div background="cid:test.gif"></div>';
Copy link
Member

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?

@flack
Copy link
ContributorAuthor

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?

@flack
Copy link
ContributorAuthor

also, what is your policy with implementing review comments, should I make new commits or squash immediately?

@flack
Copy link
ContributorAuthor

implemented review comments (except for the trailing comma one, see above)

@derrabus
Copy link
Member

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?

Trailing commas in array constructors are allowed in PHP 7.1 already, no worries.

@derrabus
Copy link
Member

also, what is your policy with implementing review comments, should I make new commits or squash immediately?

As you wish, we can squash while merging.

@flack
Copy link
ContributorAuthor

alright, thx. All suggestions should be implemented now

@carsonbotcarsonbot changed the titleFix embed logic for background attributes[Mime] Fix embed logic for background attributesFeb 9, 2022
@nicolas-grekasnicolas-grekas added this to the4.4 milestoneFeb 9, 2022
@fabpot
Copy link
Member

I'm merging it in 6.1 as this is a new feature (this was not supported before).

@fabpotfabpot modified the milestones:4.4,6.1Feb 10, 2022
@flack
Copy link
ContributorAuthor

well, it worked with Swiftmailer, so from the point of view of the user it's still a regression

@fabpotfabpot changed the base branch from4.4 to6.1February 10, 2022 14:02
@fabpot
Copy link
Member

Thank you@flack.

@fabpot
Copy link
Member

We've been more and more strict about what we consider a bug. Stability is the most important thing for already released versions.

@flack
Copy link
ContributorAuthor

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

@fabpotfabpot mentioned this pull requestApr 15, 2022
@veto221
Copy link

veto221 commentedMay 19, 2022
edited
Loading

Hi.
Can I please for merge this for LTS version too?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.1

Development

Successfully merging this pull request may close these issues.

Mime: Email::embed doesn't work for background images

6 participants

@flack@derrabus@fabpot@veto221@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp