Closed
Bug 548482
Opened 14 years ago
Closed 29 days ago
Page source AppleScript command inserts bogus returns
Categories
(Camino Graveyard :: OS Integration, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: alqahira, Unassigned)
Details
Attachments
(7 files)
In 1.9.2, getting the source of a page via AppleScript appears to include spurious return characters. Note that you don't want to test against Script Editor, because it appears to always insert spurious returns for all {page|selection} {source|text} commands; send the text to TextEdit instead. Open the attached .applescript in Script Editor and run against Camino 2.0.x and against a 1.9.2-based build.
Reporter | ||
Comment 1•14 years ago
|
||
So, I can definitely reproduce this general problem in 2.0/1.9.0 when I NSLog what we get from Gecko (cmd_getContents). It's just that, for some reason, the results from 1.9.2 are worse (even more bogus returns in some documents), and the results vary from document to document (and maybe run-to-run? I'm now getting TextEdit to not have bogus returns in the source of cbo/welcome in my current nightly!). The sample from the forum clearly shows bogus returns both on 1.9.0 and 1.9.2. I guess I blame the serializer for this and bug 489670 (and various other strange formatting changes), and the encoder for bug 511045 :P
Keywords: regression
Version: 1.9.2 Branch → unspecified
Reporter | ||
Comment 2•14 years ago
|
||
Reporter | ||
Comment 3•14 years ago
|
||
Reporter | ||
Comment 4•14 years ago
|
||
Reporter | ||
Comment 5•14 years ago
|
||
Reporter | ||
Comment 6•14 years ago
|
||
Reporter | ||
Comment 7•14 years ago
|
||
Reporter | ||
Comment 8•12 years ago
|
||
For reference, hendy posted the two functions the Core code uses in bug 489670 comment 3. In theory, this bug is caused because the document encoder calls the serializer with a wrap-column value of 72. (In practice, the breaks seem to be at 73 characters, where they can happen.) Sadly, to get better results, we'd basically have to reimplement everything down through nsDocumentEncoder::EncodeToString ourselves, in order to call the serializer with the kind of arguments we'd like to use :-( It seems unfortunate that nsDocumentEncoder::EncodeToString doesn't do the right thing by default and doesn't allow callers to configure it.
You need to log in
before you can comment on or make changes to this bug.
Description
•