Skip to content

Conversation

@thewheat
Copy link
Contributor

PR details

Files issue

Before

file_problem

After

file_fixed

Base64 issue

Before

base_problem

After

base_fixed


Context

  • When a string with a backslash is used (e.g. in a file name or in input value of a function)
  • It will work correctly on first use
    image
  • But closing the modal and reopening it will show that the "Live Preview" with no data / incorrect data (illustrated in the first image in this PR)

Other details

  • It looks like there is escaping of strings when an input value is changed
    // Fix strings
    if (typeof argValue === 'string') {
    argValue = argValue.replace(/\\/g, '\\\\');
    }
  • This requires activeTagData.args values which are strings needing to be escaped on first load (which is the core part of this PR)
  • While this PR fixes the current problem I feel that there could be something related to the escaping of strings which could be the root issue (I couldn't figure out the full context of why it needed to be escaped)

@CLAassistant
Copy link

CLAassistant commented Dec 6, 2020

CLA assistant check
All committers have signed the CLA.

@gatzjames gatzjames self-assigned this Sep 8, 2021
Copy link
Contributor

@dimitropoulos dimitropoulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works!

(before on left, after on right)

Screenshot_20210909_091637
Screenshot_20210909_091859

@dimitropoulos dimitropoulos merged commit 614957c into Kong:develop Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File paths not parsed on Windows [Bug] Can't load file for file token

5 participants