var queryurl = arxiv.baseurl + encodeURIComponent(query)
Using encodeURIComponent is overkill here, it will 'urlencode' all characters of query, including '&', '?' and others. According to my understanding of the HTTP protocol, this is even plain wrong.
Problem
In getpapers/lib/arxiv.js we see:
var queryurl = arxiv.baseurl + encodeURIComponent(query)
Using encodeURIComponent is overkill here, it will 'urlencode' all characters of query, including '&', '?' and others. According to my understanding of the HTTP protocol, this is even plain wrong.
Solution
Use encodeURI instead:
var queryurl = arxiv.baseurl + encodeURI(query)