cancel
Showing results for 
Search instead for 
Did you mean: 

Stripping the HTML from Private Message eMail Notifications

Community Veteran
Posts: 5,555
Thanks: 1,499
Fixes: 35
Registered: ‎16-10-2014

Stripping the HTML from Private Message eMail Notifications

I’m sure I have asked this before, but search cannot find anything using the obvious criterion. So to ask again, is it possible to have the HTML stripped from a private message when it is sent as an email please. I use a plain text email client so the HTML tags make it quite awkward to read.

I have searched the settings but I can’t find anything relating to this either that it is so obvious I can't see it.

 

4 REPLIES
Community Gaffer
Community Gaffer
Posts: 3,341
Thanks: 2,105
Fixes: 76
Registered: ‎22-02-2016

Re: Stripping the HTML from Private Message eMail Notifications

Thanks for bringing this to my attention.

There might be something that can be done as I can edit the templates and access the variables seperately for HTML and TEXT versions. Again, its all done via freemarker syntax so there could be a switch somewhere...

Let me add this to my Community bug list to have it sized by the team and looked into. I have posted on the Lithium dev network about it too as the variable for the body text in the TEXT version was set as the same as the HTML version with no other alternative.

Frontend Web Developer | www.plus.net

If you have an idea to improve the community, create a new topic on our Community Feedback board to start a discussion about your idea.

Superuser
Superuser
Posts: 12,773
Thanks: 4,033
Fixes: 26
Registered: ‎22-08-2007

Re: Stripping the HTML from Private Message eMail Notifications

Hi Jack,

If there is an opportunity to improve the appearance of sent PMs, could you please consider tweaking the CSS for viewing sent PMs ... by removing the following CSS rule?

.lia-message-body-content p, .lia-message-body p, .lia-message-editor p, .lia-note-body p {
    margin-bottom: 0px;
}

This will give space between paragraphs.

Also in the area of formatting PMs, when replying to a PM the HTML is completely removed from the "Reply to" view of the original PM within ...

<div class="lia-note-body lia-component-body-search-blurb">
				 Good Morning, 
 &nbsp; 
 Long time since we had a chat.&nbsp; I want to get a process implemented ... and value your input.&nbsp; ............ 
 &nbsp; 
 Im suggesting that we offer a .......... this needs discussion with the other SU's ..... 
			</div>

Consequently the original text is rendered as a single solid block.  Odd enough, if quoted into the edit widow it acquires HTML formatting ... which I guess is performed by tinyMEC?

Thanks.

Community Veteran
Posts: 5,555
Thanks: 1,499
Fixes: 35
Registered: ‎16-10-2014

Re: Stripping the HTML from Private Message eMail Notifications

Thanks @jaread83, as always your time and effort is appreciated.

Community Gaffer
Community Gaffer
Posts: 3,341
Thanks: 2,105
Fixes: 76
Registered: ‎22-02-2016

Re: Stripping the HTML from Private Message eMail Notifications

A friend and colleague that develops another Lithium forum has provided me with a velocity regex pattern that should remove the HTML tags and leave just the text.

I will look into the changing of the CSS of the sent items too but I am not sure there is anything I can do about the second point you raised.

Frontend Web Developer | www.plus.net

If you have an idea to improve the community, create a new topic on our Community Feedback board to start a discussion about your idea.