www

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

commit 0a3b96bd9c080d913216b2067a76115078d3d060
parent a6727940f452dadca0f50a9a572010e7dd291911
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon, 18 Apr 2011 23:23:41 +0000

Don't attempt to run regular expressions on very long URIs (fixes incompatibility with Update Scanner as reported at http://forums.zotero.org/discussion/17604/216-translator-hangs-with-addon-update-scanner/#Item_0)


Diffstat:
Mchrome/content/zotero/xpcom/translation/translate.js | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -991,8 +991,9 @@ Zotero.Translate.Web.prototype._getPotentialTranslators = function() { var allTranslators = Zotero.Translators.getAllForType("web"); var potentialTranslators = []; + Zotero.debug("Translate: Running regular expressions"); for(var i=0; i<allTranslators.length; i++) { - if(!allTranslators[i].webRegexp || allTranslators[i].webRegexp.test(this.location)) { + if(!allTranslators[i].webRegexp || (this.location.length < 8192 && allTranslators[i].webRegexp.test(this.location))) { potentialTranslators.push(allTranslators[i]); } }