Closed Bug 179084 Opened 23 years ago Closed 22 years ago

Bookmark Export uses Unix carriage returns on all platforms

Categories

(SeaMonkey :: Bookmarks & History, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: mcsmurf)

Details

Attachments

(1 file)

When exporting bookmarks under Windows ( XP in this case, but presumably all Windows ), the bookmark .html file generated uses Unix carriage returns. Unless I'm mistaken, it should use native carriage returns for generated files... right?
Now that I think about it, you should probably check OS X as well, in case it's present across all non-Unix platforms.
Confirmed on MAC OS 9.1, Build 2002110408
Satified it's not just Windows, adjusting subject and Platform/OS accordingly
OS: Windows XP → All
Hardware: PC → All
Summary: Bookmark Export in Windows uses Unix carriage returns → Bookmark Export uses Unix carriage returns on all platforms
We need to insert some code like in http://lxr.mozilla.org/mozilla/source/content/base/src/nsPlainTextSerializer.cpp#183 and following lines and probably insert in nsBookmarksService::WriteBookmarks (or in nsBookmarksService::Init?). But this would change the whole bookmark writing thing and I'm not sure if Mozilla supports reading bookmarks with other linebreaks properly. So someone knows if this is possible?
Attached patch very easy patchSplinter Review
well replaces \n with NS_LINEBREAK
Attachment #126839 - Flags: review?(jaggernaut)
Comment on attachment 126839 [details] [diff] [review] very easy patch Seems good. Make sure this is tested on Mac, Unix and Windows to not break anything and that all \n have been caught.
Attachment #126839 - Flags: superreview+
Attachment #126839 - Flags: review?(varga)
Attachment #126839 - Flags: review?(jaggernaut)
Comment on attachment 126839 [details] [diff] [review] very easy patch looks good and I confirm what jag said
Attachment #126839 - Flags: review?(varga) → review+
Ok someone tested this patch on Linux a little bit longer and someone on mac os x and both said the patch works ok.
Assignee: ben → mcsmurf
Checking in nsBookmarksService.cpp; /cvsroot/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp,v <-- nsBookmarksService.cpp new revision: 1.295; previous revision: 1.294 done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: