Skip to content

Over-eager HTML sanitization in the communication flow email editor #6759

@robotman3000

Description

@robotman3000

Description

This bug is pretty simple.

Actual Behavior

The communication flow email editor replaces > and < symbols located in lava code with html special characters on save (and when a test email is sent)

Example:

{% assign number = 10 %}
{% if number > 5 %}
Number is greater than 5
{% else %}
Number is less than 5
{% endif %}

becomes

{% assign number = 10 %}
{% if number &gt; 5 %}
Number is greater than 5
{% else %}
Number is less than 5
{% endif %}

Expected Behavior

The code

{% assign number = 10 %}
{% if number > 5 %}
Number is greater than 5
{% else %}
Number is less than 5
{% endif %}

remains unmodified.

Steps to Reproduce

  • Create a new communication flow.
    I used the on-demand flow type for the test but my use case is a recurring type

  • Create a lava content block in the template with the following contents

{% assign number = 10 %}
{% if number > 5 %}
Number is greater than 5
{% else %}
Number is less than 5
{% endif %}
  • Save and then go back into the editor
  • Observe that the ">" has been replaced with an html special character

Screenshot 1

Image

Screenshot 2

Image

Screenshot 3

Image

Screenshot 4

Image

Screenshot 5

Image

Issue Confirmation

  • Perform a search on the Github Issues to see if your bug is already reported.
  • Reproduced the problem on a fresh install or on the demo site.

Rock Version

18.2.4

Client Culture Setting

en-US

Metadata

Metadata

Labels

Fixed in v19.1Status: ConfirmedIt's clear what the subject of the issue is about, and what the resolution should be.Type: BugConfirmed bugs or reports that are very likely to be bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions