Skip to content
Snippets Groups Projects
Commit 35a64e57 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #772 from greezybacon/issue/relax-stripped-cid-detect


Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 40836b70 b707b871
No related branches found
No related tags found
No related merge requests found
......@@ -1282,7 +1282,7 @@ class ThreadBody /* extends SplString */ {
// Capture a list of inline images
$images_before = $images_after = array();
preg_match_all('/src="cid:([\w_-]+)(?:@|")/', $this->body, $images_before,
preg_match_all('/src=("|\'|\b)cid:(\S+)\1/', $this->body, $images_before,
PREG_PATTERN_ORDER);
// Strip the quoted part of the body
......@@ -1291,10 +1291,10 @@ class ThreadBody /* extends SplString */ {
// Capture a list of dropped inline images
if ($images_before) {
preg_match_all('/src="cid:([\w_-]+)(?:@|")/', $this->body,
preg_match_all('/src=("|\'|\b)cid:(\S+)\1/', $this->body,
$images_after, PREG_PATTERN_ORDER);
$this->stripped_images = array_diff($images_before[1],
$images_after[1]);
$this->stripped_images = array_diff($images_before[2],
$images_after[2]);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment