Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rss2email: Inline stylesheet not rendered in Rainloop #1495

Closed
ghost opened this issue Aug 31, 2017 · 8 comments
Closed

rss2email: Inline stylesheet not rendered in Rainloop #1495

ghost opened this issue Aug 31, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Aug 31, 2017

RainLoop version, browser, OS:
1.11.1, Chrome/Safari, Windows/OS X

Expected behavior and actual behavior:
Using rss2email (command line util) to deliver RSS feeds to email and using a custom stylesheet when delivering the feeds as HTML, fails to render the stylesheet in Rainloop. For reference, it works in Roundcube and local OS X Mail client.

I noticed rss2email renders the stylesheet inline, if that makes a difference.

Steps to reproduce the problem:
N/A short of having to install and configure rss2email.

Logs or screenshots:
Rainloop

rainloop-msg-top
rainloop-msg-middle
rainloop-msg-bottom

Roundcube

roundcube-msg-top
roundcube-msg-middle
roundcube-msg-bottom

@ghost
Copy link
Author

ghost commented Sep 7, 2017

Testcase eml files. Some feesd are encoded in base64 but in the 7bit ones, I noticed the stylesheet is commented out:

<head><style><!--body {font-family: Helvetica, Arial, sans-serif; margin: auto; width: 800px;} #body * {font-size: 20px; line-height: 30px;} h2 {font-size: 30px;} h3, h4, h5, h6 {font-size: 25px;} blockquote {font-family: Georgia, Times New Roman, serif; color: #888; border-left: 3px solid #888; padding-left: 30px;} a {color: #336699; text-decoration: none;} img {display: block; margin-bottom: 30px; max-width: 800px; height: auto;} iframe {display: none;} .header, .footer {margin: 0; padding: 30px 0; text-align: center;} .header {border-bottom: 1px solid #EEE; font-size: 35px; font-weight: normal; pointer-events: none;} .header a {color: #000;} .footer {border-top: 1px solid #EEE; font-size: 15px; cursor: default;} #body {padding: 30px 0;}//--></style></head>

eml.zip

@RainLoop
Copy link
Owner

RainLoop doesn't parse inline styles. There have been several attempts to do this, but unfortunately this has led to a variety of visual defects.

But, you may try to use convert-headers-styles plugin. It does exactly what you want.

@RainLoop
Copy link
Owner

image

@ghost
Copy link
Author

ghost commented Sep 25, 2017

Thanks a lot for the plugin reference.
I'm gonna try to ask my provider to install it. If not, I'm pretty confident I can modify rss2email to link to an external css file instead of processing it inline.

Since the cause of this issue is identified, I'm closing.

@ghost ghost closed this as completed Sep 25, 2017
@RainLoop
Copy link
Owner

@MEGADR01D

If not, I'm pretty confident I can modify rss2email to link to an external css file instead of processing it inline.

Yes, most of these programs use inline styles to ensure normal viewing of emails.

@ghost
Copy link
Author

ghost commented Sep 25, 2017

Also as extra information, I just realized that the commented out stylesheet is actually part of rss2email. I didn't notice this before and I thought it was post-processed by Rainloop.

So, wondering how Roundcube and Mail (OS X) display the stylesheet correctly, even when commented out, I found that it's a trick to support ancient browsers.

Simply put, old browsers, which don't support the <style> tag, just ignore it because it's commented out, while new browsers do the opposite, and ignore the comment tag (<!-- -->) surrounding an inline stylesheet.

@Oliv4945
Copy link

Hi @RainLoop, I have the same issue.
The plugin convert-headers-styles is now deprecated, so I can not install it from the admin page. What is the best way to install it ?

Thank you

@ghost
Copy link
Author

ghost commented Apr 26, 2018

Can't you upload the convert-headers-styles dir directly into the plugins dir?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants