Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hovering history entry for JSONPath with double quotes crashes response renderer #6977

Closed
1 task done
x3rAx opened this issue Jan 10, 2024 · 0 comments
Closed
1 task done
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer

Comments

@x3rAx
Copy link

x3rAx commented Jan 10, 2024

Expected Behavior

It should be possible to recall a JSONPath that contains double quotes from history.

Actual Behavior

The renderer crashes an an error is displayed:

Failed to render Dc.
Error: Failed to execute 'querySelector' on 'Element': '[data-key="$.store.books[?(@.author < "The Author")].title"]' is not a valid selector.
    at file:///app/main/resources/app.asar/index-f89f6e08.js:118:78623
    at gh (file:///app/main/resources/app.asar/index-f89f6e08.js:118:24296)
    at s6 (file:///app/main/resources/app.asar/index-f89f6e08.js:118:42448)
    at Wbe (file:///app/main/resources/app.asar/index-f89f6e08.js:118:41270)
    at Ic (file:///app/main/resources/app.asar/index-f89f6e08.js:118:40309)
    at H_ (file:///app/main/resources/app.asar/index-f89f6e08.js:118:36912)
    at pc (file:///app/main/resources/app.asar/index-f89f6e08.js:116:3288)
    at file:///app/main/resources/app.asar/index-f89f6e08.js:118:34286
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:204:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)

Reproduction Steps

  1. Request a URL that responds JSON
  2. Below the JSON response, in the JSONPath filter input, enter a filter containing double quotes like $.store.books[?(@.author < "The Author")].title
  3. Click the history icon right of the input filed (the clock icon)
  4. Hover the JSONPath containing double quotes

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

2023.5.8

What operating system are you using?

Other (specify below)

Operating System Version

Linux jehuty 6.6.8 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:02:07 UTC 2023 x86_64 GNU/Linux

Installation method

flatpak

Last Known Working Insomnia version

No response

@x3rAx x3rAx added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Jan 10, 2024
@jackkav jackkav closed this as completed Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer
Projects
None yet
Development

No branches or pull requests

2 participants