Note: There are a few cases of duplicates in user autocompletion which are being worked on.

line breaks from HTML source appear in selection (when pasted) for application/xhtml+xml

UNCONFIRMED
Unassigned

Status

()

Core
Selection
UNCONFIRMED
7 years ago
7 years ago

People

(Reporter: Vincent Lefevre, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-GB; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-GB; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6

When one selects text from some web pages, copy it, and paste it in a terminal or text editor (e.g. Emacs), extraneous line breaks appear. These line breaks come from the HTML source. This behavior is incorrect because line breaks in text from HTML source are interpreted as normal white space for rendering.

Reproducible: Always

Steps to Reproduce:
1. Open the above URL.
2. Select all the text.
3. Paste the selection in a terminal or text editor (such as Emacs).
Actual Results:  
The pasted text is:

Paragraph with
two line breaks in
the HTML source.


Paragraph without line breaks in the HTML source.

Expected Results:  
The pasted text should be:

Paragraph with two line breaks in the HTML source.

Paragraph without line breaks in the HTML source.

This is the first time I see such a problem. Maybe a regression.

This problem doesn't occur on all the pages with line breaks, but when it occurs, it occurs every time.
(Reporter)

Comment 1

7 years ago
Created attachment 455601 [details]
Testcase (same as given URL)

Here's the testcase as an attachment.
(Reporter)

Updated

7 years ago
Attachment #455601 - Attachment mime type: text/html → application/xhtml+xml
(Reporter)

Comment 2

7 years ago
I now understand why the problem doesn't always occur: it occurs when the page is served as application/xhtml+xml, but not when it is served as text/html.
Summary: line breaks from HTML source appear in selection (when pasted) → line breaks from HTML source appear in selection (when pasted) for application/xhtml+xml
(Reporter)

Comment 3

7 years ago
Same problem with Iceweasel (Debian's Firefox) 3.5.10 under Linux (Debian).
OS: Mac OS X → All
Hardware: PowerPC → All
You need to log in before you can comment on or make changes to this bug.