Covert the String value to HTML value

Black Coder
Tera Guru

Hi How to convert the String value to HTML value. We are in a need of bringing the description to Service portal widget. Even though the string type of description field has got line break, when the time of it is showed on service portal all the text are displayed in same line without line break.

How could it be sorted out

5 REPLIES 5

TariqueWasim
Tera Contributor

We can use replace.

stringField.replace("\n","<br>");