Open Bug 662232 Opened 13 years ago Updated 3 years ago

Serializer's wrapping flag incorrectly wraps attribute contents

Categories

(Core :: DOM: Serializers, defect, P5)

defect

Tracking

()

People

(Reporter: glazou, Unassigned)

Details

Attachments

(1 file)

This bug affects at least Seamonkey Composer, BlueGriffon and Thunderbird.

1. launch Seamonkey Composer or BlueGriffon (http://bluegriffon.org )
2. create a new blank document if necessary
3. switch to source view
4. insert in the body element a paragraph with a >=80chars title attribute
   with multiple wrapping spots (i.e. white spaces)
5. switch back to normal view
6. switch back to source view

Expected result: the long title attribute stands on a single line
Actual result:   the title attribute is wrapped
Attached patch proposed fix #1Splinter Review
The idea is to get rid of the last lines of
nsXMLContentSerializer::SerializeAttr() that are responsible of the buggy
wrapping: the serialization of the attribute is agregated inside attrString
and appended to aStr depending on the serializing flags.

This is wrong because whitespaces inside attribute values can be turned
into carriage returns...

Instead, I'm appending if needed a carriage return and indentation at the
beginning of the serialization of the attribute and I leave wrap spots
unchanged when attrString is appended to aStr.

I took the opportunity to fix at the same time a small indentation bug:
no automatic indentation should be output if the serialization flag triggers
a raw output.

Bulk-downgrade of unassigned, >=3 years untouched DOM/Storage bug's priority.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: major → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: