Closed
Bug 21208
Opened 25 years ago
Closed 25 years ago
[DOGFOOD][Regression]copy and paste to plain text pastes html
Categories
(MailNews Core :: Composition, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M12
People
(Reporter: sspitzer, Assigned: akkzilla)
Details
in the plain text editor, or in plain text email, or in the
subject line, if I copy and paste, I get html when I paste.
if I copy "aaa" and paste I see
<body style="white-space: -moz-pre-wrap; font-family: -moz-fixed;
background-color: rgb(255,255,255); width: 80ch; ">aaa</body>
I'm logging this with 5.0, so I created that by copying aaa and
pasting it.
I see this on windows and unix.
qa contact to Sujay since this is in the plain text editor as well.
Assignee | ||
Updated•25 years ago
|
Assignee: beppe → akkana
Assignee | ||
Comment 2•25 years ago
|
||
I'll take this. It looks like we're pasting text/unicode, not text/html
(previously we didn't even handle text/unicode), but we're passing the html
source instead of converting to plaintext.
Updated•25 years ago
|
Summary: copy and paste to plain text pastes html → [DOGFOOD][Regression]copy and paste to plain text pastes html
Target Milestone: M12
Comment 3•25 years ago
|
||
this is a major regression with the copy/paste function, this should be a PDT+
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Whiteboard: Fix in hand, awaiting approval and code review
Assignee | ||
Comment 4•25 years ago
|
||
Turns out this is a problem in the clipboard, in nsXIFFormatConverter.cpp -- in
the unicode case, it's calling ConvertFromXIFToHTML instead of
ConvertFromXIFToText.
I have a patch that fixes this, for English and for the Japanese characters on
the editor test page (so as far as I can tell, it's really pasting html, not
plaintext). Adding some I18n people so they keep me honest.
Also adding Pinkerton, who owns the clipboard code; hoping he and/or Naoki can
review this for me.
Here's the patch:
Index: nsXIFFormatConverter.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/xpwidgets/nsXIFFormatConverter.cpp,v
retrieving revision 1.23
diff -r1.23 nsXIFFormatConverter.cpp
252c252,257
< if ( NS_SUCCEEDED(ConvertFromXIFToHTML(dataStr, outStr)) ) { //еее
shouldn't copy
---
> nsresult res;
> if (toFlavor.Equals(kHTMLMime))
> res = ConvertFromXIFToHTML(dataStr, outStr);
> else
> res = ConvertFromXIFToText(dataStr, outStr);
> if ( NS_SUCCEEDED(res) ) { //еее shouldn't copy
Comment 5•25 years ago
|
||
patch looks good. while you're at it, remove the comment about it not copying.
that was just for my reference, but isn't really important now.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: Fix in hand, awaiting approval and code review
Assignee | ||
Comment 6•25 years ago
|
||
Checked in. (I removed the comment, as suggested.)
Comment 7•25 years ago
|
||
Works much better now. Thanks and good job...
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•