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

Commitf91c198

Browse files
committed
bug#47329 Email image parts: regex for single closing quote (rr-it)
This PR was merged into the 4.4 branch.Discussion----------Email image parts: regex for single closing quote| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -The regex for image src matches for single and double opening quotes:`([\'"])`The corresponding matching for non-closing characters is implemented for double quotes only:`([^"]+)`This change adds a non-greedy regex `.+?` which matches for as few characters as possbile before the "correspondingly matched opening quote" `\\1` appears.Commits-------57c49b4 Email image parts: regex for single closing quote
2 parentsd651770 +57c49b4 commitf91c198

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Mime/Email.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ private function prepareParts(): ?array
503503
$html =stream_get_contents($html);
504504
}
505505
$htmlPart =newTextPart($html,$this->htmlCharset,'html');
506-
preg_match_all('(<img\s+[^>]*src\s*=\s*(?:([\'"])cid:([^"]+)\\1|cid:([^>\s]+)))i',$html,$names);
506+
preg_match_all('(<img\s+[^>]*src\s*=\s*(?:([\'"])cid:(.+?)\\1|cid:([^>\s]+)))i',$html,$names);
507507
$names =array_filter(array_unique(array_merge($names[2],$names[3])));
508508
}
509509

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp