Skip to content

URL clicks on filesystem URLs open the page without the query params #426

@mikesnare

Description

@mikesnare

Describe the bug

I'm using StackProf to do some profiling of a ruby app and it generates an HTML shell file and echoes a prompt to open that file with a query param containing the path to the file that contains the actual data. The echoed string looks like this:

open file:///Users/msnare/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/stackprof-0.2.17/lib/stackprof/flamegraph/viewer.html?data=/path/to/file/stack-prof-report-wall-raw-total.html

Warp strips off the query params if you click that URL (guessing it's because it assumes local files won't need query params, but that seems incorrect).

To Reproduce

Steps to reproduce:

  1. Create a file in your home directory called test.html (doesn't work at all unless the file actually exists).
  2. echo "file:///Users/<username>/test.html?what=ever"
  3. click the link in the result output. It should open that file with that query param.
  4. Note that the file is opened without the query param

Expected behaviour

The file should be opened with the query param intact.

Screenshots

No response

Operating System

MacOS

OS Version

12.0.1

Additional context

No response

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