Fix another problem with Sakai's href attribute handling

This commit is contained in:
Dan Stillman 2008-11-20 21:29:54 +00:00
parent c942afb2b0
commit 9e8d822b90

View file

@ -868,17 +868,19 @@ Zotero.Sync.Storage = new function () {
href = href.path; href = href.path;
} }
if (href.indexOf(path) == -1) { if (href.indexOf(path) == -1
// Try URL-encoded as well, in case there's a '~' or similar
// character in the URL and the server (e.g., Sakai) is
// encoding the value
&& decodeURIComponent(href).indexOf(path) == -1) {
_error("DAV:href '" + href _error("DAV:href '" + href
+ "' does not begin with path '" + path + "' in " + funcName); + "' does not begin with path '" + path + "' in " + funcName);
} }
// Skip root URI // Skip root URI
// if (href == path
// Try URL-encoded as well, in case there's a '~' or similar // Try URL-encoded as well, as above
// character in the URL and the server (e.g., Sakai) is || decodeURIComponent(href) == path) {
// encoding the value
if (href == path || decodeURIComponent(href) == path) {
continue; continue;
} }