Roundcube Community Forum

Release Support => Pending Issues => Topic started by: tjm74 on August 21, 2008, 01:48:40 AM

Title: replying to html msg from ms outlook, css rules become msg text
Post by: tjm74 on August 21, 2008, 01:48:40 AM
I've noticed when replying to Outlook html-formatted messages that:

1) they often contain inline css stylesheets

2) the style tags are stripped out in the reply (when tinymce serializes its html), but the inline css rules code remains.  I guess this has something to do with avoiding xss attacks? or just to prevent css rule name clashes?

3) despite the css rules within being "hidden" in an HTML comment (MS actually attempting to play nice!), the comment is neutered by tinymce and all the rules display in my reply.

The end result is that the reply contains (A) my msg, then (B) "xxx wrote..." then (C) a bunch of css garbage shows up as msg text before (D) the original quoted email.

I was able to hack tinymce to stop this from happening since it was driving me bananas.

Edit tiny_mce.js (in program/js/tiny_mce/) -- look for the first instance of:
if(hc)
and change it to
if(hc&&(!iv||nn!='style'))

which means, if the node has children, serialize the children for output BUT not if it's a