commit 38107597868c432b259e69a419dfeaa02b8260f7
parent a9d32d0701c08b5c3261626d16a388e435001226
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 5 Apr 2012 00:00:34 -0700
Merge pull request #92 from aurimasv/cleanDOI
[cleanDOI] Don't allow periods or commas at the end of DOIs
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js
@@ -262,7 +262,7 @@ Zotero.Utilities = {
throw "cleanDOI: argument must be a string";
}
- return x.match(/10\.[^\s\/]+\/[^\s]+/);
+ return x.match(/10\.[0-9]{4,}\/[^\s]*[^\s\.,]/);
},
/**