Skip to content

URI fragment handling #1

@skaaptjop

Description

@skaaptjop

Hi,
I noticed that an input URL with a hash fragment (e.g. https://example.com/?key1=val1#target) ends up with the fragment being lumped in with the query parameter value (e.g. key1 = val1#target).

The result is that the final URL might lose the hash fragment if that key is excluded.

I ran a test like this:

const mockData = {
  urlInput: "https://www.example.com?key1=val1#fragment",
  outputResult: "url",
  paramInputChoice: "paramExclude",
  queryParamTable: [
    {
      queryParam: "key1"
    }
  ]
};

let variableResult = runCode(mockData);
assertThat(variableResult).isEqualTo("https://www.example.com/#fragment");

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