Script do not work in rules whenever an html tag is added in body

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ ] Bug report
  • [ ] Performance issue
  • [ x] Documentation issue or request

Current behavior

If i add any html tag to the body rules for sending an email, the script appears in the sent email.

Expected behavior

I would like to send a bold text dependeding on the value the script will return

Minimal reproduction of the problem

Cliente NOSSA:

        Script(

        if (event.data.isCustomer.iv == true) {

            return `Sim`;

        } else {

            return `Não`;

        }

    )</p>

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [x] Cloud version

Version: [VERSION]

Browser:

  • [x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

This is as expected. The code checks your input starts with Script( and ends with ) and then it evaluates the whole input as string. It does not do interpolation. You can easily do it inside your script.