On 8/2/2013 8:14 PM, MCBastos wrote:
Interviewed by CNN on 02/08/2013 18:28, Paul B. Gallagher told the world:
hawker wrote:

No I have a problem that the way SeaMonkey takes clipboard data from
an MS product does not work with all e-mail clients and that SeaMonkey
WYSIWYG is not working correctly under the hood. I'm sure if I went
from Word to Outlook directly it would work fine. It is SeaMonkey
that seems to mangle it. This is a SeaMonkey issue not MS. My guess
is it is a Clipboard parsing problem in SeaMonkey.

Probably not. SeaMonkey is probably being too obedient and capturing all
the garbage codes Word supplies instead of stripping them out. For
example, I tried pasting one sentence from a Word 2010 document into an
HTML composition window in SeaMonkey, and I got this:

<meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <p class="MsoBodyText">The body always operates as an integrated
        mechanism, and &#8220;forms&#8221;
        behavioral or motor acts in strict compliance with the conditions
        in which it
        is placed.<o:p></o:p></p>
followed by 423 more lines of code containing 20,044 characters
(including spaces). Yes, that's 20 thousand characters, not 20!

The sentence itself was well-formed; the only change was that the curly
quotes were rendered as HTML character entities, which is not a problem.



I confirm this behavior. I started with a *blank* Word document. I typed
*one* word in it, with default formatting. I copied that word and pasted
it into a new Seamonkey HTML-formatted message. Then I saved the message
and looked at the source code.

Surprise, surprise: that one word turned into 20 kb of garbage. And it's
easy to tell that the garbage originated in Word, because, well, things
like <o:> elements (nonstandard), classes named "Mso"-something (created
by Word) and conditional comments (another nonstandard, Microsoft-only
technology)

What I think is happening...

1. Word places a lot of proprietary garbage on the clipboard yet tags it
as "HTML"
2. Thunderbird/Seamonkey believes the tag and accepts the paste "as is."
3. It probably tweaks the content a little in order to mesh with the
rest of the HTML-formatted message.
4. Most non-MS mail clients ignore the proprietary garbage and render
the message the same as the Seamonkey-user sender intended.
5. Outlook, however, attempts to interpret those remains of the
proprietary garbage and fails horribly

The only way I see for fixing it from the Mozilla end would be to add
code for detecting MS proprietary garbage in the clipboard and run it
through a sanitizer (something like HTMLtidy with the -word2000 option)
to clean it up.


Thank you for being the first person to fully explain what is going on in a way I can understand. I'm still not sure what my best solution is but now I better understand the issue.

What I often have to do for work is discuss something going on in an e-mail, and there may be some text or data from a word document - say a specification or chart that I want to past in. Often it has formatting, bold, number list etc that I want to preserve so copying to text first means I have to re-apply all the formatting.

I wonder if there are any other formatted programs that can clean things up as you suggest without loosing the formating.



_______________________________________________
support-seamonkey mailing list
support-seamonkey@lists.mozilla.org
https://lists.mozilla.org/listinfo/support-seamonkey

Reply via email to