If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

missing paragraph break on pasted text with <blockquote>

RESOLVED FIXED

Status

()

Core
Serializers
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: Jamie Zawinski, Assigned: Tanu Mutreja)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

2.86 KB, patch
Akkana Peck
: review+
Heikki Toivonen (remove -bugzilla when emailing directly)
: superreview+
jesup
: approval+
Details | Diff | Splinter Review
(Reporter)

Description

15 years ago
(I forget what component selection stuff goes in...)

Given this HTML document:

    <P>
    All work and no play makes Jack a dull boy.
    All work and no play makes Jack a dull boy.
    All work and no play makes Jack a dull boy.
    <BLOCKQUOTE> 
    ALL WORK AND NO PLAY MAKES JACK A DULL BOY.
    ALL WORK AND NO PLAY MAKES JACK A DULL BOY.
    ALL WORK AND NO PLAY MAKES JACK A DULL BOY.
    </BLOCKQUOTE> 
    All work and no play makes Jack a dull boy.
    All work and no play makes Jack a dull boy.
    All work and no play makes Jack a dull boy.

When I select all the text and paste it into another app (xemacs) I get this:

---------------------------
 All work and no play makes Jack a dull boy. All work and no play makes Jack a
dull boy. All work and no play makes Jack a dull boy.
ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ALL WORK AND NO PLAY MAKES JACK A
DULL BOY. ALL WORK AND NO PLAY MAKES JACK A DULL BOY. All work and no play makes
Jack a dull boy. All work and no play makes Jack a dull boy. All work and no
play makes Jack a dull boy.
---------------------------

That is, I get:

   <space> <paragraph 1> <newline> <paragraph 2> <space> <paragraph 3>

The break between 2 and 3 is missing.  I expect to get:

   <paragraph 1> <newline> <paragraph 2> <newline> <paragraph 3>

Though it would be even better if I got:

   <paragraph 1> <newline> <four spaces> <paragraph 2> <newline> <paragraph 3>

And I think pasted paragraphs should be delimited by two newlines, not just one.
confirm linux trunk cvs 2002-07-22
->dom2text apparently (bug 54851)
Component: XP Apps → DOM to Text Conversion
reasign for real
Assignee: sgehani → harishd
QA Contact: paw → sujay
Tanu, could you have a look at this? 

First, check what the HTML spec says about P and BLOCKQUOTE containment. In any
case, it is probably simple to add that newline after BLOCKQUOTE (and remember
XHTML as well).

Regarding more newlines/space indentations, please see what other browsers do.
At a first glance this looks ok, but I wouldn't want to break everyone's
expectations. We could make it a pref or something if there is no consensus.
(Assignee)

Updated

15 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 4

15 years ago
Created attachment 92575 [details] [diff] [review]
PatchV1.0

So far, for non formatted cases we are not handling BLOCKQUOTE in any special
manner. Akkana, is there any reason for this?
On handling BLOCKQUOTE in similar manner for all cases resolved this bug.
Though it passes all the build test cases yet I'm not very confident about
avoiding regression.
Some observation with other browsers are:

Netscape 4.79 handles it as:
All work and no play makes Jack a dull boy. All work and no play makes Jack a
dull boy. All work and no play makes Jack a dull boy.

     ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ALL WORK AND NO PLAY MAKES
JACK A DULL BOY. ALL WORK
     AND NO PLAY MAKES JACK A DULL BOY.

All work and no play makes Jack a dull boy. All work and no play makes Jack a
dull boy. All work and no play makes Jack a dull boy.

IE does it as:
All work and no play makes Jack a dull boy. All work and no play makes Jack a
dull boy. All work and no play makes Jack a dull boy.

ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ALL WORK AND NO PLAY MAKES JACK A
DULL BOY. ALL WORK AND NO PLAY MAKES JACK A DULL BOY.
All work and no play makes Jack a dull boy. All work and no play makes Jack a
dull boy. All work and no play makes Jack a dull boy.

Mozilla does it as:
All work and no play makes Jack a dull boy. All work and no play makes Jack a
dull boy. All work and no play makes Jack a dull boy.
ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ALL WORK AND NO PLAY MAKES JACK A
DULL BOY. ALL WORK AND NO PLAY MAKES JACK A DULL BOY. All work and no play
makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and
no play makes Jack a dull boy.

After the patch, output is as:
All work and no play makes Jack a dull boy. All work and no play makes Jack a
dull boy. All work and no play makes Jack a dull boy.

    ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ALL WORK AND NO PLAY MAKES JACK
A DULL BOY. ALL WORK AND NO PLAY MAKES JACK A DULL BOY.

All work and no play makes Jack a dull boy. All work and no play makes Jack a
dull boy. All work and no play makes Jack a dull boy.

Comment 5

15 years ago
Comment on attachment 92575 [details] [diff] [review]
PatchV1.0

Looks good!  r=akkana

No, I don't think there's any good reason that blockquotes were handled only in
formatted output.

I have only one complaint: as long as you're touching this code anyway, I'd
suggest that you improve the string handling (which looks like it was the
result of someone's global mass-substitute).  Instead of:
Nif (NS_SUCCEEDED(rv) && S_LossyConvertUCS2toASCII(value).Equals("cite",
nsCaseInsensitiveCStringComparator())) {
I suggest switching to this instead:
if (NS_SUCCEEDED(rv) && value.EqualsIgnoreCase("cite")) {

This at least gets rid of the explicit conversion (though it must do a convert
internally; I'd be happier if we used a comparator against
NS_LITERAL_STRING("cite"), but I didn't find on that worked.
Attachment #92575 - Flags: review+
(Assignee)

Comment 6

15 years ago
Created attachment 92920 [details] [diff] [review]
PatchV1.1(With Akkana's Suggestions)
Attachment #92575 - Attachment is obsolete: true

Updated

15 years ago
Attachment #92920 - Flags: review+
Comment on attachment 92920 [details] [diff] [review]
PatchV1.1(With Akkana's Suggestions)

sr=heikki
Attachment #92920 - Flags: superreview+
Tanu's bug. You get the glory of closing this once you check in (please observe
the current lock down mode, you may need to wait) :)
Assignee: harishd → t_mutreja
Status: ASSIGNED → NEW
Tanu, this has r= and sr=.  Has this landed yet?  If so please resolve this. 
Thanks!
(Assignee)

Comment 10

15 years ago
Checked in on trunk as Rev: 1.63.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Tanu, the tree is currently frozen. you would have needed driver approval for
the checkin.
Comment on attachment 92920 [details] [diff] [review]
PatchV1.1(With Akkana's Suggestions)

a=rjesup@wgate.com (retroactively).  Don't do it again....
Attachment #92920 - Flags: approval+
You need to log in before you can comment on or make changes to this bug.