From 24cc9880ae1693c2a048893f1e4d8e354f4f77f6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 6 Feb 2010 01:46:52 +0000 Subject: [PATCH] Strip quotation marks from lines sent to Google Scholar for metadata retrieval so they don't mess up query quoting --- chrome/content/zotero/recognizePDF.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/recognizePDF.js b/chrome/content/zotero/recognizePDF.js index b6c6cfaf4e..204471b6d1 100644 --- a/chrome/content/zotero/recognizePDF.js +++ b/chrome/content/zotero/recognizePDF.js @@ -321,7 +321,11 @@ Zotero_RecognizePDF.Recognizer.prototype.recognize = function(file, libraryID, c var uBound = medianLength + 4; var lBound = medianLength - 4; for (var i=0; i lBound && lineLengths[i] < uBound) this._goodLines.push(lines[i]); + if(lineLengths[i] > lBound && lineLengths[i] < uBound) { + // Strip quotation marks so they don't mess up search query quoting + var line = lines[i].replace('"', ''); + this._goodLines.push(line); + } } this._startLine = this._iteration = 0;