CSS Styles are not filtered in plain text views for E-Mails

Description

When an e-mail with a Html body is sent with mail.sendmail, two views are generated (html and plain text). The html body is converted into plain text using the method ConvertToText.
The conversion is pretty simple, br-tags are converted into new lines, afterwards all tags are removed, and the inner text remains.

A custom module sends emails with inline CSS inside < style > tags. In that case the css itself is turned into plain text.

Steps to reproduce:

  • Prepare yourself to examine the messages send from your dnn installation, for example with papercut

  • open admin->newsletter

  • enter some text into the body, then switch to html view

  • add some style like < style type="text/css"> any style < /style>"

  • send message and verify the plain text view ofthe email

Expected:

only the text is shown

Result:

text and style is shown

QA Test Plan

None

Attachments

2

Activity

Show:

Amritpal manak August 12, 2015 at 10:31 PM

The Issue is test and it now resolved. and attached the screenshot

Stefan Cullmann June 18, 2015 at 3:48 PM

Well, scripts would appear as PlainText. It would be easy to filter them also, but you normally don't insert javascript into Html Mails.

Sebastian Leupold June 18, 2015 at 2:52 PM

ah, I see now. so now, all tags, styles and scripts are removed, nice

Stefan Cullmann June 18, 2015 at 2:39 PM

Currently all tags including are moved, and now also the text between <style></style> is deleted .

Where do texts like name or ID come from? Can you help with the corresponding Html?

Sebastian Leupold June 18, 2015 at 1:13 PM

does this still preserve unnecessary texts like name and ID inside plain text?

Complete

Details

Assignee

Reporter

Triage

Triaged

Fixed in Build

Includes Code Fix

No

Documentation Required

No

Components

Fix versions

Affects versions

Priority

Created June 17, 2015 at 7:07 PM
Updated August 13, 2015 at 7:06 PM
Resolved June 18, 2015 at 12:37 PM