Thanks to the tip under the following URL, I'm able to read the body
in some special HTML format:
http://code.google.com/p/colorediffs/wiki/HowToGetMessageTextInThunderbird
The file nsMessenger.cpp suggests using ConvertBufToPlainText() to
convert it to plain text. I started looking for a JavaScript
accessible equivalent and found the following snippet. It works fine
in Firefox, but fails at the second line in Thunderbird.
var unescapeHTMLTemp = Components.classes["@mozilla.org/feed-
unescapehtml;1"];
var unescapeHTML =
unescapeHTMLTemp.getService(Components.interfaces.nsIScriptableUnescapeHTML);
alert(unescapeHTML.unescape("<ul><li><b>Hello</b></li><li>World<li></
ul>"));
Do you have an idea how to get it working in Thunderbird? I'd be happy
for any hint.
Thanks
After playing with these lines a bit more, I discovered that it works
just fine in Thunderbird 2.0.0.0 for GNU/Linux and Mac OS X. Under
Windows (XP), it works in Firefox 2.0.0.3, but doesn't work in
Thunderbird 2.0.0.0.
The JavaScript error at the second statement is:
Error: uncaught exception: [Exception... "Invalid InterfaceID"
nsresult: "0x80570018 (NS_ERROR_XPC_BAD_IID)"
Is this a bug in Thunderbird?
> After playing with these lines a bit more, I discovered that it works
> just fine in Thunderbird 2.0.0.0 for GNU/Linux and Mac OS X. Under
> Windows (XP), it works in Firefox 2.0.0.3, but doesn't work in
> Thunderbird 2.0.0.0.
> The JavaScript error at the second statement is:
> Error: uncaught exception: [Exception... "Invalid InterfaceID"
> nsresult: "0x80570018 (NS_ERROR_XPC_BAD_IID)"
> Is this a bug in Thunderbird?
("nsIScriptableUnescapeHTML" in Components.interfaces)
returns true in Firefox 2.0 but false in Thunderbird 2.0. Possibly a
build bug.
Phil
--
Philip Chee <phi...@aleytys.pc.my>, <phili...@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]We secretly replaced the dilithium with Folger's Crystals
* TagZilla 0.059.4