novu icon indicating copy to clipboard operation
novu copied to clipboard

Notification content parsing issue

Open singhgulshan opened this issue 2 years ago • 1 comments

📜 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?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

No response

singhgulshan avatar Nov 22 '22 06:11 singhgulshan

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 avatar Nov 27 '22 11:11 scopsy

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

scopsy avatar Nov 26 '23 15:11 scopsy