Inquiry not displaying line breaks as <br>
The inquiry front end should display line breaks in the description of an input property correctly.
st2 get inquiry [id] will display embedded line feeds via the cli
action code:
version: 1.0
tasks:
# [877, 193]
domain:
action: core.echo
input:
message: "{{ctx().indicators.domain|join(\", \")}}"
next:
# #fecb2f
- do:
- IPv4
publish:
- IPv4: "{{ctx().indicators.domain|join(\", \")}}"
# [864, 311]
IPv4:
action: core.echo
input:
message: "{{ctx().indicators.IPv4|join(\", \")}}"
next:
- do:
- get_approval
# [874, 428]
get_approval:
action: core.ask
input:
ttl: 60
schema:
type: object
properties:
approved:
type: boolean
description: |
block all?
{% for x in ctx().indicators.domain %}
{{x}}
{% endfor %}
another option to display
{{ctx().indicators.domain|join(", ")}}
required: True
color:
type: string
description: "what color"
enum:
- "blue"
- "red"
next:
- when: <% succeeded() %>
do: finish
- when: <% failed() %>
do: stop
finish:
action: core.echo message="Automation completed."
stop:
action: core.echo message="Automation stopped."
input:
- indicators
vars:
- IPv4: null
- domain: null
@guzzijones Can you clarify this for me? Are you talking about how the the st2 command (CLI) renders the descriptions, or how the web interface renders the descriptions?
If you're talking about the CLI, the best place to report that would be the main st2 repository.
If you are indeed talking about how it is rendered in the ST2 web UI, this is the right place to report it. However, can you post a screenshot or something of how it is being (incorrectly) rendered and include which web browser/s you are using? Are newlines being escaped too much (example: \\n)? Are newlines duplicated when they shouldn't be? Are they not even being rendered (example: first_linesecond_line)? Are they being rendered as spaces (example: first_line second_line)? We need more information to investigate this further.
newlines are not being rendered. Adding white-space: pre-wrap to the css class solves the issue.
Yes it is the gui.