Skip to content

Splitting on ; instead of ? #76

@jsumners

Description

@jsumners

It looks like some vendors use ; instead of ? to separate the path from the query string. This is wrong per spec:

The query component contains non-hierarchical data that, along with
data in the path component (Section 3.3), serves to identify a
resource within the scope of the URI's scheme and naming authority
(if any). The query component is indicated by the first question
mark ("?") character and terminated by a number sign ("#") character
or by the end of the URI.
https://tools.ietf.org/html/rfc3986#section-3.4

But I can tell you that it is out there. So the following should also look for character code 59 as an initial separator.

if (charCode === 63 || charCode === 35) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions