contao/test — Issue #84: Email.php->findHtmlImages not working when 1 filename is contained in another filename
Author: importer
Created: 2011-11-29 04:28:01+00:00
State: open
Labels: Defect, framework

Problem:

Create an e-mail with 2 inline images: x.gif (spacer) and citrix.gif (company logo), so that the 1 filename occurs inside the other (x.gif occurs inside citrix.gif).

Set the Email Object's imageDir property to where the images are located in the tl_files folder.

Send the message. The citrix.gif image does not appear as it has been replaced as follows:

```

```

This is due to the fact that when the str_replace routine is used, it only searches the portion of the string 'x.gif' and finds this in citrix.gif as well and performs a replacement.

Possbile solution. Include the quotation as part of the search/replace function, e.g.

```
$this->strHtml = str_replace('"'. $m .'"', '"cid:' . $c .'"', $this->strHtml);
```

[Download the attachments](http://www.contao.org/tl_files/tickets/84.zip "Download the attachments of this ticket")

--- _Originally created by thyon on September 11th, 2008, at 11:52am (ID 84)_