Closed Bug 54851 Opened 24 years ago Closed 24 years ago

paragraph breaks lost during copy/paste to another X app

Categories

(Core :: DOM: Serializers, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: jpeek, Assigned: akkzilla)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.14-5.0 i686; en-US; m17) Gecko/20000807
BuildID:    2000080712

Whenever I highlight text in a web page (almost any one; one example is
http://www.jpeek.com), then paste into another application (like an xterm), the
blank lines on the browser page usually aren't carried over to the pasted text.
 So I get a big glob of text.

This isn't just a problem in xterm windows; it seems to happen when I paste it
into most other X applications.

Reproducible: Always
Steps to Reproduce:
1.Open an xterm window. In the window, type: cat > /tmp/paste.out
2.Go to a browser window.  Open a text web page like http://www.jpeek.com/ (or
almost any other).
3.Select all of the text with the mouse: point to the title of the page, hold
down the first mouse button, drag to the bottom-right corner of the page,
release the mouse button.
4.Go to an xterm window.  Click the second mouse button to paste text. (Then
press ENTER and Ctrl-d to make cat quit.)

Actual Results:  You'll see a mass of text with no blank lines, with some
following lines joined into paragraphs. (See "Additional Information" below.)

Expected Results:  A neatly formatted piece of text, like what I get when I do
the same thing with Netscape 4.75.

Here's how that page looks when I copy and paste from Netscape 4.75:

------------------------

Jerry Peek

Welcome to my Web site!

You can see every page on this site by clicking the
main links (at the left margin) and browsing through.
I've chosen a few of the links that you might want to go
to directly; they're indented under the main links.

  Personal (the story of my life...)
    Tucson, Arizona
    Travel (my favorite spots)
    Radio Broadcasting
  Career Summary (resume/CV)
    Books I've Written
    Talks I've Given
    Freely-available Software (and why you should care about it)
  Links to Other Sites

Thanks to my ISP, the very nice people at Trans-Atlantic Communications.

Last change (to this home page): 23 August 2000

------------------------

Here's how the page looks when copied and pasted from Mozilla:

------------------------

Jerry Peek Welcome to my Web site! You can see every page on this site by
clicking the main links (at the left margin) and browsing through. I've chosen a
few of the links that you might want to go to directly; they're indented under
the main links. Personal (the story of my life...)
   Tucson, Arizona
   Travel (my favorite spots)
   Radio Broadcasting
Career Summary (resume/CV)
   Books I've Written
   Talks I've Given
   Freely-available Software (and why you should care about it)
Links to Other Sites Thanks to my ISP, the very nice people at Trans-Atlantic
Communications. Last change (to this home page): 23 August 2000

------------------------
Joe is in the middle of rewriting the paste code.  Joe, when it's ready, can you
check to make sure that this case is covered?  Or reassign it back to me if you
think that's more appropriate.
Assignee: akkana → jfrancis
setting to m19 so it stays on the radar
Target Milestone: --- → M19
marking new
Status: UNCONFIRMED → NEW
Ever confirmed: true
This web page isn't text, it's html. I'll check it out once noxif branch is 
ready.  If it's broken there then my guess is that it's an html->text conversion 
issue.
moving this over to future
Target Milestone: M19 → Future
akkana, this is the plaintext serializer I believe.  It has some casing for 
forcing newlines after some blocks.  I bet <p> needs to be added to the list.  
Are you the owner?
Assignee: jfrancis → akkana
<p> was already in the list; the problem was some other bugs we had in paragraph
handling.  This is fixed on the trunk (at least, copying from the test case and
pasting into an xterm looks good now; like the 4.x sample except it doesn't wrap
the text, which is intentional since that was a maddening aspect of 4.x).
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified in 10/30 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.