Skip to content

getpapers should not urlencode '&', '=', or '?' in its query URLs #178

@sedimentation-fault

Description

@sedimentation-fault

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions