Open Bug 481990 Opened 16 years ago Updated 2 years ago

Extra line added while coping code from view source

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

People

(Reporter: BijuMailList, Unassigned)

References

()

Details

Attachments

(2 files)

Attached file index.xhtml
Extra line added while coping code from view source created per bug 481552 Comment 7 Extra line added while coping code from view source. Steps:- 1. Goto http://www.chanezon.com/pat/code/html5/video/index.xhtml (or attachment index.xhtml) 2. do view-source 3. do select all 4. copy code 5. paste it to a text editor or a HTML TEXTAREA Result:- User see extra lines, example at code below you should not see an extra line between the two <div>, these extra line are not visible view-source <div> <video id="video" src="video.ogv" controls="true"/> </div> <div> <canvas id="c1" width="160" height="96"/> <canvas id="c2" width="160" height="96"/> <canvas id="c3" width="160" height="96"/> </div> Expected:- User see same number of line in view-source and text editor. Like <div> <video id="video" src="video.ogv" controls="true"/> </div> <div> <canvas id="c1" width="160" height="96"/> <canvas id="c2" width="160" height="96"/> <canvas id="c3" width="160" height="96"/> </div>
Attached file Simple testcase
Not that this is completely unrelated to view-source.
The relevant code in nsPlainTextSerializer::DoCloseContainer is: 922 else if (type == eHTMLTag_pre) { 923 mFloatingLines = GetLastBool(mIsInCiteBlockquote) ? 0 : 1; 924 mLineBreakDue = PR_TRUE; 925 } this might be the right behavior for unstyled <pre>; I don't know. Seems pretty weird to me. I suppose view-source could stop using <pre> to avoid this crap; that might not be a bad idea. Blake, what do you think?
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: