Skip to content

angular router - url parameter with forward slash / gets truncated #7324

@fctucker09

Description

@fctucker09

When I use angular router, and my url parameter contains a forward slash, the url becomes truncated:

e.g.
http://localhost:3000/?thisis=atest/withaslash
will be changed to
http://localhost:3000/?thisis=atest

When i try to access the parameters using RouteParams, i get the truncated url parameter value - 'atest' instead of 'atest/withaslash'.

any idea what is happening and how to fix?

slashes are valid characters in a url parameter, and the issue goes away if i urlencode the forward slash with %2F. Additionally, when retrieving the RouteParam value, the returned value contains the escaped slash (e.g. with the %2F). not sure if the latter is considered a bug though.

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