Project

General

Profile

Actions

Defect #15716

closed

Scraped emails include CSS from HTML emails

Added by Deoren Moor over 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Email receiving
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

I'm not sure how many others are encountering this behavior, but when replying to an email notification (and making sure to remove all text from the body) the CSS for HTML emails is included as if it were written by the user. In this particular case I responded to a notification using the default mail client from iOS 7.

Example reply:

Sure, that will work.

body {
font-family: Verdana, sans-serif;
font-size: 0.8em;
color:#484848;
}
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; }
h1 { font-size: 1.2em; }
h2, h3 { font-size: 1.1em; }
a, a:link, a:visited { color: #2A5685;}
a:hover, a:active { color: #c61a1a; }
a.wiki-anchor { display: none; }
fieldset.attachments {border-width: 1px 0 0 0;}
hr {
width: 100%;
height: 1px;
background: #ccc;
border: 0;
}
span.footer {
font-size: 0.8em;
font-style: italic;
}

Our environment:

  Redmine version                2.4.1.stable.12325
  Ruby version                   1.8.7-p352 (2011-06-30) [i686-linux]
  Rails version                  3.2.15
  Environment                    production
  Database adapter               MySQL

Files


Related issues

Related to Redmine - Defect #19740: "Truncate emails after one of these lines" setting is not workingClosed

Actions
Related to Redmine - Defect #20311: Task from Email - Styles in task textClosed

Actions
Actions #1

Updated by Deoren Moor about 10 years ago

Is there any additional information that I can provide? Any tips/config changes that I can try?

Thanks.

Actions #2

Updated by Go MAEDA almost 10 years ago

I cannot reproduce with Redmine 2.5.1/iOS 7.1.1. Does this problem still occur?

Actions #3

Updated by Deoren Moor almost 10 years ago

Hi,

Thanks for the reply. Yes, it occurs every time I send an email from an iOS device. I have not yet tested with the newly released Redmine 2.5.2, but I will do so and post back with my results.

Actions #4

Updated by Deoren Moor almost 10 years ago

Deoren Moor wrote:

Yes, it occurs every time I send an email from an iOS device.

To be clear, my OP had the key ingredient:

I responded to a notification using the default mail client from iOS 7.

I did not see the behavior when sending in the initial report, but when replying to an email that is when I noticed it. It's also worth noting that we have our Redmine installation configured to send HTML emails and not plaintext emails.

It probably doesn't make a difference, but I sent the test email and test reply from an iOS 7.1.2 device.

Actions #5

Updated by Go MAEDA almost 10 years ago

No problem with iOS 7.1.2 and notification from www.redmine.org. What happens when you reply to the notification from www.redmine.org?

Actions #6

Updated by Deoren Moor almost 10 years ago

I just replied, but I noticed that the address I was replying to is '', so I suspect it will not end up here.

Is there any additional information I can supply about our setup?

Actions #7

Updated by Deoren Moor almost 10 years ago

Sounds like someone else is having the problem too (maybe they just posted to the wrong ticket): #10929#note-4

Actions #8

Updated by Deoren Moor almost 10 years ago

Digging back through our Redmine system I found that the earliest example of this happening is June 24, 2013. We would have been running whatever Redmine version was current at the time. If I'm not mistaken, that would be version 2.3.1.

Actions #9

Updated by Deoren Moor almost 9 years ago

Note: this is still a problem as of Redmine 3.0.2. We see it often for current versions of Mac OS X and iOS. I'm still using iOS 7 on a work device, and I see the behavior with it as well.

Actions #10

Updated by Toshi MARUYAMA almost 9 years ago

  • Related to Defect #19740: "Truncate emails after one of these lines" setting is not working added
Actions #11

Updated by Deoren Moor almost 9 years ago

Still a problem as of Redmine 3.0.3 + back-ported changes in r14313.

Actions #12

Updated by Jean-Philippe Lang almost 9 years ago

Works fine for me when replying from iOS 8.3 with current trunk (including r14313), here is what I get in Redmine:

Can you send a test reply to my email address () so I can try to reproduce?

Actions #13

Updated by Jean-Philippe Lang almost 9 years ago

My reply from iOS contains a plain text part and a html part so Redmine chooses the plain text part, with the result above.
If I manually remove the plain text part before submitting the email to Redmine, here is was I get:

Actions #14

Updated by Deoren Moor almost 9 years ago

Jean-Philippe Lang wrote:

Works fine for me when replying from iOS 8.3 with current trunk (including r14313), here is what I get in Redmine:

...

Can you send a test reply to my email address () so I can try to reproduce?

Thanks for the reply and for testing.

I was a bit confused when I saw your example, so I took a closer look at Apple Mail on my iPhone 4 w/iOS 7.1.2 and found that the Increase Quote Level was set to Off. I tried with it both Off and On and got the same results. This is with me doing nothing more than adding my reply at the top and hitting send.

I'm going to forward the emails as an attachment (from Outlook) to the personal email address you've listed. If you'd rather have them in a different format please let me know and I'll provide them in whichever format you wish. Thanks again for looking into this.

Actions #15

Updated by Deoren Moor almost 9 years ago

Just sent two samples, one with Increase Quote Level On and another with it set to Off. Both appear to give the same results:

redmine_3.0.3+r14313_replies_from_iPhone4_iOS_7.1.2.png

In the past the CSS wasn't collapsed and looked more like what was shown in the OP.

Actions #16

Updated by Jean-Philippe Lang almost 9 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.1.0
  • Resolution set to Fixed

This should be fixed by r14315, style tags inside html body were not removed. Please reopen if you still experience the problem after this.

Actions #17

Updated by Toshi MARUYAMA almost 9 years ago

  • Related to Defect #20311: Task from Email - Styles in task text added
Actions #18

Updated by Dmitriy Ermakov almost 9 years ago

Good day!
I am from task http://www.redmine.org/issues/20311

I apply r14315 (http://www.redmine.org/projects/redmine/repository/revisions/14315).
But now i receive styles in my tasks(

P {margin-top:0;margin-bottom:0;}

test

Actions #19

Updated by Toshi MARUYAMA almost 9 years ago

Dmitriy Ermakov wrote:

I apply r14315 (http://www.redmine.org/projects/redmine/repository/revisions/14315).
But now i receive styles in my tasks(

P {margin-top:0;margin-bottom:0;}

test

You need to apply r14313 at first.

Actions

Also available in: Atom PDF