Skip to content

Router Segments parsing error with = #21381

@thepian

Description

@thepian

I'm submitting a...


[x ] Bug report  

Current behavior

If you set up a route to match the following example URL.

https://test/info/password/de/MDAtMNTk=

The key passed will be MDAtMNTk without the equal sign.

Expected behavior

The equals sign has no meaning in the path, it should only apply to parsing the query string. The
the value passed should be MDAtMNTk=.

Minimal reproduction of the problem with instructions

You just need to add a test parsing an URL with an equal sign to trigger the issue.

  it('should pass the full path segment', () => {
    const t1 = serializer.parse('/password/de/MDAtMNTk=');
    const t2 = serializer.parse('/password/de/MDAtMNTk%3D');
    expect(containsTree(t1, t2, false)).toBe(false);
  });

What is the motivation / use case for changing the behavior?

  1. Putting base64 encoded strings in a URL is a common case.
  2. Angular should support valid URLs

Environment


Angular version: 5.0.0

Browser:
- [x] Chrome (desktop) version XX

For Tooling issues:
- Node version: v8.0.0
- Platform:  Mac, Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: routerfreq1: lowopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).state: confirmedtype: bug/fix

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions