|
|
|
[
Permlink
| « Hide
]
Nick Bolton [31/Aug/07 01:04 PM]
I applied the suggested solution and attached a patch compiled using jdk1.5.
This issue is resolved by commit to JA-SIG SVN by nbolton and this Jira issue can change state to resolved to reflect that soon. However, for esoteric coordination reasons, I need this Jira issue to remain in an "unresolved" state for a few days. This has to do with the way the Cooperative Support development request tracking system understands JA-SIG issue states, and is a limitation I'll take a look at addressing so I don't have to ask for this sort of accommodation in the future. In the meantime, I ask that everyone bear with me (think of this as part of the overhead of Unicon contributing to JA-SIG open source and fixing issues) and I'll make a point of updating this issue's state in a few days. - Andrew Petro / Unicon
Nick,
This is a welcome change! Thank you. While you're under the hood, could you remove the comment on the next line? "(Freddy reverted to choose plain)" It makes it look like the code should still be choosing plain over html. I tried to put this change in my local UBC_Webmail to test it out, and get a syntax error.
Looks like there is a typo in the committed code...an extra closing paren: bodyPart.isMimeType("text/html") && !bodyText.isMimeType("text/html"))) { There used to be 2 closing parens. Sorry about that. Trunk seems to be broken (prior to this change), so I couldn't test it in the trunk environment. I updated it. It should compile now.
Thanks. It compiles clean and I've tested it a bit. It functions just fine, but there is one side-effect that would be nice to get around. If there is a url link in the email message and you click on it, it replaces the portal with the linked page. Is there a way that is not too painful to trap the hrefs in the email body and add a target="_blank" to them?
Sorry to be a nag about this, but there is another side-effect that I just noticed. If you reply to an html message, your reply lists the raw html. Until UBC_Webmail has a default html-based editor, replies to any html messages will look very funky. Also, to complicate my last comment, some url links within email messages may already have a target specified, so the logic would have to leave those as is. I love seeing the html email messages, and so will our users, but these side-effects make me think twice about whether I would want to see it implemented yet.
Maybe that's why it was changed to favor text parts a long time ago (2003). I pinged George about it. Perhaps he can comment further.
The attached .class file is not against HEAD and is really just a snapshot in time for convenience in trying out the change. The "right" way to get this change is from SVN or from a "real" UBC_Webmail release with this change if and when one happens.
Ok. I think I have an approach that addresses Paul's concerns in the majority of cases. From switching to tagsoup (from http://www.ja-sig.org/issues/browse/UBCWEBMAIL-82
And to address the replying to html emails .. I thought MessageParts could keep track of the text/plain parts and when replying, have it choose the text part over the html part to populate the textarea. A case where this won't work is where you have an html email without a text part. In this case, we can apply a primitive filter that will strip the html tags and maintain a basic format. It does lose the reply quote levels in the propcess tho. :-/ I added the approaches outlined in the last comment (adding target="_blank" attributes to links and converting html replies to text).
| |||||||||||||||||||||||||||||||||||||||||||||||||||||