nette/nette — pull request #1394 by JirkaChadima (2014-02-10 09:15:30+00:00)
Title: Mail: enhanced tests for embedding images into messages

This simulates things that are broken by regex at https://github.com/nette/nette/blob/master/Nette/Mail/Message.php#L234 that takes care of embedding images directly into a message. Regex does not work in one particular case that I (and many e-mail clients and browsers) consider valid such as (in url2 test):

```html

```

This works as expected (image.png is embedded) - url1 test:

```html

```

I believe the regex should also match relative image path in url without apostrophes and I think the problem lies in the backreference usage which does not work because no apostrophe/quote gets matched in the first place. Unfortunately I was not able to fix it on the regex level. I have modified source data instead as a workaround.

Related discussion: http://forum.nette.org/en/1377-nette-mail-message-too-strict-regex-for-image-embedding#p6205