The CreatorCon Call for Content is officially open! Get started here.

Remove HTML tags from notification

Darlene York
Tera Contributor

 

Hello,

 

I wrote a notification on the kb_feedback table. I want to get the comment from the, but its keeping the HTML tag.  Any assistance would be greatly appreciated.

DarleneYork_0-1690401991229.png

 

 

 

DarleneYork_0-1690401595075.png

 

1 ACCEPTED SOLUTION

sushantmalsure
Mega Sage

This is happening because comments are stored with html tags around it.

Instead of using ${comments} directly do following (example):

 

can create new email script (System Notification>email>Notification Email Script) to print comments and then use that script in your notification.

Example:

sushantmalsure_0-1690465106192.png

sushantmalsure_1-1690465118275.png

 

sushantmalsure_2-1690465133463.png

 

 

Mail script: 

Name: writeComments

script: 

var com = current.getValue("comments");
template.print(com);

 

Call script in notification: 

${mail_script:writeComments}

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

View solution in original post

12 REPLIES 12

Kalyani Jangam1
Mega Sage

HI @Darlene York 

Check Source code of html in notification. Source code like below

Screenshot 2023-07-27 at 2.10.03 PM.png

I have tried this and it is working on kb_knowledege feedback table also.

Please check and Mark Helpful and Correct if it really helps you.

sushantmalsure
Mega Sage

@Darlene York 

Click on source code

sushantmalsure_0-1690447937060.png

 

and remove the <p> and </p> around comments.

If you dont find anything there then post a screenshot of the source code.

 

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

Good morning.  thank you for your response.  When I remove the tags and hit save, it reapplies them.

 

DarleneYork_1-1690464695396.png

 

piyushsain
Tera Guru

Try going on the source code from the tool bar in the Message HTML and remove the tags

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain