only url-encode weave IDs when constructing a URL with them

This commit is contained in:
Dan Mills 2009-01-27 16:36:00 -08:00
parent 9c9ddb6eb2
commit cb5343de85
2 changed files with 5 additions and 6 deletions

View File

@ -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;

View File

@ -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");
},