Source code formatting should be optional

RESOLVED DUPLICATE of bug 716741

Status

RESOLVED DUPLICATE of bug 716741
8 years ago
6 years ago

People

(Reporter: bevo, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Halloween2011Bug])

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; Windows NT 5.1; rv:2.0b3pre) Gecko/20100724 SeaMonkey/2.1a3pre
Build Identifier: Mozilla/5.0 (Windows; Windows NT 5.1; rv:2.0b3pre) Gecko/20100724 SeaMonkey/2.1a3pre

Problems:
- Saved HTML-Code is inflated with white spaces.
- White spaces and line feeds are breaking tags and their arguments. With alt- and title-attributes this leads to altered (defective) functionality of the webpage.
- The combination of code indention and the maximum line lenght of 83? characters result in inflated and unreadable code

suggestions:
- Saving of formatted HTML should be optional.
- Line breaks in tags should be optional
- No breaks that change functionality of the code
- Max line length should be editable or removable (no breaks in tags) by the user 

Source-Code Excerpts:
Seamonkey 2.0.X
<img
 style="width: 226px; height: 226px;" alt="Prof. Dr. Max Muster"
 title="Prof. Dr. Max Muster" src="Katrin_Muster_klein.jpg"><br>
Prof. Dr. Katrin Muster<br>

Seamonkey 2.1.a3

                                                      <img
                                                      style="width:
                                                      226px; height:
                                                      226px;" alt="Prof.
                                                      Dr. Max Muster"
                                                      title="Prof. Dr.
                                                      Max Muster"
                                                      src="Max_Muster.jpg">



Reproducible: Always

Steps to Reproduce:
Open and save a given HTML-File using Composer.
Complex documents with nested code resulting high indention level.
Actual Results:  
                                                      <img
                                                      style="width:
                                                      226px; height:
                                                      226px;" alt="Prof.
                                                      Dr. Max Muster"
                                                      title="Prof. Dr.
                                                      Max Muster"
                                                      src="Max_Muster.jpg">


Expected Results:  
<img style="width: 226px; height: 226px;" alt="Prof. Dr. Max Muster" title="Prof. Dr. Max Muster" src="Max_Muster.jpg">

Simply: Don't break the line.

Comment 1

7 years ago
Could you see if this still happens in SM2.3?

Comment 2

7 years ago
WORKSFORME
Build identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111017 Firefox/10.0a1 SeaMonkey/2.7a1

Comment 3

7 years ago
> WORKSFORME
On second try I can reproduce issue with this page, steps:
1) Press Ctrl+U to open page source
2) Find line
          <td><span title="Source code formatting destroys alt- and title-attributes of img-tags and inflates HTML-Files">Source code formatting destroys alt- and title-attributes of img-tags and inf...
and see that this is one line
3) On page press Ctrl+E to open it in Composer
4) Go to HTML Source and find same line, see it wrapped in several lines for no reason.

Updated

7 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Summary: Source code formatting destroys alt- and title-attributes of img-tags and inflates HTML-Files → Source code formatting should be optional
Whiteboard: [Halloween2011Bug]DUPEME
Version: unspecified → Trunk

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Whiteboard: [Halloween2011Bug]DUPEME → [Halloween2011Bug]
Duplicate of bug: 716741
You need to log in before you can comment on or make changes to this bug.