novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.46k stars 3.51k forks source link

Notification content parsing issue #2063

Closed singhgulshan closed 9 months ago

singhgulshan commented 1 year ago

📜 Description

Send notification with html tags

👟 Reproduction steps

  1. Trigger notification with variable which contains Html tags in it.
  2. Use that vaiable as notification content in Novu's Admin control pannel.
  3. Content will be tiggered to user but with parsed html variable.

👍 Expected behavior

It should not parse Html tags or there should be an option to disable parse for certain notification content.

👎 Actual Behavior with Screenshots

Parsing Html tage to Hex code.

💻 Operating system

MacOS

🤖 Node Version

18.6.0

📃 Provide any additional context for the Bug.

On trigger with payload { message:"<b>Novu</b> says hello!!" } and using notification content as {{message}}

Output: &lt;b&gt;Novu&lt;/b&gt; says hello!!!

👀 Have you spent some time to check if this bug has been raised before?

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

No response

scopsy commented 1 year ago

A small question, @singhgulshan did you try using triple curly braces here? {{{message}}} this should also render HTML internally. a double curly brace will escape the HTML content.

scopsy commented 9 months ago

Closing now due to inactivity, as a general solution of using with triple curly braces for rendering HTML content.