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

"Retain original source formatting" does not work properly




15 years ago
14 years ago


(Reporter: Brian Rogers, Assigned: harishd)


(Blocks: 1 bug)

Windows 2000

Firefox Tracking Flags

(Not tracked)



(3 attachments)



15 years ago
Win2k, build 2002102508.

Set the Composer prefs to "Retain original source formatting," then use
Composer.  You will find that some amount of reformatting is taking place.

For example, newlines are being inserted after <br>.  This should only occur
when pretty printing is turned on.

Also, many more newlines are being inserted in various places, and Mozilla is
attempting to do some indentation.  It looks like some prettyprinting code is
being used when it shouldn't.

Comment 1

15 years ago
Created attachment 104502 [details]
Test case showing several problems with extra lines added in BODY

Line breaks are added below each TABLE /TABLE or BR tag, and closing tags such
as /P, /ADDRESS, /H1 ... /H6, etc. EVERY TIME you switch to SOURCE view, make a
change and switch back to NORMAL view.

Note separate related Bug 159615 about extra line breaks in the HEAD, and Bug
177303 dealing with line breaks being deleted after DOCTYPE, HTML, HEAD,

Comment 2

15 years ago
*** Bug 174107 has been marked as a duplicate of this bug. ***

Comment 3

15 years ago
This bug makes editing web pages very frustrating.

What is to happen (spec?) if the user switches back and forth between "Retain
original source formatting" and "Reformat HTML source"? Does one setting add new
lines and line breaks and the other removes them, or does each pref take it as
is gets it (more likely)?

I get this on Win98. Shouldn't this be OS=All?

Comment 4

15 years ago
*** Bug 179531 has been marked as a duplicate of this bug. ***

Comment 5

15 years ago
*** Bug 193354 has been marked as a duplicate of this bug. ***

Comment 6

15 years ago
This appears to be a duplicate of 174361.

Comment 7

15 years ago
See also: bug 25141, bug 97278.


15 years ago
Blocks: 174361

Comment 8

15 years ago
The added-linebreak symptoms described by "burpmaster" seem to have been fixed
in 1.3 Final, if not earlier.  There are still problems with some elements of
the <body> being being unwantedly reformatted (see my demo attachment in
Bug 174361, and the numerous bugs blocking that bug), and also with newline
control outside of the <body> (see Bug 25141).  Perhaps these extra linebreaks
were fixed as a result of the work on Bug 145196 ?

Anyway, this bug WFM.

Comment 9

15 years ago
I'm still seeing this problem with build 2003040209-TRUNK where the HTML source
is being changed with newlines being added.

Comment 10

15 years ago
Hmmm, it should be noted (in addition to my previous comment) that I didn't save
the HTML and look at the saved file. What I did was past the testcase into the
"HTML Source" window of Composer, switched to "Normal" and then switched back to
"HTML Source" which is where I saw the extra newlines which didn't exist when I
pasted the HTML. I have "Retain original source formatting" set, although that
seems to only apply to Saving or Publishing.

However, switching from HTML Source to Normal to HTML Source shouldn't change
things. This is what I understand the original problem to be, and is exactly
what Comment #3 is saying.

Testcases coming....

Comment 11

15 years ago
Created attachment 119282 [details]
As pasted in HTML Source

This is the test case just after I'd pasted it into "HTMl Source" in Composer.

Comment 12

15 years ago
Created attachment 119283 [details]
After switching to Normal

This is the same HTML after switching to "Normal" and then back to "HTML
Source". Why all the newlines?

Comment 13

15 years ago
OK, I see that now:  If you edit in the Source window (typing or pasting), then
switch to Normal and back to Source, the extraneous newlines are generated.

However, opening the file and editing in Normal or Tags or Preview does not add
the extraneous newlines, either in the Source view or in the saved file.

The symptoms in Bug 97278 are generated in the same way.  I submit that this is
a dupe of that bug, despite the reports talking about different parts of the

Comment 14

15 years ago
Agreed, this is a dup.

*** This bug has been marked as a duplicate of 97278 ***
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE

Comment 15

15 years ago
Please move your votes to Bug 97278!

Comment 16

14 years ago
*** Bug 227179 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.