Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Escaping Jinja expressions #325

Open
LindsayHill opened this issue Apr 12, 2019 · 1 comment
Open

Escaping Jinja expressions #325

LindsayHill opened this issue Apr 12, 2019 · 1 comment
Labels
component:st2flow design needed This issue has one or more design considerations (ux widgets) question

Comments

@LindsayHill
Copy link
Contributor

From Nick

When i try to enter an expression to a task input or task transition 'when', if i put a " or a \ it automatically escapes it for me, so i'm unable to make valid Jinja expressions

version: 1.0
    tasks:
      # [189, 75]
      hello_world:
        action: core.echo
        input:
          message: {{ ctx().message }}
        next:
          # #629e47
          - do:
              - task2
            when: {{ succeeded() }}
            publish:
              - thisvar: {{ result() }}
      # [400, 231]
      task2:
        action: core.local
        input:
          cmd: "\"echo '{{ ctx().thisvar }}'\""
    input:
      - message
@bigmstone
Copy link
Contributor

I'm not sure how to handle this from UX perspective. Meaning if you leave the quotes out then it is desired behavior. If we don't escape quotes that could lead to some interesting failure modes.

@bigmstone bigmstone added design needed This issue has one or more design considerations (ux widgets) question labels Apr 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component:st2flow design needed This issue has one or more design considerations (ux widgets) question
Projects
None yet
Development

No branches or pull requests

3 participants