question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Template Tag plugin: can't use quotes in `string`

See original GitHub issue
  • Insomnia Version: 6.4.2
  • Operating System: Windows 10

Details

You can reproduce the bug in these conditions:

  • using a Template Tag plugin
  • one of the plugin args is of type string

Now, try using quotes character " in the value for the string type argument.

Even though the “Live Preview” shows a valid value, the request JSON body parser throws an error.

Maybe this is a duplicate of #1030, but I am not sure of it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gschiercommented, May 8, 2019

This was fixed here: https://github.com/getinsomnia/insomnia/commit/8adee60c8671291712b8ad33f6bbc1e43c453c16

The response tag will now store the filter value in base64 so the quotes won’t interfere

0reactions
jbrunicommented, May 5, 2019

I see… It works fine when the template engine renders the JSON body provided to the request…

But… why not also apply some parsing to the JSON before it is provided to the linter?

Instead of having {% mytag '"some value"' %} string reaching JSON linter… we could apply JSON.stringify on it, so the linter would receive a valid syntax:

{
  "foo": "{% mytag '\"some value\"' %}"
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to tell eslint that you prefer single quotes around your ...
Another useful option is to allow single or double quotes as long as the string contains an escapable quote like "lorem ipsum 'donor'...
Read more >
Chart Development Tips and Tricks - Helm
Know Your Template Functions · Quote Strings, Don't Quote Integers · Using the 'include' Function · Using the 'required' function · Using the...
Read more >
Documentation: 15: 4.1. Lexical Structure - PostgreSQL
To include a single-quote character within a string constant, write two ... PostgreSQL also accepts “escape” string constants, which are an extension to...
Read more >
Groovy Language Documentation
reserved keywords can be used for method names if quoted def "abstract"() ... An empty slashy string cannot be represented with a double...
Read more >
Template Tags - django cms 3.11.0 documentation
All placeholders in a template will be auto-detected and can be filled with plugins when editing a page that is using said template....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found