Skip to content

Cannot parse searchParam that contain = in value #167

Open
@xg-wang

Description

@xg-wang

recognize ignores search param value after the =. For example this is reported in pretenderjs/pretender#316

let u = new URL('/films?filter=genres=in=(comedy);actor=="Ryan Reynolds"', window.location)
for (let pair of u.searchParams.entries()) {
   console.log(pair[0]+ ', '+ pair[1]);
}

// Browser output: 
// filter, genres=in=(comedy);actor=="Ryan Reynolds"

parseQueryString(queryString: string): QueryParams {
appears to be supporting array syntax but it's something else https://github.com/tildeio/route-recognizer/blob/8e2969be64/tests/recognizer-tests.ts#L794-L803

Notice route-recognizer also does not allow recognizing with searchParams / qp #53.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions