www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 73b2e037637dea0aa5cbd5c96a5332098e506524
parent 017342a85e247d76b94b2e23b539385db6834d65
Author: Sean Takats <sean@takats.org>
Date:   Thu, 28 May 2009 15:52:34 +0000

Fixes https regex problems.


Diffstat:
Mtranslators/zotero.org.js | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/translators/zotero.org.js b/translators/zotero.org.js @@ -141,13 +141,13 @@ function xmlToItem(xmlItem) { function doWeb(doc, url) { if (url.indexOf("/groups/") == -1) { - var userID = url.match(/^http:\/\/[^\/]*zotero\.org\/[^\/]+\/([0-9]+)/)[1]; + var userID = url.match(/^https?:\/\/[^\/]*zotero\.org\/[^\/]+\/([0-9]+)/)[1]; var apiPrefix = "https://api.zotero.org/users/" + userID + "/"; - var itemRe = /^http:\/\/[^\/]*zotero\.org\/[^\/]+\/[0-9]+\/items\/([0-9]+)/; + var itemRe = /^https?:\/\/[^\/]*zotero\.org\/[^\/]+\/[0-9]+\/items\/([0-9]+)/; } else { - var groupID = url.match(/^http:\/\/[^\/]*zotero\.org\/groups\/[^\/]+\/([0-9]+)/)[1]; + var groupID = url.match(/^https?:\/\/[^\/]*zotero\.org\/groups\/[^\/]+\/([0-9]+)/)[1]; var apiPrefix = "https://api.zotero.org/groups/" + groupID + "/"; - var itemRe = /^http:\/\/[^\/]*zotero\.org\/groups\/[^\/]+\/[0-9]+\/items\/([0-9]+)/; + var itemRe = /^https?:\/\/[^\/]*zotero\.org\/groups\/[^\/]+\/[0-9]+\/items\/([0-9]+)/; } var nsAtom = new Namespace('http://www.w3.org/2005/Atom');