Commit 60cdaf66 authored by Robby Stephenson's avatar Robby Stephenson
Browse files

Fix regexp in Google Scholar fetcher

The regexp for submitting the form to set the Bibtex cookie was bad.
How did it ever work?

BUG: 316550
FIXED-IN: 2.3.8
parent 301ed4cc
2013-03-11 Robby Stephenson <robby@periapsis.org>
* Fixed regexp in Google Scholar fetcher to set cookie (Bug 316550).
2013-03-10 Robby Stephenson <robby@periapsis.org>
* Update Allocine API to use JSONn instead of XML.
......
......@@ -235,7 +235,7 @@ void GoogleScholarFetcher::setBibtexCookie() {
// have to set preferences to have bibtex output
const QString text = FileHandler::readTextFile(KUrl(SCHOLAR_SET_BIBTEX_URL), true);
// find hidden input variables
QRegExp inputRx(QLatin1String("<input\\s+.*\\s+type\\s*=\\s*hidden\\s+.*>"));
QRegExp inputRx(QLatin1String("<input\\s+[^>]*\\s*type\\s*=\\s*\"hidden\"\\s+[^>]+>"));
inputRx.setMinimal(true);
QRegExp pairRx(QLatin1String("([^=\\s<]+)\\s*=\\s*\"?([^=\\s\">]+)\"?"));
QHash<QString, QString> nameValues;
......
......@@ -48,7 +48,7 @@ void GoogleScholarFetcherTest::initTestCase() {
m_fieldValues.insert(QLatin1String("entry-type"), QLatin1String("article"));
m_fieldValues.insert(QLatin1String("title"), QLatin1String("Speeding up the Hybrid Monte Carlo algorithm for dynamical fermions"));
m_fieldValues.insert(QLatin1String("author"), QLatin1String("Hasenbusch, M."));
m_fieldValues.insert(QLatin1String("author"), QLatin1String("Hasenbusch, Martin"));
m_fieldValues.insert(QLatin1String("publisher"), QLatin1String("Elsevier"));
m_fieldValues.insert(QLatin1String("journal"), QLatin1String("physics letters b"));
m_fieldValues.insert(QLatin1String("volume"), QLatin1String("519"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment