Closed Bug 310201 Opened 19 years ago Closed 19 years ago

D&D: dropped text is double-spaced

Categories

(Core Graveyard :: Widget: OS/2, defect)

x86
OS/2
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dragtext, Assigned: mkaply)

Details

(Keywords: fixed1.8)

Attachments

(1 file)

While responding to Bug #267609, I dragged some text from a file & dropped it into the Comments text area. Although it was correctly formatted when I dropped it, it was double-spaced after I committed the comment. My guess is that the CrLf is being interpreted as two separate linebreaks. This patch should fix the problem by eliminating all carriage returns from dropped text. The text you're reading will confirm whether my guess is correct because it was composed with explicit CrLf linebreaks and was dropped into the Comments text area.
looks like it works...
Attachment #197593 - Flags: review?(mozilla)
Comment on attachment 197593 [details] [diff] [review] remove CRs from dropped text Seems like a lot of work to remove carriage returns... :)
Attachment #197593 - Flags: review?(mozilla) → review+
(In reply to comment #2) > Seems like a lot of work to remove carriage returns... :) I can't say that I understand this comment. Allocating a new buffer for the results would require more work, as would examining the text character by character.
(In reply to comment #3) > I can't say that I understand this comment. Allocating a new buffer for the > results would require more work, as would examining the text character by character. True. If only it was an nsString.... Anyway, I'll check this in asap.
From your description it could just as well be a bug in Bugzilla but I just confirmed the problem with a webmail site. Still, I wonder if there there is a standard that says that text in HTML forms should only be LF and not CRLF? I didn't find it but I could just have used stupid search parameters... The problems is also present on the 1.8 branch.
I found RFC 1867 which says in section 5.9 that CRLFs are to be used as line separators in HTML forms. But forms get converted to CRLF anyway on submission (somewhere in nsFormSubmission.cpp) so that this is indeed the correct fix.
Comment on attachment 197593 [details] [diff] [review] remove CRs from dropped text OS/2 only fix
Attachment #197593 - Flags: approval1.8rc2?
Comment on attachment 197593 [details] [diff] [review] remove CRs from dropped text OS/2 Only - approved to land
Attachment #197593 - Flags: approval1.8rc2? → approval1.8rc2+
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: