Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Escape character HTML code in bussiness rule

davidgustafsson
Tera Expert

I am trying to remove white space from signature in emails. In this I found that the HTML field that I use are automatically  adding an extra line of HTML code:

<p >&nbsp;</p >

What I try to do is to add a business rule to remove this line as the user record with this HTML field is saved. But I can´t even find out how to add the escape characters correctly to point at that line. 

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

Are you fetching the HTML Value or String Value?

You can try this once

var text = current.u_text.getHTMLValue();
text = text.replace("<p >&nbsp;</p >","");
current.u_text = text;

 

View solution in original post

2 REPLIES 2

SaiRaviKiran Ak
Tera Guru

You can use   .replace("<p >&nbsp;</p >", "");

Alikutty A
Tera Sage

Are you fetching the HTML Value or String Value?

You can try this once

var text = current.u_text.getHTMLValue();
text = text.replace("<p >&nbsp;</p >","");
current.u_text = text;