From cb5343de857a71cff4c340e1616557080ecdd1d1 Mon Sep 17 00:00:00 2001 From: Dan Mills Date: Tue, 27 Jan 2009 16:36:00 -0800 Subject: [PATCH] only url-encode weave IDs when constructing a URL with them --- services/sync/modules/base_records/wbo.js | 10 +++++----- services/sync/modules/engines.js | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/services/sync/modules/base_records/wbo.js b/services/sync/modules/base_records/wbo.js index 3dfaeeb890ef..99993eebe8ca 100644 --- a/services/sync/modules/base_records/wbo.js +++ b/services/sync/modules/base_records/wbo.js @@ -62,14 +62,14 @@ WBORecord.prototype = { this.uri = uri; }, - get id() { return decodeURI(this.data.id); }, - set id(value) { - this.data.id = encodeURI(value); - }, + get id() { return this.data.id; }, + set id(value) { this.data.id = value; }, // NOTE: baseUri must have a trailing slash, or baseUri.resolve() will omit // the collection name - get uri() { return Utils.makeURI(this.baseUri.resolve(this.id)); }, + get uri() { + return Utils.makeURI(this.baseUri.resolve(encodeURI(this.id))); + }, set uri(value) { if (typeof(value) != "string") value = value.spec; diff --git a/services/sync/modules/engines.js b/services/sync/modules/engines.js index 18ff2c96e6d5..63dee826b662 100644 --- a/services/sync/modules/engines.js +++ b/services/sync/modules/engines.js @@ -143,7 +143,6 @@ Engine.prototype = { this._osPrefix = "weave:" + this.name + ":"; this._tracker; // initialize tracker to load previously changed IDs - dump(this.name + "engine initialized.\n"); this._log.debug("Engine initialized"); },