commit 24cc9880ae1693c2a048893f1e4d8e354f4f77f6 parent 5494c6d0c50e852c72e189899ee1770764cd859b Author: Dan Stillman <dstillman@zotero.org> Date: Sat, 6 Feb 2010 01:46:52 +0000 Strip quotation marks from lines sent to Google Scholar for metadata retrieval so they don't mess up query quoting Diffstat:
| M | 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 @@ -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<lineLengthsLength; i++) { - if(lineLengths[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;