From f3bcbe0252a74cd4927a0037cf5b78351012eb06 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Mon, 26 Apr 2010 21:04:20 +0200 Subject: [PATCH] Bug 561229 - Copy/Paste bookmarks is broken. r=dietrich --- browser/components/places/content/controller.js | 2 +- browser/components/places/src/PlacesUIUtils.jsm | 9 --------- toolkit/components/places/src/PlacesUtils.jsm | 2 ++ 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/browser/components/places/content/controller.js b/browser/components/places/content/controller.js index 0568eccd0903..a38401cf5a35 100644 --- a/browser/components/places/content/controller.js +++ b/browser/components/places/content/controller.js @@ -1181,7 +1181,7 @@ PlacesController.prototype = { copiedFolders.push(node); function generateChunk(type, overrideURI) { - let suffix = i < (nodes.length - 1) ? NEWLINE : ""; + let suffix = i < (nodes.length - 1) ? PlacesUtils.endl : ""; let uri = overrideURI; if (PlacesUtils.nodeIsLivemarkContainer(node)) diff --git a/browser/components/places/src/PlacesUIUtils.jsm b/browser/components/places/src/PlacesUIUtils.jsm index ce765e20e4f8..d34fd9dde3ae 100644 --- a/browser/components/places/src/PlacesUIUtils.jsm +++ b/browser/components/places/src/PlacesUIUtils.jsm @@ -59,15 +59,6 @@ XPCOMUtils.defineLazyGetter(this, "PlacesUtils", function() { return PlacesUtils; }); -#ifdef XP_MACOSX -// On Mac OSX, the transferable system converts "\r\n" to "\n\n", where we -// really just want "\n". -const NEWLINE= "\n"; -#else -// On other platforms, the transferable system converts "\r\n" to "\n". -const NEWLINE = "\r\n"; -#endif - var PlacesUIUtils = { ORGANIZER_LEFTPANE_VERSION: 6, ORGANIZER_FOLDER_ANNO: "PlacesOrganizer/OrganizerFolder", diff --git a/toolkit/components/places/src/PlacesUtils.jsm b/toolkit/components/places/src/PlacesUtils.jsm index 217a8d5e1f5e..e3661d48e35a 100644 --- a/toolkit/components/places/src/PlacesUtils.jsm +++ b/toolkit/components/places/src/PlacesUtils.jsm @@ -128,6 +128,8 @@ var PlacesUtils = { asContainer: function(aNode) asContainer(aNode), asQuery: function(aNode) asQuery(aNode), + endl: NEWLINE, + /** * Makes a URI from a spec. * @param aSpec