how can you convert text from shell to html?

The closest html equivalent to \n is the “hard break” <br/> tag.
It does not require closing, because it contains nothing, and directly signifies line break.

Assuming it is supported by telegra.ph, you could simply:

tmp.replace('\n', '<br/>');

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top